Improve condition creation in forms

pull/1/head
yflory 3 years ago
parent 480f8e0b56
commit ec50d9dc6f

@ -1579,10 +1579,14 @@ define([
}, 1000); }, 1000);
}); });
$container.setValue = function (val, name) { $container.setValue = function (val, name, sync) {
value = val; value = val;
var $val = $innerblock.find('[data-value="'+val+'"]'); var $val = $innerblock.find('[data-value="'+val+'"]');
var textValue = name || $val.html() || val; var textValue = name || $val.html() || val;
if (sync) {
$button.find('.cp-dropdown-button-title').html(textValue);
return;
}
setTimeout(function () { setTimeout(function () {
$button.find('.cp-dropdown-button-title').html(textValue); $button.find('.cp-dropdown-button-title').html(textValue);
}); });

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save