1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #4154 from node-red/add-editor-scope

Add editor scope to keyboard shortcut scope select
This commit is contained in:
Nick O'Leary 2023-04-28 18:47:25 +01:00 committed by GitHub
commit 67dd7e30fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -491,6 +491,7 @@
"unassigned": "Unassigned",
"global": "global",
"workspace": "workspace",
"editor": "edit dialog",
"selectAll": "Select all",
"selectNone": "Select none",
"selectAllConnected": "Select connected",

View File

@ -491,7 +491,11 @@ RED.keyboard = (function() {
okButton.attr("disabled",!valid);
});
var scopeSelect = $('<select><option value="*" data-i18n="keyboard.global"></option><option value="red-ui-workspace" data-i18n="keyboard.workspace"></option></select>').appendTo(scope);
var scopeSelect = $('<select>'+
'<option value="*" data-i18n="keyboard.global"></option>'+
'<option value="red-ui-workspace" data-i18n="keyboard.workspace"></option>'+
'<option value="red-ui-editor-stack" data-i18n="keyboard.editor"></option>'+
'</select>').appendTo(scope);
scopeSelect.i18n();
if (object.scope === "workspace") {
object.scope = "red-ui-workspace";