Display "No Action" in context menu when empty
This commit is contained in:
parent
7af53cc0e7
commit
29b7c2c295
@ -15,5 +15,11 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.cp-app-drive-context-noAction {
|
||||||
|
font-style: italic;
|
||||||
|
color: #aaa;
|
||||||
|
cursor: default;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -304,6 +304,7 @@ define([
|
|||||||
'aria-labelledby': 'dropdownMenu',
|
'aria-labelledby': 'dropdownMenu',
|
||||||
'style': 'display:block;position:static;margin-bottom:5px;'
|
'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', {
|
h('li', h('a.cp-app-drive-context-open.dropdown-item', {
|
||||||
'tabindex': '-1',
|
'tabindex': '-1',
|
||||||
'data-icon': faFolderOpen,
|
'data-icon': faFolderOpen,
|
||||||
@ -1332,11 +1333,7 @@ define([
|
|||||||
|
|
||||||
displayMenu(e);
|
displayMenu(e);
|
||||||
|
|
||||||
if ($contextMenu.find('li:visible').length === 0) {
|
$(".cp-app-drive-context-noAction").toggle($contextMenu.find('li:visible').length === 0);
|
||||||
debug("No visible element in the context menu. Abort.");
|
|
||||||
$contextMenu.hide();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$contextMenu.data('paths', paths);
|
$contextMenu.data('paths', paths);
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user