mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix menu shortcut display when menu label is long
This commit is contained in:
parent
c2625d696d
commit
6ab74951f4
@ -82,7 +82,7 @@ RED.menu = (function() {
|
|||||||
linkContent += '<span class="red-ui-menu-label-container"><span class="red-ui-menu-label">'+opt.label+'</span>'+
|
linkContent += '<span class="red-ui-menu-label-container"><span class="red-ui-menu-label">'+opt.label+'</span>'+
|
||||||
'<span class="red-ui-menu-sublabel">'+opt.sublabel+'</span></span>'
|
'<span class="red-ui-menu-sublabel">'+opt.sublabel+'</span></span>'
|
||||||
} else {
|
} else {
|
||||||
linkContent += '<span class="red-ui-menu-label">'+opt.label+'</span>'
|
linkContent += '<span class="red-ui-menu-label"><span>'+opt.label+'</span></span>'
|
||||||
}
|
}
|
||||||
|
|
||||||
linkContent += '</a>';
|
linkContent += '</a>';
|
||||||
@ -92,7 +92,7 @@ RED.menu = (function() {
|
|||||||
if (typeof opt.onselect === 'string') {
|
if (typeof opt.onselect === 'string') {
|
||||||
var shortcut = RED.keyboard.getShortcut(opt.onselect);
|
var shortcut = RED.keyboard.getShortcut(opt.onselect);
|
||||||
if (shortcut && shortcut.key) {
|
if (shortcut && shortcut.key) {
|
||||||
opt.shortcutSpan = $('<span class="red-ui-popover-key">'+RED.keyboard.formatKey(shortcut.key, true)+'</span>').appendTo(link);
|
opt.shortcutSpan = $('<span class="red-ui-popover-key">'+RED.keyboard.formatKey(shortcut.key, true)+'</span>').appendTo(link.find(".red-ui-menu-label"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ RED.view = (function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
activeGroups = RED.nodes.groups(activeWorkspace)||[];
|
activeGroups = RED.nodes.groups(activeWorkspace)||[];
|
||||||
activeGroups.forEach(function(g) {
|
activeGroups.forEach(function(g, i) {
|
||||||
g._index = i;
|
g._index = i;
|
||||||
if (g.g) {
|
if (g.g) {
|
||||||
g._root = g.g;
|
g._root = g.g;
|
||||||
|
@ -24,10 +24,6 @@ RED.workspaces = (function() {
|
|||||||
var hideStack = [];
|
var hideStack = [];
|
||||||
var viewStackPos = 0;
|
var viewStackPos = 0;
|
||||||
|
|
||||||
function isSameObj(env0, env1) {
|
|
||||||
return (JSON.stringify(env0) === JSON.stringify(env1));
|
|
||||||
}
|
|
||||||
|
|
||||||
function addToViewStack(id) {
|
function addToViewStack(id) {
|
||||||
if (viewStackPos !== viewStack.length) {
|
if (viewStackPos !== viewStack.length) {
|
||||||
viewStack.splice(viewStackPos);
|
viewStack.splice(viewStackPos);
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
& > li > a,
|
& > li > a,
|
||||||
& > li > a:focus {
|
& > li > a:focus {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 4px 0 4px 32px;
|
padding: 4px 12px 4px 32px;
|
||||||
clear: both;
|
clear: both;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
@ -106,11 +106,17 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.red-ui-menu-label {
|
||||||
|
display: flex;
|
||||||
|
& > :first-child {
|
||||||
|
flex-grow: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
.red-ui-popover-key {
|
.red-ui-popover-key {
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
float: right;
|
// float: right;
|
||||||
color: $menuColor;
|
color: $menuColor;
|
||||||
border-color: $menuColor;
|
border-color: $menuColor;
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,6 @@
|
|||||||
}
|
}
|
||||||
span.red-ui-menu-label {
|
span.red-ui-menu-label {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: inline-block;
|
|
||||||
text-indent: 0px;
|
text-indent: 0px;
|
||||||
}
|
}
|
||||||
span.red-ui-menu-sublabel {
|
span.red-ui-menu-sublabel {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user