Add contextmenu icons for code and slide app

pull/1/head
ClemDee 5 years ago
parent 0636714829
commit b5a58b9604

@ -2856,9 +2856,20 @@ define([
}, [
h('li', h('a.dropdown-item', {
'tabindex': '-1',
'data-icon': "cptools-file",
}, Messages.pad_mediatagImport))
])
]);
$(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);
});
var m = createContextMenu(menu);
mediatagContextMenu = m;

Loading…
Cancel
Save