- changed form builder > icon field to new dropdown type;

This commit is contained in:
Mykyta Synelnikov
2024-04-23 12:36:36 +03:00
parent 595945c96e
commit d58d065a68
12 changed files with 240 additions and 80 deletions
+8 -1
View File
@@ -97,7 +97,14 @@ UM.admin = {
select2_atts.dropdownParent = $iconSelector.parents('._heading_text');
}
$iconSelector.select2( select2_atts );
$iconSelector.select2( select2_atts ).on( 'change', function () {
// handle outdated icons and remove them after select new one.
let oldWrapper = $iconSelector.siblings('.um_admin_fonticon_wrapper');
if ( oldWrapper.length > 0 ) {
oldWrapper.find('#_icon').val( $iconSelector.val() );
oldWrapper.hide();
}
});
}
}
}