mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Tidy up remaining css classes
This commit is contained in:
parent
3a257e1e00
commit
42ab6deff1
@ -1,4 +1,4 @@
|
|||||||
/**
|
red-ui-clipboard-dialog-import-opt/**
|
||||||
* Copyright JS Foundation and other contributors, http://js.foundation
|
* Copyright JS Foundation and other contributors, http://js.foundation
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -54,7 +54,7 @@ RED.clipboard = (function() {
|
|||||||
text: RED._("clipboard.download"),
|
text: RED._("clipboard.download"),
|
||||||
click: function() {
|
click: function() {
|
||||||
var element = document.createElement('a');
|
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.setAttribute('download', "flows.json");
|
||||||
element.style.display = 'none';
|
element.style.display = 'none';
|
||||||
document.body.appendChild(element);
|
document.body.appendChild(element);
|
||||||
@ -69,13 +69,13 @@ RED.clipboard = (function() {
|
|||||||
text: RED._("clipboard.export.copy"),
|
text: RED._("clipboard.export.copy"),
|
||||||
click: function() {
|
click: function() {
|
||||||
if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") {
|
if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") {
|
||||||
$("#clipboard-export").select();
|
$("#red-ui-clipboard-dialog-export-text").select();
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.getSelection().removeAllRanges();
|
document.getSelection().removeAllRanges();
|
||||||
RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"});
|
RED.notify(RED._("clipboard.nodesExported"),{id:"clipboard"});
|
||||||
$( this ).dialog( "close" );
|
$( this ).dialog( "close" );
|
||||||
} else {
|
} else {
|
||||||
var flowToExport = $("#clipboard-export").val();
|
var flowToExport = $("#red-ui-clipboard-dialog-export-text").val();
|
||||||
var selectedPath = libraryBrowser.getSelected();
|
var selectedPath = libraryBrowser.getSelected();
|
||||||
if (!selectedPath.children) {
|
if (!selectedPath.children) {
|
||||||
selectedPath = selectedPath.parent;
|
selectedPath = selectedPath.parent;
|
||||||
@ -138,9 +138,9 @@ RED.clipboard = (function() {
|
|||||||
class: "primary",
|
class: "primary",
|
||||||
text: RED._("common.label.import"),
|
text: RED._("common.label.import"),
|
||||||
click: function() {
|
click: function() {
|
||||||
var addNewFlow = ($("#import-tab > a.selected").attr('id') === 'import-tab-new');
|
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-import-tab-clipboard") {
|
if (activeTab === "red-ui-clipboard-dialog-red-ui-clipboard-dialog-import-opt-clipboard") {
|
||||||
RED.view.importNodes($("#clipboard-import").val(),addNewFlow);
|
RED.view.importNodes($("#red-ui-clipboard-dialog-import-text").val(),addNewFlow);
|
||||||
} else {
|
} else {
|
||||||
var selectedPath = libraryBrowser.getSelected();
|
var selectedPath = libraryBrowser.getSelected();
|
||||||
if (selectedPath.path) {
|
if (selectedPath.path) {
|
||||||
@ -166,10 +166,10 @@ RED.clipboard = (function() {
|
|||||||
exportNodesDialog =
|
exportNodesDialog =
|
||||||
'<div class="form-row">'+
|
'<div class="form-row">'+
|
||||||
'<label style="width:auto;margin-right: 10px;" data-i18n="common.label.export"></label>'+
|
'<label style="width:auto;margin-right: 10px;" data-i18n="common.label.export"></label>'+
|
||||||
'<span id="export-range-group" class="button-group">'+
|
'<span id="red-ui-clipboard-dialog-export-rng-group" class="button-group">'+
|
||||||
'<a id="export-range-selected" class="editor-button toggle" href="#" data-i18n="clipboard.export.selected"></a>'+
|
'<a id="red-ui-clipboard-dialog-export-rng-selected" class="editor-button toggle" href="#" data-i18n="clipboard.export.selected"></a>'+
|
||||||
'<a id="export-range-flow" class="editor-button toggle" href="#" data-i18n="clipboard.export.current"></a>'+
|
'<a id="red-ui-clipboard-dialog-export-rng-flow" class="editor-button toggle" href="#" data-i18n="clipboard.export.current"></a>'+
|
||||||
'<a id="export-range-full" class="editor-button toggle" href="#" data-i18n="clipboard.export.all"></a>'+
|
'<a id="red-ui-clipboard-dialog-export-rng-full" class="editor-button toggle" href="#" data-i18n="clipboard.export.all"></a>'+
|
||||||
'</span>'+
|
'</span>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div class="red-ui-clipboard-dialog-box">'+
|
'<div class="red-ui-clipboard-dialog-box">'+
|
||||||
@ -179,12 +179,12 @@ RED.clipboard = (function() {
|
|||||||
'<div id="red-ui-clipboard-dialog-export-tabs-content" class="red-ui-clipboard-dialog-tabs-content">'+
|
'<div id="red-ui-clipboard-dialog-export-tabs-content" class="red-ui-clipboard-dialog-tabs-content">'+
|
||||||
'<div id="red-ui-clipboard-dialog-export-tab-clipboard" class="red-ui-clipboard-dialog-tab-clipboard">'+
|
'<div id="red-ui-clipboard-dialog-export-tab-clipboard" class="red-ui-clipboard-dialog-tab-clipboard">'+
|
||||||
'<div class="form-row">'+
|
'<div class="form-row">'+
|
||||||
'<textarea readonly id="clipboard-export"></textarea>'+
|
'<textarea readonly id="red-ui-clipboard-dialog-export-text"></textarea>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div class="form-row" style="text-align: right;">'+
|
'<div class="form-row" style="text-align: right;">'+
|
||||||
'<span id="export-format-group" class="button-group">'+
|
'<span id="red-ui-clipboard-dialog-export-fmt-group" class="button-group">'+
|
||||||
'<a id="export-format-mini" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.compact"></a>'+
|
'<a id="red-ui-clipboard-dialog-export-fmt-mini" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.compact"></a>'+
|
||||||
'<a id="export-format-full" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.formatted"></a>'+
|
'<a id="red-ui-clipboard-dialog-export-fmt-full" class="editor-button editor-button-small toggle" href="#" data-i18n="clipboard.export.formatted"></a>'+
|
||||||
'</span>'+
|
'</span>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
@ -207,11 +207,11 @@ RED.clipboard = (function() {
|
|||||||
'<div id="red-ui-clipboard-dialog-import-tabs-content" class="red-ui-clipboard-dialog-tabs-content">'+
|
'<div id="red-ui-clipboard-dialog-import-tabs-content" class="red-ui-clipboard-dialog-tabs-content">'+
|
||||||
'<div id="red-ui-clipboard-dialog-import-tab-clipboard" class="red-ui-clipboard-dialog-tab-clipboard">'+
|
'<div id="red-ui-clipboard-dialog-import-tab-clipboard" class="red-ui-clipboard-dialog-tab-clipboard">'+
|
||||||
'<div class="form-row"><span data-i18n="clipboard.pasteNodes"></span>'+
|
'<div class="form-row"><span data-i18n="clipboard.pasteNodes"></span>'+
|
||||||
' <a class="editor-button" id="import-file-upload-btn"><i class="fa fa-upload"></i> <span data-i18n="clipboard.selectFile"></span></a>'+
|
' <a class="editor-button" id="red-ui-clipboard-dialog-import-file-upload-btn"><i class="fa fa-upload"></i> <span data-i18n="clipboard.selectFile"></span></a>'+
|
||||||
'<input type="file" id="import-file-upload" accept=".json" style="display:none">'+
|
'<input type="file" id="red-ui-clipboard-dialog-import-file-upload" accept=".json" style="display:none">'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div class="form-row">'+
|
'<div class="form-row">'+
|
||||||
'<textarea id="clipboard-import"></textarea>'+
|
'<textarea id="red-ui-clipboard-dialog-import-text"></textarea>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'</div>'+
|
'</div>'+
|
||||||
'<div id="red-ui-clipboard-dialog-import-tab-library" class="red-ui-clipboard-dialog-tab-library">'+
|
'<div id="red-ui-clipboard-dialog-import-tab-library" class="red-ui-clipboard-dialog-tab-library">'+
|
||||||
@ -221,9 +221,9 @@ RED.clipboard = (function() {
|
|||||||
'</div>'+
|
'</div>'+
|
||||||
'<div class="form-row">'+
|
'<div class="form-row">'+
|
||||||
'<label style="width:auto;margin-right: 10px;" data-i18n="clipboard.import.import"></label>'+
|
'<label style="width:auto;margin-right: 10px;" data-i18n="clipboard.import.import"></label>'+
|
||||||
'<span id="import-tab" class="button-group">'+
|
'<span id="red-ui-clipboard-dialog-import-opt" class="button-group">'+
|
||||||
'<a id="import-tab-current" class="editor-button toggle selected" href="#" data-i18n="clipboard.export.current"></a>'+
|
'<a id="red-ui-clipboard-dialog-import-opt-current" class="editor-button toggle selected" href="#" data-i18n="clipboard.export.current"></a>'+
|
||||||
'<a id="import-tab-new" class="editor-button toggle" href="#" data-i18n="clipboard.import.newFlow"></a>'+
|
'<a id="red-ui-clipboard-dialog-import-opt-new" class="editor-button toggle" href="#" data-i18n="clipboard.import.newFlow"></a>'+
|
||||||
'</span>'+
|
'</span>'+
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ RED.clipboard = (function() {
|
|||||||
clearTimeout(validateImportTimeout);
|
clearTimeout(validateImportTimeout);
|
||||||
}
|
}
|
||||||
validateImportTimeout = setTimeout(function() {
|
validateImportTimeout = setTimeout(function() {
|
||||||
var importInput = $("#clipboard-import");
|
var importInput = $("#red-ui-clipboard-dialog-import-text");
|
||||||
var v = importInput.val().trim();
|
var v = importInput.val().trim();
|
||||||
if (v === "") {
|
if (v === "") {
|
||||||
popover.close(true);
|
popover.close(true);
|
||||||
@ -371,7 +371,7 @@ RED.clipboard = (function() {
|
|||||||
currentPopoverError = null;
|
currentPopoverError = null;
|
||||||
}
|
}
|
||||||
if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") {
|
if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") {
|
||||||
$("#clipboard-import").trigger("focus");
|
$("#red-ui-clipboard-dialog-import-text").trigger("focus");
|
||||||
} else {
|
} else {
|
||||||
libraryBrowser.focus();
|
libraryBrowser.focus();
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ RED.clipboard = (function() {
|
|||||||
tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+mode);
|
tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+mode);
|
||||||
if (mode === 'clipboard') {
|
if (mode === 'clipboard') {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$("#clipboard-import").trigger("focus");
|
$("#red-ui-clipboard-dialog-import-text").trigger("focus");
|
||||||
},100)
|
},100)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,10 +418,10 @@ RED.clipboard = (function() {
|
|||||||
$("#red-ui-clipboard-dialog-export").hide();
|
$("#red-ui-clipboard-dialog-export").hide();
|
||||||
$("#red-ui-clipboard-dialog-download").hide();
|
$("#red-ui-clipboard-dialog-download").hide();
|
||||||
$("#red-ui-clipboard-dialog-ok").button("disable");
|
$("#red-ui-clipboard-dialog-ok").button("disable");
|
||||||
$("#clipboard-import").on("keyup", validateImport);
|
$("#red-ui-clipboard-dialog-import-text").on("keyup", validateImport);
|
||||||
$("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
|
$("#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();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
||||||
return;
|
return;
|
||||||
@ -430,22 +430,22 @@ RED.clipboard = (function() {
|
|||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#import-file-upload").on("change", function() {
|
$("#red-ui-clipboard-dialog-import-file-upload").on("change", function() {
|
||||||
var fileReader = new FileReader();
|
var fileReader = new FileReader();
|
||||||
fileReader.onload = function () {
|
fileReader.onload = function () {
|
||||||
$("#clipboard-import").val(fileReader.result);
|
$("#red-ui-clipboard-dialog-import-text").val(fileReader.result);
|
||||||
validateImport();
|
validateImport();
|
||||||
};
|
};
|
||||||
fileReader.readAsText($(this).prop('files')[0]);
|
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();
|
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");
|
dialog.dialog("option","title",RED._("clipboard.importNodes")).dialog("open");
|
||||||
popover = RED.popover.create({
|
popover = RED.popover.create({
|
||||||
target: $("#clipboard-import"),
|
target: $("#red-ui-clipboard-dialog-import-text"),
|
||||||
trigger: "manual",
|
trigger: "manual",
|
||||||
direction: "bottom",
|
direction: "bottom",
|
||||||
content: ""
|
content: ""
|
||||||
@ -509,35 +509,35 @@ RED.clipboard = (function() {
|
|||||||
$("#red-ui-clipboard-dialog-tab-library-name").val("flows.json").select();
|
$("#red-ui-clipboard-dialog-tab-library-name").val("flows.json").select();
|
||||||
|
|
||||||
dialogContainer.i18n();
|
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();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
||||||
$("#clipboard-export").trigger("focus");
|
$("#red-ui-clipboard-dialog-export-text").trigger("focus");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$(this).parent().children().removeClass('selected');
|
$(this).parent().children().removeClass('selected');
|
||||||
$(this).addClass('selected');
|
$(this).addClass('selected');
|
||||||
|
|
||||||
var flow = $("#clipboard-export").val();
|
var flow = $("#red-ui-clipboard-dialog-export-text").val();
|
||||||
if (flow.length > 0) {
|
if (flow.length > 0) {
|
||||||
var nodes = JSON.parse(flow);
|
var nodes = JSON.parse(flow);
|
||||||
|
|
||||||
format = $(this).attr('id');
|
format = $(this).attr('id');
|
||||||
if (format === 'export-format-full') {
|
if (format === 'red-ui-clipboard-dialog-export-fmt-full') {
|
||||||
flow = JSON.stringify(nodes,null,4);
|
flow = JSON.stringify(nodes,null,4);
|
||||||
} else {
|
} else {
|
||||||
flow = JSON.stringify(nodes);
|
flow = JSON.stringify(nodes);
|
||||||
}
|
}
|
||||||
$("#clipboard-export").val(flow);
|
$("#red-ui-clipboard-dialog-export-text").val(flow);
|
||||||
setTimeout(function() { $("#clipboard-export").scrollTop(0); },50);
|
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();
|
evt.preventDefault();
|
||||||
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
if ($(this).hasClass('disabled') || $(this).hasClass('selected')) {
|
||||||
return;
|
return;
|
||||||
@ -547,7 +547,7 @@ RED.clipboard = (function() {
|
|||||||
var type = $(this).attr('id');
|
var type = $(this).attr('id');
|
||||||
var flow = "";
|
var flow = "";
|
||||||
var nodes = null;
|
var nodes = null;
|
||||||
if (type === 'export-range-selected') {
|
if (type === 'red-ui-clipboard-dialog-export-rng-selected') {
|
||||||
var selection = RED.workspaces.selection();
|
var selection = RED.workspaces.selection();
|
||||||
if (selection.length > 0) {
|
if (selection.length > 0) {
|
||||||
nodes = [];
|
nodes = [];
|
||||||
@ -560,30 +560,30 @@ RED.clipboard = (function() {
|
|||||||
}
|
}
|
||||||
// Don't include the subflow meta-port nodes in the exported selection
|
// Don't include the subflow meta-port nodes in the exported selection
|
||||||
nodes = RED.nodes.createExportableNodeSet(nodes.filter(function(n) { return n.type !== 'subflow'}));
|
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();
|
var activeWorkspace = RED.workspaces.active();
|
||||||
nodes = RED.nodes.filterNodes({z:activeWorkspace});
|
nodes = RED.nodes.filterNodes({z:activeWorkspace});
|
||||||
var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace);
|
var parentNode = RED.nodes.workspace(activeWorkspace)||RED.nodes.subflow(activeWorkspace);
|
||||||
nodes.unshift(parentNode);
|
nodes.unshift(parentNode);
|
||||||
nodes = RED.nodes.createExportableNodeSet(nodes);
|
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);
|
nodes = RED.nodes.createCompleteNodeSet(false);
|
||||||
}
|
}
|
||||||
if (nodes !== null) {
|
if (nodes !== null) {
|
||||||
if (format === "export-format-full") {
|
if (format === "red-ui-clipboard-dialog-export-fmt-full") {
|
||||||
flow = JSON.stringify(nodes,null,4);
|
flow = JSON.stringify(nodes,null,4);
|
||||||
} else {
|
} else {
|
||||||
flow = JSON.stringify(nodes);
|
flow = JSON.stringify(nodes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flow.length > 0) {
|
if (flow.length > 0) {
|
||||||
$("#export-copy").removeClass('disabled');
|
$("#red-ui-clipboard-dialog-export").removeClass('disabled');
|
||||||
} else {
|
} else {
|
||||||
$("#export-copy").addClass('disabled');
|
$("#red-ui-clipboard-dialog-export").addClass('disabled');
|
||||||
}
|
}
|
||||||
$("#clipboard-export").val(flow);
|
$("#red-ui-clipboard-dialog-export-text").val(flow);
|
||||||
setTimeout(function() { $("#clipboard-export").scrollTop(0); },50);
|
setTimeout(function() { $("#red-ui-clipboard-dialog-export-text").scrollTop(0); },50);
|
||||||
$("#clipboard-export").trigger("focus");
|
$("#red-ui-clipboard-dialog-export-text").trigger("focus");
|
||||||
})
|
})
|
||||||
|
|
||||||
$("#red-ui-clipboard-dialog-ok").hide();
|
$("#red-ui-clipboard-dialog-ok").hide();
|
||||||
@ -591,24 +591,24 @@ RED.clipboard = (function() {
|
|||||||
$("#red-ui-clipboard-dialog-export").hide();
|
$("#red-ui-clipboard-dialog-export").hide();
|
||||||
var selection = RED.workspaces.selection();
|
var selection = RED.workspaces.selection();
|
||||||
if (selection.length > 0) {
|
if (selection.length > 0) {
|
||||||
$("#export-range-selected").trigger("click");
|
$("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
selection = RED.view.selection();
|
selection = RED.view.selection();
|
||||||
if (selection.nodes) {
|
if (selection.nodes) {
|
||||||
$("#export-range-selected").trigger("click");
|
$("#red-ui-clipboard-dialog-export-rng-selected").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
$("#export-range-selected").addClass('disabled').removeClass('selected');
|
$("#red-ui-clipboard-dialog-export-rng-selected").addClass('disabled').removeClass('selected');
|
||||||
$("#export-range-flow").trigger("click");
|
$("#red-ui-clipboard-dialog-export-rng-flow").trigger("click");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (format === "export-format-full") {
|
if (format === "red-ui-clipboard-dialog-export-fmt-full") {
|
||||||
$("#export-format-full").trigger("click");
|
$("#red-ui-clipboard-dialog-export-fmt-full").trigger("click");
|
||||||
} else {
|
} else {
|
||||||
$("#export-format-mini").trigger("click");
|
$("#red-ui-clipboard-dialog-export-fmt-mini").trigger("click");
|
||||||
}
|
}
|
||||||
dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" );
|
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-cancel").show();
|
||||||
$("#red-ui-clipboard-dialog-export").show();
|
$("#red-ui-clipboard-dialog-export").show();
|
||||||
$("#red-ui-clipboard-dialog-download").show();
|
$("#red-ui-clipboard-dialog-download").show();
|
||||||
|
@ -1003,11 +1003,11 @@ RED.diff = (function() {
|
|||||||
className = "red-ui-diff-selectbox-tab-"+node.id.replace(/\./g,'-');
|
className = "red-ui-diff-selectbox-tab-"+node.id.replace(/\./g,'-');
|
||||||
$("."+className+"-"+this.value).prop('checked',true);
|
$("."+className+"-"+this.value).prop('checked',true);
|
||||||
if (this.value === 'local') {
|
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").addClass("red-ui-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").removeClass("red-ui-diff-select-remote");
|
||||||
} else {
|
} else {
|
||||||
$("."+className+"-"+this.value).closest(".red-ui-diff-list-node").removeClass("node-diff-select-local");
|
$("."+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("node-diff-select-remote");
|
$("."+className+"-"+this.value).closest(".red-ui-diff-list-node").addClass("red-ui-diff-select-remote");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Individual node or properties table
|
// Individual node or properties table
|
||||||
@ -1015,15 +1015,15 @@ RED.diff = (function() {
|
|||||||
$('#'+parentId+"-local").prop('checked',false);
|
$('#'+parentId+"-local").prop('checked',false);
|
||||||
$('#'+parentId+"-remote").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");
|
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("red-ui-diff-select-local");
|
||||||
titleRowDiv.removeClass("node-diff-select-remote");
|
titleRowDiv.removeClass("red-ui-diff-select-remote");
|
||||||
}
|
}
|
||||||
if (this.value === 'local') {
|
if (this.value === 'local') {
|
||||||
row.removeClass("node-diff-select-remote");
|
row.removeClass("red-ui-diff-select-remote");
|
||||||
row.addClass("node-diff-select-local");
|
row.addClass("red-ui-diff-select-local");
|
||||||
} else if (this.value === 'remote') {
|
} else if (this.value === 'remote') {
|
||||||
row.addClass("node-diff-select-remote");
|
row.addClass("red-ui-diff-select-remote");
|
||||||
row.removeClass("node-diff-select-local");
|
row.removeClass("red-ui-diff-select-local");
|
||||||
}
|
}
|
||||||
refreshConflictHeader(diff);
|
refreshConflictHeader(diff);
|
||||||
}
|
}
|
||||||
@ -1058,8 +1058,8 @@ RED.diff = (function() {
|
|||||||
$("#red-ui-diff-dialog-toolbar-resolved-conflicts").html('<span class="red-ui-diff-status-conflict"><span class="red-ui-diff-status"><i class="fa fa-exclamation"></i></span></span> '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount}));
|
$("#red-ui-diff-dialog-toolbar-resolved-conflicts").html('<span class="red-ui-diff-status-conflict"><span class="red-ui-diff-status"><i class="fa fa-exclamation"></i></span></span> '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount}));
|
||||||
}
|
}
|
||||||
if (conflictCount === resolutionCount) {
|
if (conflictCount === resolutionCount) {
|
||||||
$("#node-diff-view-diff-merge").removeClass('disabled');
|
$("#red-ui-diff-view-diff-merge").removeClass('disabled');
|
||||||
$("#node-diff-view-resolve-diff").removeClass('disabled');
|
$("#red-ui-diff-view-resolve-diff").removeClass('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getRemoteDiff(callback) {
|
function getRemoteDiff(callback) {
|
||||||
@ -1264,14 +1264,14 @@ RED.diff = (function() {
|
|||||||
var diffTable = buildDiffPanel(diffContainer,diff,options);
|
var diffTable = buildDiffPanel(diffContainer,diff,options);
|
||||||
diffTable.list.hide();
|
diffTable.list.hide();
|
||||||
if (remoteDiff) {
|
if (remoteDiff) {
|
||||||
$("#node-diff-view-diff-merge").show();
|
$("#red-ui-diff-view-diff-merge").show();
|
||||||
if (Object.keys(conflicts).length === 0) {
|
if (Object.keys(conflicts).length === 0) {
|
||||||
$("#node-diff-view-diff-merge").removeClass('disabled');
|
$("#red-ui-diff-view-diff-merge").removeClass('disabled');
|
||||||
} else {
|
} else {
|
||||||
$("#node-diff-view-diff-merge").addClass('disabled');
|
$("#red-ui-diff-view-diff-merge").addClass('disabled');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$("#node-diff-view-diff-merge").hide();
|
$("#red-ui-diff-view-diff-merge").hide();
|
||||||
}
|
}
|
||||||
refreshConflictHeader(diff);
|
refreshConflictHeader(diff);
|
||||||
// console.log("--------------");
|
// console.log("--------------");
|
||||||
@ -1296,11 +1296,11 @@ RED.diff = (function() {
|
|||||||
if (options.mode === 'merge') {
|
if (options.mode === 'merge') {
|
||||||
trayOptions.buttons.push(
|
trayOptions.buttons.push(
|
||||||
{
|
{
|
||||||
id: "node-diff-view-diff-merge",
|
id: "red-ui-diff-view-diff-merge",
|
||||||
text: RED._("deploy.confirm.button.merge"),
|
text: RED._("deploy.confirm.button.merge"),
|
||||||
class: "primary disabled",
|
class: "primary disabled",
|
||||||
click: function() {
|
click: function() {
|
||||||
if (!$("#node-diff-view-diff-merge").hasClass('disabled')) {
|
if (!$("#red-ui-diff-view-diff-merge").hasClass('disabled')) {
|
||||||
refreshConflictHeader(diff);
|
refreshConflictHeader(diff);
|
||||||
mergeDiff(diff);
|
mergeDiff(diff);
|
||||||
RED.tray.close();
|
RED.tray.close();
|
||||||
@ -1753,7 +1753,7 @@ RED.diff = (function() {
|
|||||||
$('<span style="float: right;"><span id="red-ui-diff-dialog-toolbar-resolved-conflicts"></span></span>').appendTo(content);
|
$('<span style="float: right;"><span id="red-ui-diff-dialog-toolbar-resolved-conflicts"></span></span>').appendTo(content);
|
||||||
}
|
}
|
||||||
var diffRow = $('<tr class="red-ui-diff-text-header">').appendTo(codeBody);
|
var diffRow = $('<tr class="red-ui-diff-text-header">').appendTo(codeBody);
|
||||||
var flowDiffContent = $('<td class="flow-diff" colspan="3"></td>').appendTo(diffRow);
|
var flowDiffContent = $('<td class="red-ui-diff-flow-diff" colspan="3"></td>').appendTo(diffRow);
|
||||||
|
|
||||||
var projectName = commitOptions.project.name;
|
var projectName = commitOptions.project.name;
|
||||||
var filename = commitOptions.project.files.flow;
|
var filename = commitOptions.project.files.flow;
|
||||||
@ -2033,7 +2033,7 @@ RED.diff = (function() {
|
|||||||
options.resolveConflict = function(results) {
|
options.resolveConflict = function(results) {
|
||||||
currentResolution = results;
|
currentResolution = results;
|
||||||
if (results.conflicts === results.resolved) {
|
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) {
|
if (options.unmerged) {
|
||||||
trayOptions.buttons.push(
|
trayOptions.buttons.push(
|
||||||
{
|
{
|
||||||
id: "node-diff-view-resolve-diff",
|
id: "red-ui-diff-view-resolve-diff",
|
||||||
text: RED._("diff.saveConflict"),
|
text: RED._("diff.saveConflict"),
|
||||||
class: "primary disabled",
|
class: "primary disabled",
|
||||||
click: function() {
|
click: function() {
|
||||||
if (!$("#node-diff-view-resolve-diff").hasClass('disabled')) {
|
if (!$("#red-ui-diff-view-resolve-diff").hasClass('disabled')) {
|
||||||
if (options.currentDiff) {
|
if (options.currentDiff) {
|
||||||
// This is a flow file. Need to apply the diff
|
// This is a flow file. Need to apply the diff
|
||||||
// and generate the new flow.
|
// and generate the new flow.
|
||||||
|
@ -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 {
|
.red-ui-diff-list-node-remote {
|
||||||
background: $diff-state-added-background;
|
background: $diff-state-added-background;
|
||||||
label {
|
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 {
|
.red-ui-diff-list-node-local {
|
||||||
background: $diff-state-added-background;
|
background: $diff-state-added-background;
|
||||||
label {
|
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;
|
font-family: $monospace-font;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
@ -103,7 +103,7 @@ button.red-ui-sidebar-header-button-toggle {
|
|||||||
padding: 5px 8px;
|
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) {
|
.red-ui-sidebar-header-button:not(:first-child) {
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user