Add .selected to currently set icon in modal

v1.18.x
Raphael Beer 9 years ago
parent 4aabac5288
commit dca9218ee9

@ -60,8 +60,12 @@ define('iconSelect', function() {
// Focus on the input box
searchEl.focus();
if (selected) {
modalEl.find('.icon-container .' + selected).addClass('selected');
}
modalEl.find('.icon-container').on('click', 'i', function() {
searchEl.val($(this).attr('class').replace('fa fa-', ''));
searchEl.val($(this).attr('class').replace('fa fa-', '').replace('selected', ''));
modalEl.find('.icon-container i').removeClass('selected');
$(this).addClass('selected');
});

Loading…
Cancel
Save