Add read-only mode tooltip when hovering disabled menu items
So user can have yet another visual cue that the current mode is read-only Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com> Change-Id: Ie7862e963603541c04d1b6662fbc7350f6e675a0
This commit is contained in:
parent
847c05adc9
commit
8e933d2cab
1 changed files with 2 additions and 0 deletions
|
@ -1639,6 +1639,7 @@ L.Control.Menubar = L.Control.extend({
|
|||
} else { // eslint-disable-next-line no-lonely-if
|
||||
if (type === 'unocommand') { // disable all uno commands
|
||||
$(aItem).addClass('disabled');
|
||||
aItem.title = _('Read-only mode');
|
||||
} else if (type === 'action') { // disable all except allowedViewModeActions
|
||||
var found = false;
|
||||
for (var i in self.options.allowedViewModeActions) {
|
||||
|
@ -1651,6 +1652,7 @@ L.Control.Menubar = L.Control.extend({
|
|||
found = false;
|
||||
if (!found) {
|
||||
$(aItem).addClass('disabled');
|
||||
aItem.title = _('Read-only mode');
|
||||
} else {
|
||||
$(aItem).removeClass('disabled');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue