diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less index abbe07955..b2076034c 100644 --- a/customize.dist/src/less2/include/colortheme.less +++ b/customize.dist/src/less2/include/colortheme.less @@ -26,6 +26,8 @@ @colortheme_form-warning: #f49842; @colortheme_form-warning-hov: darken(@colortheme_form-warning, 5%); +@colortheme_context-menu-icon-color: #7b7b7b; + @colortheme_modal-bg: @colortheme_form-bg-alt; // TODO Modals bg @colortheme_modal-fg: @colortheme_form-color-alt; @colortheme_modal-link: @colortheme_link-color; diff --git a/customize.dist/src/less2/include/contextmenu.less b/customize.dist/src/less2/include/contextmenu.less index e60394bd7..2063a239e 100644 --- a/customize.dist/src/less2/include/contextmenu.less +++ b/customize.dist/src/less2/include/contextmenu.less @@ -13,6 +13,10 @@ font-size: @colortheme_app-font-size; a { cursor: pointer; + .fa, .cptools { + margin-right: 1rem; + color: @colortheme_context-menu-icon-color; + } } } .cp-app-drive-context-noAction { diff --git a/www/drive/inner.js b/www/drive/inner.js index 7224d729d..fb9bd4063 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -413,6 +413,16 @@ define([ }, Messages.fc_prop)), ]) ]); + $(menu).find("li a.dropdown-item").each(function (i, el) { + var $icon = $(""); + 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); };