diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js index 5052e47b5..f1e3cc517 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/clipboard.js @@ -1,4 +1,4 @@ -/** +red-ui-clipboard-dialog-import-opt/** * Copyright JS Foundation and other contributors, http://js.foundation * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -54,7 +54,7 @@ RED.clipboard = (function() { text: RED._("clipboard.download"), click: function() { var element = document.createElement('a'); - element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent($("#clipboard-export").val())); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent($("#red-ui-clipboard-dialog-export-text").val())); element.setAttribute('download', "flows.json"); element.style.display = 'none'; document.body.appendChild(element); @@ -69,13 +69,13 @@ RED.clipboard = (function() { text: RED._("clipboard.export.copy"), click: function() { if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") { - $("#clipboard-export").select(); + $("#red-ui-clipboard-dialog-export-text").select(); document.execCommand("copy"); document.getSelection().removeAllRanges(); RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"}); $( this ).dialog( "close" ); } else { - var flowToExport = $("#clipboard-export").val(); + var flowToExport = $("#red-ui-clipboard-dialog-export-text").val(); var selectedPath = libraryBrowser.getSelected(); if (!selectedPath.children) { selectedPath = selectedPath.parent; @@ -138,9 +138,9 @@ RED.clipboard = (function() { class: "primary", text: RED._("common.label.import"), click: function() { - var addNewFlow = ($("#import-tab > a.selected").attr('id') === 'import-tab-new'); - if (activeTab === "red-ui-clipboard-dialog-import-tab-clipboard") { - RED.view.importNodes($("#clipboard-import").val(),addNewFlow); + var addNewFlow = ($("#red-ui-clipboard-dialog-import-opt > a.selected").attr('id') === 'red-ui-clipboard-dialog-import-opt-new'); + if (activeTab === "red-ui-clipboard-dialog-red-ui-clipboard-dialog-import-opt-clipboard") { + RED.view.importNodes($("#red-ui-clipboard-dialog-import-text").val(),addNewFlow); } else { var selectedPath = libraryBrowser.getSelected(); if (selectedPath.path) { @@ -166,10 +166,10 @@ RED.clipboard = (function() { exportNodesDialog = '
'+ ''+ - ''+ - ''+ - ''+ - ''+ + ''+ + ''+ + ''+ + ''+ ''+ '
'+ '
'+ @@ -179,12 +179,12 @@ RED.clipboard = (function() { '
'+ '
'+ '
'+ - ''+ + ''+ '
'+ '
'+ - ''+ - ''+ - ''+ + ''+ + ''+ + ''+ ''+ '
'+ '
'+ @@ -207,11 +207,11 @@ RED.clipboard = (function() { '
'+ '
'+ '
'+ - ' '+ - ''+ + ' '+ + ''+ '
'+ '
'+ - ''+ + ''+ '
'+ '
'+ '
'+ @@ -221,9 +221,9 @@ RED.clipboard = (function() { '
'+ '
'+ ''+ - ''+ - ''+ - ''+ + ''+ + ''+ + ''+ ''+ '
'; @@ -255,7 +255,7 @@ RED.clipboard = (function() { clearTimeout(validateImportTimeout); } validateImportTimeout = setTimeout(function() { - var importInput = $("#clipboard-import"); + var importInput = $("#red-ui-clipboard-dialog-import-text"); var v = importInput.val().trim(); if (v === "") { popover.close(true); @@ -371,7 +371,7 @@ RED.clipboard = (function() { currentPopoverError = null; } if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") { - $("#clipboard-import").trigger("focus"); + $("#red-ui-clipboard-dialog-import-text").trigger("focus"); } else { libraryBrowser.focus(); } @@ -390,7 +390,7 @@ RED.clipboard = (function() { tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+mode); if (mode === 'clipboard') { setTimeout(function() { - $("#clipboard-import").trigger("focus"); + $("#red-ui-clipboard-dialog-import-text").trigger("focus"); },100) } @@ -418,10 +418,10 @@ RED.clipboard = (function() { $("#red-ui-clipboard-dialog-export").hide(); $("#red-ui-clipboard-dialog-download").hide(); $("#red-ui-clipboard-dialog-ok").button("disable"); - $("#clipboard-import").on("keyup", validateImport); - $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)}); + $("#red-ui-clipboard-dialog-import-text").on("keyup", validateImport); + $("#red-ui-clipboard-dialog-import-text").on('paste',function() { setTimeout(validateImport,10)}); - $("#import-tab > a").on("click", function(evt) { + $("#red-ui-clipboard-dialog-import-opt > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { return; @@ -430,22 +430,22 @@ RED.clipboard = (function() { $(this).addClass('selected'); }); - $("#import-file-upload").on("change", function() { + $("#red-ui-clipboard-dialog-import-file-upload").on("change", function() { var fileReader = new FileReader(); fileReader.onload = function () { - $("#clipboard-import").val(fileReader.result); + $("#red-ui-clipboard-dialog-import-text").val(fileReader.result); validateImport(); }; fileReader.readAsText($(this).prop('files')[0]); }) - $("#import-file-upload-btn").on("click", function(evt) { + $("#red-ui-clipboard-dialog-import-file-upload-btn").on("click", function(evt) { evt.preventDefault(); - $("#import-file-upload").trigger("click"); + $("#red-ui-clipboard-dialog-import-file-upload").trigger("click"); }) dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open"); popover = RED.popover.create({ - target: $("#clipboard-import"), + target: $("#red-ui-clipboard-dialog-import-text"), trigger: "manual", direction: "bottom", content: "" @@ -509,35 +509,35 @@ RED.clipboard = (function() { $("#red-ui-clipboard-dialog-tab-library-name").val("flows.json").select(); dialogContainer.i18n(); - var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini"; + var format = RED.settings.flowFilePretty ? "red-ui-clipboard-dialog-export-fmt-full" : "red-ui-clipboard-dialog-export-fmt-mini"; - $("#export-format-group > a").on("click", function(evt) { + $("#red-ui-clipboard-dialog-export-fmt-group > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { - $("#clipboard-export").trigger("focus"); + $("#red-ui-clipboard-dialog-export-text").trigger("focus"); return; } $(this).parent().children().removeClass('selected'); $(this).addClass('selected'); - var flow = $("#clipboard-export").val(); + var flow = $("#red-ui-clipboard-dialog-export-text").val(); if (flow.length > 0) { var nodes = JSON.parse(flow); format = $(this).attr('id'); - if (format === 'export-format-full') { + if (format === 'red-ui-clipboard-dialog-export-fmt-full') { flow = JSON.stringify(nodes,null,4); } else { flow = JSON.stringify(nodes); } - $("#clipboard-export").val(flow); - setTimeout(function() { $("#clipboard-export").scrollTop(0); },50); + $("#red-ui-clipboard-dialog-export-text").val(flow); + setTimeout(function() { $("#red-ui-clipboard-dialog-export-text").scrollTop(0); },50); - $("#clipboard-export").trigger("focus"); + $("#red-ui-clipboard-dialog-export-text").trigger("focus"); } }); - $("#export-range-group > a").on("click", function(evt) { + $("#red-ui-clipboard-dialog-export-rng-group > a").on("click", function(evt) { evt.preventDefault(); if ($(this).hasClass('disabled') || $(this).hasClass('selected')) { return; @@ -547,7 +547,7 @@ RED.clipboard = (function() { var type = $(this).attr('id'); var flow = ""; var nodes = null; - if (type === 'export-range-selected') { + if (type === 'red-ui-clipboard-dialog-export-rng-selected') { var selection = RED.workspaces.selection(); if (selection.length > 0) { nodes = []; @@ -560,30 +560,30 @@ RED.clipboard = (function() { } // Don't include the subflow meta-port nodes in the exported selection nodes = RED.nodes.createExportableNodeSet(nodes.filter(function(n) { return n.type !== 'subflow'})); - } else if (type === 'export-range-flow') { + } else if (type === 'red-ui-clipboard-dialog-export-rng-flow') { var activeWorkspace = RED.workspaces.active(); nodes = RED.nodes.filterNodes({z:activeWorkspace}); var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace); nodes.unshift(parentNode); nodes = RED.nodes.createExportableNodeSet(nodes); - } else if (type === 'export-range-full') { + } else if (type === 'red-ui-clipboard-dialog-export-rng-full') { nodes = RED.nodes.createCompleteNodeSet(false); } if (nodes !== null) { - if (format === "export-format-full") { + if (format === "red-ui-clipboard-dialog-export-fmt-full") { flow = JSON.stringify(nodes,null,4); } else { flow = JSON.stringify(nodes); } } if (flow.length > 0) { - $("#export-copy").removeClass('disabled'); + $("#red-ui-clipboard-dialog-export").removeClass('disabled'); } else { - $("#export-copy").addClass('disabled'); + $("#red-ui-clipboard-dialog-export").addClass('disabled'); } - $("#clipboard-export").val(flow); - setTimeout(function() { $("#clipboard-export").scrollTop(0); },50); - $("#clipboard-export").trigger("focus"); + $("#red-ui-clipboard-dialog-export-text").val(flow); + setTimeout(function() { $("#red-ui-clipboard-dialog-export-text").scrollTop(0); },50); + $("#red-ui-clipboard-dialog-export-text").trigger("focus"); }) $("#red-ui-clipboard-dialog-ok").hide(); @@ -591,24 +591,24 @@ RED.clipboard = (function() { $("#red-ui-clipboard-dialog-export").hide(); var selection = RED.workspaces.selection(); if (selection.length > 0) { - $("#export-range-selected").trigger("click"); + $("#red-ui-clipboard-dialog-export-rng-selected").trigger("click"); } else { selection = RED.view.selection(); if (selection.nodes) { - $("#export-range-selected").trigger("click"); + $("#red-ui-clipboard-dialog-export-rng-selected").trigger("click"); } else { - $("#export-range-selected").addClass('disabled').removeClass('selected'); - $("#export-range-flow").trigger("click"); + $("#red-ui-clipboard-dialog-export-rng-selected").addClass('disabled').removeClass('selected'); + $("#red-ui-clipboard-dialog-export-rng-flow").trigger("click"); } } - if (format === "export-format-full") { - $("#export-format-full").trigger("click"); + if (format === "red-ui-clipboard-dialog-export-fmt-full") { + $("#red-ui-clipboard-dialog-export-fmt-full").trigger("click"); } else { - $("#export-format-mini").trigger("click"); + $("#red-ui-clipboard-dialog-export-fmt-mini").trigger("click"); } dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" ); - $("#clipboard-export").trigger("focus"); + $("#red-ui-clipboard-dialog-export-text").trigger("focus"); $("#red-ui-clipboard-dialog-cancel").show(); $("#red-ui-clipboard-dialog-export").show(); $("#red-ui-clipboard-dialog-download").show(); diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js index effb176e4..a67e5fccd 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/diff.js @@ -1003,11 +1003,11 @@ RED.diff = (function() { className = "red-ui-diff-selectbox-tab-"+node.id.replace(/\./g,'-'); $("."+className+"-"+this.value).prop('checked',true); if (this.value === 'local') { - $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("node-diff-select-local"); - $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("node-diff-select-remote"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("red-ui-diff-select-local"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("red-ui-diff-select-remote"); } else { - $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("node-diff-select-local"); - $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("node-diff-select-remote"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("red-ui-diff-select-local"); + $("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("red-ui-diff-select-remote"); } } else { // Individual node or properties table @@ -1015,15 +1015,15 @@ RED.diff = (function() { $('#'+parentId+"-local").prop('checked',false); $('#'+parentId+"-remote").prop('checked',false); var titleRowDiv = $('#'+parentId+"-local").closest(".red-ui-diff-list-flow").find(".red-ui-diff-list-flow-title"); - titleRowDiv.removeClass("node-diff-select-local"); - titleRowDiv.removeClass("node-diff-select-remote"); + titleRowDiv.removeClass("red-ui-diff-select-local"); + titleRowDiv.removeClass("red-ui-diff-select-remote"); } if (this.value === 'local') { - row.removeClass("node-diff-select-remote"); - row.addClass("node-diff-select-local"); + row.removeClass("red-ui-diff-select-remote"); + row.addClass("red-ui-diff-select-local"); } else if (this.value === 'remote') { - row.addClass("node-diff-select-remote"); - row.removeClass("node-diff-select-local"); + row.addClass("red-ui-diff-select-remote"); + row.removeClass("red-ui-diff-select-local"); } refreshConflictHeader(diff); } @@ -1058,8 +1058,8 @@ RED.diff = (function() { $("#red-ui-diff-dialog-toolbar-resolved-conflicts").html(' '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount})); } if (conflictCount === resolutionCount) { - $("#node-diff-view-diff-merge").removeClass('disabled'); - $("#node-diff-view-resolve-diff").removeClass('disabled'); + $("#red-ui-diff-view-diff-merge").removeClass('disabled'); + $("#red-ui-diff-view-resolve-diff").removeClass('disabled'); } } function getRemoteDiff(callback) { @@ -1264,14 +1264,14 @@ RED.diff = (function() { var diffTable = buildDiffPanel(diffContainer,diff,options); diffTable.list.hide(); if (remoteDiff) { - $("#node-diff-view-diff-merge").show(); + $("#red-ui-diff-view-diff-merge").show(); if (Object.keys(conflicts).length === 0) { - $("#node-diff-view-diff-merge").removeClass('disabled'); + $("#red-ui-diff-view-diff-merge").removeClass('disabled'); } else { - $("#node-diff-view-diff-merge").addClass('disabled'); + $("#red-ui-diff-view-diff-merge").addClass('disabled'); } } else { - $("#node-diff-view-diff-merge").hide(); + $("#red-ui-diff-view-diff-merge").hide(); } refreshConflictHeader(diff); // console.log("--------------"); @@ -1296,11 +1296,11 @@ RED.diff = (function() { if (options.mode === 'merge') { trayOptions.buttons.push( { - id: "node-diff-view-diff-merge", + id: "red-ui-diff-view-diff-merge", text: RED._("deploy.confirm.button.merge"), class: "primary disabled", click: function() { - if (!$("#node-diff-view-diff-merge").hasClass('disabled')) { + if (!$("#red-ui-diff-view-diff-merge").hasClass('disabled')) { refreshConflictHeader(diff); mergeDiff(diff); RED.tray.close(); @@ -1753,7 +1753,7 @@ RED.diff = (function() { $('').appendTo(content); } var diffRow = $('').appendTo(codeBody); - var flowDiffContent = $('').appendTo(diffRow); + var flowDiffContent = $('').appendTo(diffRow); var projectName = commitOptions.project.name; var filename = commitOptions.project.files.flow; @@ -2033,7 +2033,7 @@ RED.diff = (function() { options.resolveConflict = function(results) { currentResolution = results; if (results.conflicts === results.resolved) { - $("#node-diff-view-resolve-diff").removeClass('disabled'); + $("#red-ui-diff-view-resolve-diff").removeClass('disabled'); } } } @@ -2071,11 +2071,11 @@ RED.diff = (function() { if (options.unmerged) { trayOptions.buttons.push( { - id: "node-diff-view-resolve-diff", + id: "red-ui-diff-view-resolve-diff", text: RED._("diff.saveConflict"), class: "primary disabled", click: function() { - if (!$("#node-diff-view-resolve-diff").hasClass('disabled')) { + if (!$("#red-ui-diff-view-resolve-diff").hasClass('disabled')) { if (options.currentDiff) { // This is a flow file. Need to apply the diff // and generate the new flow. diff --git a/packages/node_modules/@node-red/editor-client/src/sass/diff.scss b/packages/node_modules/@node-red/editor-client/src/sass/diff.scss index d54656d20..a8b16ca11 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/diff.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/diff.scss @@ -450,7 +450,7 @@ label.red-ui-diff-selectbox { } } -.red-ui-diff-list-node-conflict.node-diff-select-remote { +.red-ui-diff-list-node-conflict.red-ui-diff-select-remote { .red-ui-diff-list-node-remote { background: $diff-state-added-background; label { @@ -464,7 +464,7 @@ label.red-ui-diff-selectbox { } } } -.red-ui-diff-list-node-conflict.node-diff-select-local { +.red-ui-diff-list-node-conflict.red-ui-diff-select-local { .red-ui-diff-list-node-local { background: $diff-state-added-background; label { @@ -648,7 +648,7 @@ ul.red-ui-deploy-dialog-confirm-list { } } - tr.red-ui-diff-text-header > td:not(.flow-diff) { + tr.red-ui-diff-text-header > td:not(.red-ui-diff-flow-diff) { font-family: $monospace-font; padding: 5px 10px; text-align: left; diff --git a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss index dd259fbc8..46dcfddb2 100644 --- a/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss +++ b/packages/node_modules/@node-red/editor-client/src/sass/sidebar.scss @@ -103,7 +103,7 @@ button.red-ui-sidebar-header-button-toggle { padding: 5px 8px; } -.sidebar-header-button, /* Deprecated -> red-ui-sidebar-header-button */ +.sidebar-header-button:not(:first-child), /* Deprecated -> red-ui-sidebar-header-button */ .red-ui-sidebar-header-button:not(:first-child) { border-left: none; }