mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Hide actionList in context menu if disabled
This commit is contained in:
parent
9745904c5b
commit
593726ecb8
@ -205,7 +205,9 @@ RED.actionList = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
RED.actions.add("core:show-action-list",show);
|
if (RED.settings.theme("menu.menu-item-action-list", true)) {
|
||||||
|
RED.actions.add("core:show-action-list",show);
|
||||||
|
}
|
||||||
|
|
||||||
RED.events.on("editor:open",function() { disabled = true; });
|
RED.events.on("editor:open",function() { disabled = true; });
|
||||||
RED.events.on("editor:close",function() { disabled = false; });
|
RED.events.on("editor:close",function() { disabled = false; });
|
||||||
|
@ -65,10 +65,11 @@ RED.contextMenu = (function () {
|
|||||||
addY = gridSize * Math.floor(addY / gridSize)
|
addY = gridSize * Math.floor(addY / gridSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
menuItems.push(
|
if (RED.settings.theme("menu.menu-item-action-list", true)) {
|
||||||
{ onselect: 'core:show-action-list', label: RED._("contextMenu.showActionList"), onpostselect: function () { } }
|
menuItems.push(
|
||||||
)
|
{ onselect: 'core:show-action-list', label: RED._("contextMenu.showActionList"), onpostselect: function () { } }
|
||||||
|
)
|
||||||
|
}
|
||||||
const insertOptions = []
|
const insertOptions = []
|
||||||
menuItems.push({ label: RED._("contextMenu.insert"), options: insertOptions })
|
menuItems.push({ label: RED._("contextMenu.insert"), options: insertOptions })
|
||||||
insertOptions.push(
|
insertOptions.push(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user