Add icons in context menu
This commit is contained in:
@@ -413,6 +413,16 @@ define([
|
||||
}, Messages.fc_prop)),
|
||||
])
|
||||
]);
|
||||
$(menu).find("li a.dropdown-item").each(function (i, el) {
|
||||
var $icon = $("<span>");
|
||||
if ($(el).attr('data-icon')) {
|
||||
var font = $(el).attr('data-icon').indexOf('cptools') === 0 ? 'cptools' : 'fa';
|
||||
$icon.addClass(font).addClass($(el).attr('data-icon'));
|
||||
} else {
|
||||
$icon.text($(el).text());
|
||||
}
|
||||
$(el).prepend($icon);
|
||||
});
|
||||
return $(menu);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user