diff --git a/customize.dist/src/less2/include/contextmenu.less b/customize.dist/src/less2/include/contextmenu.less index 1a9049b54..e60394bd7 100644 --- a/customize.dist/src/less2/include/contextmenu.less +++ b/customize.dist/src/less2/include/contextmenu.less @@ -15,5 +15,11 @@ cursor: pointer; } } + .cp-app-drive-context-noAction { + font-style: italic; + color: #aaa; + cursor: default; + display: none; + } } } diff --git a/www/drive/inner.js b/www/drive/inner.js index d6669d1c7..94f7d9e5e 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -304,6 +304,7 @@ define([ 'aria-labelledby': 'dropdownMenu', 'style': 'display:block;position:static;margin-bottom:5px;' }, [ + h('span.cp-app-drive-context-noAction.dropdown-item.disabled', Messages.fc_noAction || "No action possible"), h('li', h('a.cp-app-drive-context-open.dropdown-item', { 'tabindex': '-1', 'data-icon': faFolderOpen, @@ -1332,11 +1333,7 @@ define([ displayMenu(e); - if ($contextMenu.find('li:visible').length === 0) { - debug("No visible element in the context menu. Abort."); - $contextMenu.hide(); - return true; - } + $(".cp-app-drive-context-noAction").toggle($contextMenu.find('li:visible').length === 0); $contextMenu.data('paths', paths); return false;