'+
+ '
'+
+ '
'+
'
'+
'
'+
- ''+
+ ''+
'
'+
'
'+
- '
'+
'
'+
'
';
@@ -233,33 +235,33 @@ RED.clipboard = (function() {
clearTimeout(validateExportFilenameTimeout);
}
validateExportFilenameTimeout = setTimeout(function() {
- var filenameInput = $("#clipboard-dialog-tab-library-name");
+ var filenameInput = $("#red-ui-clipboard-dialog-tab-library-name");
var filename = filenameInput.val().trim();
var valid = filename.length > 0 && !/[\/\\]/.test(filename);
if (valid) {
filenameInput.removeClass("input-error");
- $("#clipboard-dialog-export").button("enable");
+ $("#red-ui-clipboard-dialog-export").button("enable");
} else {
filenameInput.addClass("input-error");
- $("#clipboard-dialog-export").button("disable");
+ $("#red-ui-clipboard-dialog-export").button("disable");
}
},100);
}
var validateImportTimeout;
function validateImport() {
- if (activeTab === "clipboard-dialog-import-tab-clipboard") {
+ if (activeTab === "red-ui-clipboard-dialog-import-tab-clipboard") {
if (validateImportTimeout) {
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);
currentPopoverError = null;
importInput.removeClass("input-error");
- $("#clipboard-dialog-ok").button("disable");
+ $("#red-ui-clipboard-dialog-ok").button("disable");
return;
}
try {
@@ -282,7 +284,7 @@ RED.clipboard = (function() {
popover.close(true);
importInput.removeClass("input-error");
importInput.val(v);
- $("#clipboard-dialog-ok").button("enable");
+ $("#red-ui-clipboard-dialog-ok").button("enable");
} catch(err) {
if (v !== "") {
importInput.addClass("input-error");
@@ -296,7 +298,7 @@ RED.clipboard = (function() {
// which is the least useful, but most consistent message
// - use a custom/library parser that gives consistent messages
// which can be translated.
- var message = $('
').text(errString);
+ var message = $('
').text(errString);
var errorPos;
// Chrome error messages
var m = /at position (\d+)/i.exec(errString);
@@ -335,15 +337,15 @@ RED.clipboard = (function() {
} else {
currentPopoverError = null;
}
- $("#clipboard-dialog-ok").button("disable");
+ $("#red-ui-clipboard-dialog-ok").button("disable");
}
},100);
} else {
var file = libraryBrowser.getSelected();
if (file && file.label && !file.children) {
- $("#clipboard-dialog-ok").button("enable");
+ $("#red-ui-clipboard-dialog-ok").button("enable");
} else {
- $("#clipboard-dialog-ok").button("disable");
+ $("#red-ui-clipboard-dialog-ok").button("disable");
}
}
}
@@ -358,18 +360,18 @@ RED.clipboard = (function() {
dialogContainer.append($(importNodesDialog));
var tabs = RED.tabs.create({
- id: "clipboard-dialog-import-tabs",
+ id: "red-ui-clipboard-dialog-import-tabs",
vertical: true,
onchange: function(tab) {
- $("#clipboard-dialog-import-tabs-content").children().hide();
+ $("#red-ui-clipboard-dialog-import-tabs-content").children().hide();
$("#" + tab.id).show();
activeTab = tab.id;
if (popover) {
popover.close(true);
currentPopoverError = null;
}
- if (tab.id === "clipboard-dialog-import-tab-clipboard") {
- $("#clipboard-import").trigger("focus");
+ if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") {
+ $("#red-ui-clipboard-dialog-import-text").trigger("focus");
} else {
libraryBrowser.focus();
}
@@ -377,33 +379,33 @@ RED.clipboard = (function() {
}
});
tabs.addTab({
- id: "clipboard-dialog-import-tab-clipboard",
+ id: "red-ui-clipboard-dialog-import-tab-clipboard",
label: RED._("clipboard.clipboard")
});
tabs.addTab({
- id: "clipboard-dialog-import-tab-library",
+ id: "red-ui-clipboard-dialog-import-tab-library",
label: RED._("library.library")
});
- tabs.activateTab("clipboard-dialog-import-tab-"+mode);
+ 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)
}
- $("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
- $("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
- $("#clipboard-dialog-export").button("enable");
+ $("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
+ $("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
+ $("#red-ui-clipboard-dialog-export").button("enable");
libraryBrowser = RED.library.createBrowser({
- container: $("#clipboard-dialog-import-tab-library-browser"),
+ container: $("#red-ui-clipboard-dialog-import-tab-library-browser"),
onselect: function(file) {
if (file && file.label && !file.children) {
- $("#clipboard-dialog-ok").button("enable");
+ $("#red-ui-clipboard-dialog-ok").button("enable");
} else {
- $("#clipboard-dialog-ok").button("disable");
+ $("#red-ui-clipboard-dialog-ok").button("disable");
}
}
})
@@ -411,15 +413,15 @@ RED.clipboard = (function() {
dialogContainer.i18n();
- $("#clipboard-dialog-ok").show();
- $("#clipboard-dialog-cancel").show();
- $("#clipboard-dialog-export").hide();
- $("#clipboard-dialog-download").hide();
- $("#clipboard-dialog-ok").button("disable");
- $("#clipboard-import").on("keyup", validateImport);
- $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
+ $("#red-ui-clipboard-dialog-ok").show();
+ $("#red-ui-clipboard-dialog-cancel").show();
+ $("#red-ui-clipboard-dialog-export").hide();
+ $("#red-ui-clipboard-dialog-download").hide();
+ $("#red-ui-clipboard-dialog-ok").button("disable");
+ $("#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;
@@ -428,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: ""
@@ -461,81 +463,81 @@ RED.clipboard = (function() {
dialogContainer.append($(exportNodesDialog));
var tabs = RED.tabs.create({
- id: "clipboard-dialog-export-tabs",
+ id: "red-ui-clipboard-dialog-export-tabs",
vertical: true,
onchange: function(tab) {
- $("#clipboard-dialog-export-tabs-content").children().hide();
+ $("#red-ui-clipboard-dialog-export-tabs-content").children().hide();
$("#" + tab.id).show();
activeTab = tab.id;
- if (tab.id === "clipboard-dialog-export-tab-clipboard") {
- $("#clipboard-dialog-export").button("option","label", RED._("clipboard.export.copy"))
- $("#clipboard-dialog-download").show();
+ if (tab.id === "red-ui-clipboard-dialog-export-tab-clipboard") {
+ $("#red-ui-clipboard-dialog-export").button("option","label", RED._("clipboard.export.copy"))
+ $("#red-ui-clipboard-dialog-download").show();
} else {
- $("#clipboard-dialog-export").button("option","label", RED._("clipboard.export.export"))
- $("#clipboard-dialog-download").hide();
+ $("#red-ui-clipboard-dialog-export").button("option","label", RED._("clipboard.export.export"))
+ $("#red-ui-clipboard-dialog-download").hide();
libraryBrowser.focus();
}
}
});
tabs.addTab({
- id: "clipboard-dialog-export-tab-clipboard",
+ id: "red-ui-clipboard-dialog-export-tab-clipboard",
label: RED._("clipboard.clipboard")
});
tabs.addTab({
- id: "clipboard-dialog-export-tab-library",
+ id: "red-ui-clipboard-dialog-export-tab-library",
label: RED._("library.library")
});
- tabs.activateTab("clipboard-dialog-export-tab-"+mode);
+ tabs.activateTab("red-ui-clipboard-dialog-export-tab-"+mode);
- $("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
- $("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
- $("#clipboard-dialog-export").button("enable");
+ $("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
+ $("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
+ $("#red-ui-clipboard-dialog-export").button("enable");
libraryBrowser = RED.library.createBrowser({
- container: $("#clipboard-dialog-export-tab-library-browser"),
+ container: $("#red-ui-clipboard-dialog-export-tab-library-browser"),
folderTools: true,
onselect: function(file) {
if (file && file.label && !file.children) {
- $("#clipboard-dialog-tab-library-name").val(file.label);
+ $("#red-ui-clipboard-dialog-tab-library-name").val(file.label);
}
}
})
loadFlowLibrary(libraryBrowser,false);
- $("#clipboard-dialog-tab-library-name").val("flows.json").select();
+ $("#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;
@@ -545,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 = [];
@@ -558,58 +560,58 @@ 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");
})
- $("#clipboard-dialog-ok").hide();
- $("#clipboard-dialog-cancel").hide();
- $("#clipboard-dialog-export").hide();
+ $("#red-ui-clipboard-dialog-ok").hide();
+ $("#red-ui-clipboard-dialog-cancel").hide();
+ $("#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");
- $("#clipboard-dialog-cancel").show();
- $("#clipboard-dialog-export").show();
- $("#clipboard-dialog-download").show();
+ $("#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();
}
@@ -648,7 +650,7 @@ RED.clipboard = (function() {
}
function hideDropTarget() {
- $("#dropTarget").hide();
+ $("#red-ui-drop-target").hide();
RED.keyboard.remove("escape");
}
function copyText(value,element,msg) {
@@ -678,7 +680,7 @@ RED.clipboard = (function() {
if (truncated) {
msg += "_truncated";
}
- $("#clipboard-hidden").val(value).select();
+ $("#red-ui-clipboard-hidden").val(value).select();
var result = document.execCommand("copy");
if (result && element) {
var popover = RED.popover.create({
@@ -698,7 +700,7 @@ RED.clipboard = (function() {
init: function() {
setupDialogs();
- $('
').appendTo("body");
+ $('
').appendTo("#red-ui-editor");
RED.actions.add("core:show-export-dialog",exportNodes);
RED.actions.add("core:show-import-dialog",importNodes);
@@ -712,15 +714,17 @@ RED.clipboard = (function() {
RED.events.on("type-search:open",function() { disabled = true; });
RED.events.on("type-search:close",function() { disabled = false; });
- $('#chart').on("dragenter",function(event) {
+ $('
').appendTo('#red-ui-editor');
+
+ $('#red-ui-workspace-chart').on("dragenter",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
- $("#dropTarget").css({display:'table'});
+ $("#red-ui-drop-target").css({display:'table'});
RED.keyboard.add("*", "escape" ,hideDropTarget);
}
});
- $('#dropTarget').on("dragover",function(event) {
+ $('#red-ui-drop-target').on("dragover",function(event) {
if ($.inArray("text/plain",event.originalEvent.dataTransfer.types) != -1 ||
$.inArray("Files",event.originalEvent.dataTransfer.types) != -1) {
event.preventDefault();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js
index ddede026b..0464866f7 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/editableList.js
@@ -75,7 +75,7 @@
addLabel = 'add';
}
}
- $('
'+addLabel+'')
+ $('
'+addLabel+'')
.appendTo(this.topContainer)
.on("click", function(evt) {
evt.preventDefault();
@@ -257,7 +257,7 @@
li.addClass("red-ui-editableList-item-sortable");
}
if (this.options.removable) {
- var deleteButton = $('
',{href:"#",class:"red-ui-editableList-item-remove editor-button editor-button-small"}).appendTo(li);
+ var deleteButton = $('
',{href:"#",class:"red-ui-editableList-item-remove red-ui-button red-ui-button-small"}).appendTo(li);
$('
',{class:"fa fa-remove"}).appendTo(deleteButton);
li.addClass("red-ui-editableList-item-removable");
deleteButton.on("click", function(evt) {
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js
index 6e88aeade..039357c11 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/menu.js
@@ -56,12 +56,12 @@ RED.menu = (function() {
}
if (opt === null) {
- item = $('
');
+ item = $('');
} else {
item = $('
');
if (opt.group) {
- item.addClass("menu-group-"+opt.group);
+ item.addClass("red-ui-menu-group-"+opt.group);
}
var linkContent = '
';
@@ -79,10 +79,10 @@ RED.menu = (function() {
}
if (opt.sublabel) {
- linkContent += ''
+ linkContent += ''
} else {
- linkContent += ''
+ linkContent += ''
}
linkContent += ' ';
@@ -130,8 +130,8 @@ RED.menu = (function() {
});
}
if (opt.options) {
- item.addClass("dropdown-submenu pull-left");
- var submenu = $('').appendTo(item);
+ item.addClass("red-ui-menu-dropdown-submenu pull-left");
+ var submenu = $('').appendTo(item);
for (var i=0;i
",{class:"dropdown-menu pull-right"});
+ var topMenu = $("",{class:"red-ui-menu red-ui-menu-dropdown pull-right"});
if (options.id) {
topMenu.attr({id:options.id+"-submenu"});
var menuParent = $("#"+options.id);
if (menuParent.length === 1) {
topMenu.insertAfter(menuParent);
+ menuParent.on("click", function(evt) {
+ evt.stopPropagation();
+ evt.preventDefault();
+ if (topMenu.is(":visible")) {
+ $(document).off("click.red-ui-menu");
+ topMenu.hide();
+ } else {
+ $(document).on("click.red-ui-menu", function(evt) {
+ $(document).off("click.red-ui-menu");
+ activeMenu = null;
+ topMenu.hide();
+ });
+ $(".red-ui-menu").hide();
+ topMenu.show();
+ }
+ })
}
}
@@ -223,13 +239,13 @@ RED.menu = (function() {
function addItem(id,opt) {
var item = createMenuItem(opt);
if (opt.group) {
- var groupItems = $("#"+id+"-submenu").children(".menu-group-"+opt.group);
+ var groupItems = $("#"+id+"-submenu").children(".red-ui-menu-group-"+opt.group);
if (groupItems.length === 0) {
item.appendTo("#"+id+"-submenu");
} else {
for (var i=0;i").parent();
this.uiContainer.addClass("red-ui-searchBox-container");
@@ -60,7 +61,7 @@
});
this.element.on("focus",function() {
- $("body").one("mousedown",function() {
+ $(document).one("mousedown",function() {
that.element.blur();
});
});
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js
index 0cb410b29..610f388de 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/stack.js
@@ -45,11 +45,11 @@ RED.stack = (function() {
return {
add: function(entry) {
entries.push(entry);
- entry.container = $('').appendTo(container);
+ entry.container = $('
').appendTo(container);
if (!visible) {
entry.container.hide();
}
- var header = $('').appendTo(entry.container);
+ var header = $('').appendTo(entry.container);
entry.header = header;
entry.contentWrap = $('
',{style:"position:relative"}).appendTo(entry.container);
if (options.fill) {
@@ -82,7 +82,7 @@ RED.stack = (function() {
var icon = $('
').appendTo(header);
if (entry.expanded) {
- entry.container.addClass("palette-category-expanded");
+ entry.container.addClass("expanded");
icon.addClass("expanded");
} else {
entry.contentWrap.hide();
@@ -118,7 +118,7 @@ RED.stack = (function() {
}
icon.addClass("expanded");
- entry.container.addClass("palette-category-expanded");
+ entry.container.addClass("expanded");
entry.contentWrap.slideDown(200);
return true;
}
@@ -126,13 +126,13 @@ RED.stack = (function() {
entry.collapse = function() {
if (entry.isExpanded()) {
icon.removeClass("expanded");
- entry.container.removeClass("palette-category-expanded");
+ entry.container.removeClass("expanded");
entry.contentWrap.slideUp(200);
return true;
}
};
entry.isExpanded = function() {
- return entry.container.hasClass("palette-category-expanded");
+ return entry.container.hasClass("expanded");
};
if (options.fill && options.singleExpanded) {
resizeStack();
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js
index 7205fa182..288334c06 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/tabs.js
@@ -136,7 +136,7 @@ RED.tabs = (function() {
}
});
options = pinnedOptions.concat(options);
- collapsibleMenu = RED.menu.init({id:"debug-message-option-menu",options: options});
+ collapsibleMenu = RED.menu.init({options: options});
collapsibleMenu.css({
position: "absolute"
})
@@ -148,10 +148,11 @@ RED.tabs = (function() {
left: (elementPos.left - collapsibleMenu.width() + selectButton.width())+"px"
})
if (collapsibleMenu.is(":visible")) {
- $(document).off("click.tabmenu");
+ $(document).off("click.red-ui-tabmenu");
} else {
- $(document).on("click.tabmenu", function(evt) {
- $(document).off("click.tabmenu");
+ $(".red-ui-menu").hide();
+ $(document).on("click.red-ui-tabmenu", function(evt) {
+ $(document).off("click.red-ui-tabmenu");
collapsibleMenu.hide();
});
}
@@ -448,7 +449,10 @@ RED.tabs = (function() {
}
delete tabs[id];
updateTabWidths();
- collapsibleMenu = null;
+ if (collapsibleMenu) {
+ collapsibleMenu.remove();
+ collapsibleMenu = null;
+ }
}
return {
@@ -484,7 +488,7 @@ RED.tabs = (function() {
} else if (tab.iconClass) {
$('
',{class:"red-ui-tab-icon "+tab.iconClass}).appendTo(link);
}
- var span = $(' ',{class:"bidiAware"}).text(tab.label).appendTo(link);
+ var span = $(' ',{class:"red-ui-text-bidi-aware"}).text(tab.label).appendTo(link);
span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label));
if (options.collapsible) {
li.addClass("red-ui-tab-pinned");
@@ -626,7 +630,10 @@ RED.tabs = (function() {
setTimeout(function() {
updateTabWidths();
},10);
- collapsibleMenu = null;
+ if (collapsibleMenu) {
+ collapsibleMenu.remove();
+ collapsibleMenu = null;
+ }
},
removeTab: removeTab,
activateTab: activateTab,
@@ -643,7 +650,7 @@ RED.tabs = (function() {
tabs[id].label = label;
var tab = ul.find("a[href='#"+id+"']");
tab.attr("title",label);
- tab.find("span.bidiAware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label));
+ tab.find("span.red-ui-text-bidi-aware").text(label).attr('dir', RED.text.bidi.resolveBaseTextDir(label));
updateTabWidths();
},
selection: getSelection,
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js
index 30137b3e7..ef7b4dd54 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/treeList.js
@@ -276,7 +276,7 @@
}
if (item.hasOwnProperty('selected')) {
var selectWrapper = $(' ').appendTo(label);
- var cb = $(' ').prop('checked',item.selected).appendTo(selectWrapper);
+ var cb = $(' ').prop('checked',item.selected).appendTo(selectWrapper);
cb.on('click', function(e) {
e.stopPropagation();
});
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
index 2de2c4f47..5ea7a867e 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/common/typedInput.js
@@ -124,7 +124,7 @@
}
var contextStores = RED.settings.context.stores;
var contextOptions = contextStores.map(function(store) {
- return {value:store,label: store, icon:' '}
+ return {value:store,label: store, icon:' '}
})
if (contextOptions.length < 2) {
allOptions.flow.options = [];
@@ -138,12 +138,12 @@
var that = this;
this.disarmClick = false;
- this.input = $(' ');
+ this.input = $(' ');
this.input.insertAfter(this.element);
this.input.val(this.element.val());
this.element.addClass('red-ui-typedInput');
this.uiWidth = this.element.outerWidth();
- this.elementDiv = this.input.wrap("").parent().addClass('red-ui-typedInput-input');
+ this.elementDiv = this.input.wrap("
").parent().addClass('red-ui-typedInput-input-wrap');
this.uiSelect = this.elementDiv.wrap( "
" ).parent();
var attrStyle = this.element.attr('style');
var m;
@@ -171,8 +171,8 @@
this.options.types = this.options.types||Object.keys(allOptions);
- this.selectTrigger = $('
').prependTo(this.uiSelect);
- $('
').toggle(this.options.types.length > 1).appendTo(this.selectTrigger);
+ this.selectTrigger = $('
').prependTo(this.uiSelect);
+ $('
').toggle(this.options.types.length > 1).appendTo(this.selectTrigger);
this.selectLabel = $('
').appendTo(this.selectTrigger);
@@ -213,7 +213,7 @@
})
// explicitly set optionSelectTrigger display to inline-block otherwise jQ sets it to 'inline'
- this.optionSelectTrigger = $('
').appendTo(this.uiSelect);
+ this.optionSelectTrigger = $('
').appendTo(this.uiSelect);
this.optionSelectLabel = $('
').prependTo(this.optionSelectTrigger);
RED.popover.tooltip(this.optionSelectLabel,function() {
return that.optionValue;
@@ -241,7 +241,10 @@
_showTypeMenu: function() {
if (this.typeList.length > 1) {
this._showMenu(this.menu,this.selectTrigger);
- this.menu.find("[value='"+this.propertyType+"']").trigger("focus");
+ var selected = this.menu.find("[value='"+this.propertyType+"']");
+ setTimeout(function() {
+ selected.trigger("focus");
+ },120);
} else {
this.input.trigger("focus");
}
@@ -262,8 +265,11 @@
}
},
_hideMenu: function(menu) {
- $(document).off("mousedown.close-property-select");
+ $(document).off("mousedown.red-ui-typedInput-close-property-select");
menu.hide();
+ menu.css({
+ height: "auto"
+ });
if (this.elementDiv.is(":visible")) {
this.input.trigger("focus");
} else if (this.optionSelectTrigger.is(":visible")){
@@ -305,18 +311,21 @@
});
});
menu.css({
- display: "none",
+ display: "none"
});
menu.appendTo(document.body);
menu.on('keydown', function(evt) {
if (evt.keyCode === 40) {
+ evt.preventDefault();
// DOWN
$(this).children(":focus").next().trigger("focus");
} else if (evt.keyCode === 38) {
+ evt.preventDefault();
// UP
$(this).children(":focus").prev().trigger("focus");
} else if (evt.keyCode === 27) {
+ evt.preventDefault();
that._hideMenu(menu);
}
})
@@ -339,6 +348,10 @@
if (top+menuHeight > $(window).height()) {
top -= (top+menuHeight)-$(window).height()+5;
}
+ if (top < 0) {
+ menu.height(menuHeight+top)
+ top = 0;
+ }
menu.css({
top: top+"px",
left: (2+pos.left)+"px",
@@ -346,7 +359,7 @@
menu.slideDown(100);
this._delay(function() {
that.uiSelect.addClass('red-ui-typedInput-focus');
- $(document).on("mousedown.close-property-select", function(event) {
+ $(document).on("mousedown.red-ui-typedInput-close-property-select", function(event) {
if(!$(event.target).closest(menu).length) {
that._hideMenu(menu);
}
@@ -362,8 +375,7 @@
if (labelWidth === 0) {
var container = $('
').css({
position:"absolute",
- top:0,
- left:-1000
+ top:0
}).appendTo(document.body);
var newTrigger = label.clone().appendTo(container);
labelWidth = newTrigger.outerWidth();
@@ -465,7 +477,7 @@
return result;
});
this.selectTrigger.toggleClass("disabled", this.typeList.length === 1);
- this.selectTrigger.find(".fa-sort-desc").toggle(this.typeList.length > 1)
+ this.selectTrigger.find(".fa-caret-down").toggle(this.typeList.length > 1)
if (this.menu) {
this.menu.remove();
}
diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js
index 5fe8be1e3..833e8f293 100644
--- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js
+++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js
@@ -36,7 +36,7 @@ RED.deploy = (function() {
function changeDeploymentType(type) {
deploymentType = type;
- $("#btn-deploy-icon").attr("src",deploymentTypes[type].img);
+ $("#red-ui-header-button-deploy-icon").attr("src",deploymentTypes[type].img);
}
/**
@@ -51,19 +51,19 @@ RED.deploy = (function() {
var type = options.type || "default";
if (type == "default") {
- $('
'+
- ''+
- ''+
- ' '+
+ $(''+
+ ''+
- ' '+
- ' ').prependTo(".header-toolbar");
- RED.menu.init({id:"btn-deploy-options",
+ ''+
+ ' ').prependTo(".red-ui-header-toolbar");
+ RED.menu.init({id:"red-ui-header-button-deploy-options",
options: [
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:RED._("deploy.full"),sublabel:RED._("deploy.fullDesc"),selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}},
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:RED._("deploy.modifiedFlows"),sublabel:RED._("deploy.modifiedFlowsDesc"), onselect:function(s) {if(s){changeDeploymentType("flows")}}},
@@ -80,20 +80,20 @@ RED.deploy = (function() {
icon = options.icon;
}
- $('
'+
- ''+
- ''+
- (icon?' ':'')+
+ $(''+
+ ''+
- ' ').prependTo(".header-toolbar");
+ ' ').prependTo(".red-ui-header-toolbar");
}
- $('#btn-deploy').on("click", function(event) {
+ $('#red-ui-header-button-deploy').on("click", function(event) {
event.preventDefault();
save();
});
@@ -107,10 +107,10 @@ RED.deploy = (function() {
window.onbeforeunload = function() {
return RED._("deploy.confirm.undeployedChanges");
}
- $("#btn-deploy").removeClass("disabled");
+ $("#red-ui-header-button-deploy").removeClass("disabled");
} else {
window.onbeforeunload = null;
- $("#btn-deploy").addClass("disabled");
+ $("#red-ui-header-button-deploy").addClass("disabled");
}
});
@@ -176,14 +176,14 @@ RED.deploy = (function() {
function resolveConflict(currentNodes, activeDeploy) {
var message = $('
');
$('
').appendTo(message);
- var conflictCheck = $('
'+
+ var conflictCheck = $('
'+
'
'+
'
').appendTo(message);
- var conflictAutoMerge = $('
'+
- '
'+
+ var conflictAutoMerge = $('
').hide().appendTo(message);
- var conflictManualMerge = $('
'+
- '
'+
+ var conflictManualMerge = $('
').hide().appendTo(message);
message.i18n();
@@ -196,22 +196,22 @@ RED.deploy = (function() {
}
},
{
- id: "node-dialog-confirm-deploy-review",
+ id: "red-ui-deploy-dialog-confirm-deploy-review",
text: RED._("deploy.confirm.button.review"),
class: "primary disabled",
click: function() {
- if (!$("#node-dialog-confirm-deploy-review").hasClass('disabled')) {
+ if (!$("#red-ui-deploy-dialog-confirm-deploy-review").hasClass('disabled')) {
RED.diff.showRemoteDiff();
conflictNotification.close();
}
}
},
{
- id: "node-dialog-confirm-deploy-merge",
+ id: "red-ui-deploy-dialog-confirm-deploy-merge",
text: RED._("deploy.confirm.button.merge"),
class: "primary disabled",
click: function() {
- if (!$("#node-dialog-confirm-deploy-merge").hasClass('disabled')) {
+ if (!$("#red-ui-deploy-dialog-confirm-deploy-merge").hasClass('disabled')) {
RED.diff.mergeDiff(currentDiff);
conflictNotification.close();
}
@@ -220,7 +220,7 @@ RED.deploy = (function() {
];
if (activeDeploy) {
buttons.push({
- id: "node-dialog-confirm-deploy-overwrite",
+ id: "red-ui-deploy-dialog-confirm-deploy-overwrite",
text: RED._("deploy.confirm.button.overwrite"),
class: "primary",
click: function() {
@@ -245,11 +245,11 @@ RED.deploy = (function() {
var d = Object.keys(diff.conflicts);
if (d.length === 0) {
conflictAutoMerge.show();
- $("#node-dialog-confirm-deploy-merge").removeClass('disabled')
+ $("#red-ui-deploy-dialog-confirm-deploy-merge").removeClass('disabled')
} else {
conflictManualMerge.show();
}
- $("#node-dialog-confirm-deploy-review").removeClass('disabled')
+ $("#red-ui-deploy-dialog-confirm-deploy-review").removeClass('disabled')
},ellapsed);
})
}
@@ -266,15 +266,15 @@ RED.deploy = (function() {
}
function restart() {
var startTime = Date.now();
- $(".deploy-button-content").css('opacity',0);
- $(".deploy-button-spinner").show();
- var deployWasEnabled = !$("#btn-deploy").hasClass("disabled");
- $("#btn-deploy").addClass("disabled");
+ $(".red-ui-deploy-button-content").css('opacity',0);
+ $(".red-ui-deploy-button-spinner").show();
+ var deployWasEnabled = !$("#red-ui-header-button-deploy").hasClass("disabled");
+ $("#red-ui-header-button-deploy").addClass("disabled");
deployInflight = true;
- $("#header-shade").show();
- $("#editor-shade").show();
- $("#palette-shade").show();
- $("#sidebar-shade").show();
+ $("#red-ui-header-shade").show();
+ $("#red-ui-editor-shade").show();
+ $("#red-ui-palette-shade").show();
+ $("#red-ui-sidebar-shade").show();
$.ajax({
url:"flows",
@@ -284,12 +284,12 @@ RED.deploy = (function() {
}
}).done(function(data,textStatus,xhr) {
if (deployWasEnabled) {
- $("#btn-deploy").removeClass("disabled");
+ $("#red-ui-header-button-deploy").removeClass("disabled");
}
RED.notify('
'+RED._("deploy.successfulRestart")+'
',"success");
}).fail(function(xhr,textStatus,err) {
if (deployWasEnabled) {
- $("#btn-deploy").removeClass("disabled");
+ $("#red-ui-header-button-deploy").removeClass("disabled");
}
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error");
@@ -304,17 +304,17 @@ RED.deploy = (function() {
deployInflight = false;
var delta = Math.max(0,300-(Date.now()-startTime));
setTimeout(function() {
- $(".deploy-button-content").css('opacity',1);
- $(".deploy-button-spinner").hide();
- $("#header-shade").hide();
- $("#editor-shade").hide();
- $("#palette-shade").hide();
- $("#sidebar-shade").hide();
+ $(".red-ui-deploy-button-content").css('opacity',1);
+ $(".red-ui-deploy-button-spinner").hide();
+ $("#red-ui-header-shade").hide();
+ $("#red-ui-editor-shade").hide();
+ $("#red-ui-palette-shade").hide();
+ $("#red-ui-sidebar-shade").hide();
},delta);
});
}
function save(skipValidation,force) {
- if (!$("#btn-deploy").hasClass("disabled")) {
+ if (!$("#red-ui-header-button-deploy").hasClass("disabled")) {
if (!RED.user.hasPermission("flows.write")) {
RED.notify(RED._("user.errors.deploy"),"error");
return;
@@ -355,13 +355,13 @@ RED.deploy = (function() {
if (hasUnknown && !ignoreDeployWarnings.unknown) {
showWarning = true;
notificationMessage = "
"+RED._('deploy.confirm.unknown')+"
"+
- '
'+cropList(unknownNodes).map(function(n) { return sanitize(n) }).join(" ")+" "+
+ '
'+cropList(unknownNodes).map(function(n) { return sanitize(n) }).join(" ")+" "+
RED._('deploy.confirm.confirm')+
"
";
notificationButtons= [
{
- id: "node-dialog-confirm-deploy-deploy",
+ id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
@@ -375,12 +375,12 @@ RED.deploy = (function() {
invalidNodes.sort(sortNodeInfo);
notificationMessage = "
"+RED._('deploy.confirm.improperlyConfigured')+"
"+
- '
'+cropList(invalidNodes.map(function(A) { return sanitize( (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")")})).join(" ")+" "+
+ '
'+cropList(invalidNodes.map(function(A) { return sanitize( (A.tab?"["+A.tab+"] ":"")+A.label+" ("+A.type+")")})).join(" ")+" "+
RED._('deploy.confirm.confirm')+
"
";
notificationButtons= [
{
- id: "node-dialog-confirm-deploy-deploy",
+ id: "red-ui-deploy-dialog-confirm-deploy-deploy",
text: RED._("deploy.confirm.button.confirm"),
class: "primary",
click: function() {
@@ -411,9 +411,9 @@ RED.deploy = (function() {
var nns = RED.nodes.createCompleteNodeSet();
var startTime = Date.now();
- $(".deploy-button-content").css('opacity',0);
- $(".deploy-button-spinner").show();
- $("#btn-deploy").addClass("disabled");
+ $(".red-ui-deploy-button-content").css('opacity',0);
+ $(".red-ui-deploy-button-spinner").show();
+ $("#red-ui-header-button-deploy").addClass("disabled");
var data = {flows:nns};
@@ -422,10 +422,10 @@ RED.deploy = (function() {
}
deployInflight = true;
- $("#header-shade").show();
- $("#editor-shade").show();
- $("#palette-shade").show();
- $("#sidebar-shade").show();
+ $("#red-ui-header-shade").show();
+ $("#red-ui-editor-shade").show();
+ $("#red-ui-palette-shade").show();
+ $("#red-ui-sidebar-shade").show();
$.ajax({
url:"flows",
type: "POST",
@@ -476,7 +476,7 @@ RED.deploy = (function() {
RED.events.emit("deploy");
}).fail(function(xhr,textStatus,err) {
RED.nodes.dirty(true);
- $("#btn-deploy").removeClass("disabled");
+ $("#red-ui-header-button-deploy").removeClass("disabled");
if (xhr.status === 401) {
RED.notify(RED._("deploy.deployFailed",{message:RED._("user.notAuthorized")}),"error");
} else if (xhr.status === 409) {
@@ -490,12 +490,12 @@ RED.deploy = (function() {
deployInflight = false;
var delta = Math.max(0,300-(Date.now()-startTime));
setTimeout(function() {
- $(".deploy-button-content").css('opacity',1);
- $(".deploy-button-spinner").hide();
- $("#header-shade").hide();
- $("#editor-shade").hide();
- $("#palette-shade").hide();
- $("#sidebar-shade").hide();
+ $(".red-ui-deploy-button-content").css('opacity',1);
+ $(".red-ui-deploy-button-spinner").hide();
+ $("#red-ui-header-shade").hide();
+ $("#red-ui-editor-shade").hide();
+ $("#red-ui-palette-shade").hide();
+ $("#red-ui-sidebar-shade").hide();
},delta);
});
}
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 e73dc7ec1..9ea599e3d 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
@@ -22,7 +22,7 @@ RED.diff = (function() {
}
function createDiffTable(container,CurrentDiff) {
- var diffList = $('
').appendTo(container);
+ var diffList = $('
').appendTo(container);
diffList.editableList({
addButton: false,
height: "auto",
@@ -34,22 +34,22 @@ RED.diff = (function() {
var def = object.def;
var conflicts = CurrentDiff.conflicts;
- var tabDiv = $('
',{class:"node-diff-tab"}).appendTo(container);
+ var tabDiv = $('
',{class:"red-ui-diff-list-flow"}).appendTo(container);
tabDiv.addClass('collapsed');
- var titleRow = $('
',{class:"node-diff-tab-title"}).appendTo(tabDiv);
+ var titleRow = $('
',{class:"red-ui-diff-list-flow-title"}).appendTo(tabDiv);
var nodesDiv = $('
').appendTo(tabDiv);
- var originalCell = $('
',{class:"node-diff-node-entry-cell"}).appendTo(titleRow);
- var localCell = $('
',{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(titleRow);
+ var originalCell = $('
',{class:"red-ui-diff-list-node-cell"}).appendTo(titleRow);
+ var localCell = $('
',{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-local"}).appendTo(titleRow);
var remoteCell;
var selectState;
if (remoteDiff) {
- remoteCell = $('
',{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(titleRow);
+ remoteCell = $('
',{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-remote"}).appendTo(titleRow);
}
- $('
').appendTo(originalCell);
+ $('
').appendTo(originalCell);
createNodeIcon(tab,def).appendTo(originalCell);
var tabForLabel = (object.newTab || object.tab).n;
- var titleSpan = $('
',{class:"node-diff-tab-title-meta"}).appendTo(originalCell);
+ var titleSpan = $('',{class:"red-ui-diff-list-flow-title-meta"}).appendTo(originalCell);
if (tabForLabel.type === 'tab') {
titleSpan.text(tabForLabel.label||tabForLabel.id);
} else if (tab.type === 'subflow') {
@@ -87,50 +87,50 @@ RED.diff = (function() {
}
}
if (tab.type !== undefined) {
- var div = $("",{class:"node-diff-node-entry node-diff-node-props collapsed"}).appendTo(nodesDiv);
- var row = $("
",{class:"node-diff-node-entry-header"}).appendTo(div);
- var originalNodeDiv = $("
",{class:"node-diff-node-entry-cell"}).appendTo(row);
- var localNodeDiv = $("
",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(row);
+ var div = $("
",{class:"red-ui-diff-list-node red-ui-diff-list-node-props collapsed"}).appendTo(nodesDiv);
+ var row = $("
",{class:"red-ui-diff-list-node-header"}).appendTo(div);
+ var originalNodeDiv = $("
",{class:"red-ui-diff-list-node-cell"}).appendTo(row);
+ var localNodeDiv = $("
",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-local"}).appendTo(row);
var localChanged = false;
var remoteChanged = false;
if (!localDiff.newConfig.all[tab.id]) {
- localNodeDiv.addClass("node-diff-empty");
+ localNodeDiv.addClass("red-ui-diff-empty");
} else if (localDiff.added[tab.id]) {
- localNodeDiv.addClass("node-diff-node-added");
+ localNodeDiv.addClass("red-ui-diff-status-added");
localChanged = true;
- $('
').appendTo(localNodeDiv);
+ $('
').appendTo(localNodeDiv);
} else if (localDiff.changed[tab.id]) {
- localNodeDiv.addClass("node-diff-node-changed");
+ localNodeDiv.addClass("red-ui-diff-status-changed");
localChanged = true;
- $('
').appendTo(localNodeDiv);
+ $('
').appendTo(localNodeDiv);
} else {
- localNodeDiv.addClass("node-diff-node-unchanged");
- $('
').appendTo(localNodeDiv);
+ localNodeDiv.addClass("red-ui-diff-status-unchanged");
+ $('
').appendTo(localNodeDiv);
}
var remoteNodeDiv;
if (remoteDiff) {
- remoteNodeDiv = $("
",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(row);
+ remoteNodeDiv = $("
",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-remote"}).appendTo(row);
if (!remoteDiff.newConfig.all[tab.id]) {
- remoteNodeDiv.addClass("node-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-empty");
if (remoteDiff.deleted[tab.id]) {
remoteChanged = true;
}
} else if (remoteDiff.added[tab.id]) {
- remoteNodeDiv.addClass("node-diff-node-added");
+ remoteNodeDiv.addClass("red-ui-diff-status-added");
remoteChanged = true;
- $('
').appendTo(remoteNodeDiv);
+ $('
').appendTo(remoteNodeDiv);
} else if (remoteDiff.changed[tab.id]) {
- remoteNodeDiv.addClass("node-diff-node-changed");
+ remoteNodeDiv.addClass("red-ui-diff-status-changed");
remoteChanged = true;
- $('
').appendTo(remoteNodeDiv);
+ $('
').appendTo(remoteNodeDiv);
} else {
- remoteNodeDiv.addClass("node-diff-node-unchanged");
- $('
').appendTo(remoteNodeDiv);
+ remoteNodeDiv.addClass("red-ui-diff-status-unchanged");
+ $('
').appendTo(remoteNodeDiv);
}
}
- $('
').appendTo(originalNodeDiv);
+ $('
').appendTo(originalNodeDiv);
$('
').text(RED._("diff.flowProperties")).appendTo(originalNodeDiv);
row.on("click", function(evt) {
@@ -143,13 +143,13 @@ RED.diff = (function() {
if (conflicts[tab.id]) {
flowStats.conflicts++;
- if (!localNodeDiv.hasClass("node-diff-empty")) {
- $(' ').prependTo(localNodeDiv);
+ if (!localNodeDiv.hasClass("red-ui-diff-empty")) {
+ $(' ').prependTo(localNodeDiv);
}
- if (!remoteNodeDiv.hasClass("node-diff-empty")) {
- $(' ').prependTo(remoteNodeDiv);
+ if (!remoteNodeDiv.hasClass("red-ui-diff-empty")) {
+ $(' ').prependTo(remoteNodeDiv);
}
- div.addClass("node-diff-node-entry-conflict");
+ div.addClass("red-ui-diff-list-node-conflict");
} else {
selectState = CurrentDiff.resolutions[tab.id];
}
@@ -157,7 +157,7 @@ RED.diff = (function() {
createNodeConflictRadioBoxes(tab,div,localNodeDiv,remoteNodeDiv,true,!conflicts[tab.id],selectState,CurrentDiff);
}
}
- // var stats = $('',{class:"node-diff-tab-stats"}).appendTo(titleRow);
+ // var stats = $('',{class:"red-ui-diff-list-flow-stats"}).appendTo(titleRow);
var localNodeCount = 0;
var remoteNodeCount = 0;
var seen = {};
@@ -183,20 +183,20 @@ RED.diff = (function() {
});
}
titleRow.on("click", function(evt) {
- // if (titleRow.parent().find(".node-diff-node-entry:not(.hide)").length > 0) {
+ // if (titleRow.parent().find(".red-ui-diff-list-node:not(.hide)").length > 0) {
titleRow.parent().toggleClass('collapsed');
if ($(this).parent().hasClass('collapsed')) {
- $(this).parent().find('.node-diff-node-entry').addClass('collapsed');
- $(this).parent().find('.debug-message-element').addClass('collapsed');
+ $(this).parent().find('.red-ui-diff-list-node').addClass('collapsed');
+ $(this).parent().find('.red-ui-debug-msg-element').addClass('collapsed');
}
// }
})
if (localDiff.deleted[tab.id]) {
- $(' ').appendTo(localCell);
+ $(' ').appendTo(localCell);
} else if (object.newTab) {
if (localDiff.added[tab.id]) {
- $(' ').appendTo(localCell);
+ $(' ').appendTo(localCell);
} else {
if (tab.id) {
if (localDiff.changed[tab.id]) {
@@ -205,37 +205,37 @@ RED.diff = (function() {
flowStats.local.unchangedCount++;
}
}
- var localStats = $('',{class:"node-diff-tab-stats"}).appendTo(localCell);
- $(' ').text(RED._('diff.nodeCount',{count:localNodeCount})).appendTo(localStats);
+ var localStats = $('',{class:"red-ui-diff-list-flow-stats"}).appendTo(localCell);
+ $(' ').text(RED._('diff.nodeCount',{count:localNodeCount})).appendTo(localStats);
if (flowStats.conflicts + flowStats.local.addedCount + flowStats.local.changedCount + flowStats.local.deletedCount > 0) {
- $(' [ ').appendTo(localStats);
+ $(' [ ').appendTo(localStats);
if (flowStats.conflicts > 0) {
- $(' '+flowStats.conflicts+' ').appendTo(localStats);
+ $(' '+flowStats.conflicts+' ').appendTo(localStats);
}
if (flowStats.local.addedCount > 0) {
- $(' '+flowStats.local.addedCount+' ').appendTo(localStats);
+ $(' '+flowStats.local.addedCount+' ').appendTo(localStats);
}
if (flowStats.local.changedCount > 0) {
- $(' '+flowStats.local.changedCount+' ').appendTo(localStats);
+ $(' '+flowStats.local.changedCount+' ').appendTo(localStats);
}
if (flowStats.local.deletedCount > 0) {
- $(' '+flowStats.local.deletedCount+' ').appendTo(localStats);
+ $(' '+flowStats.local.deletedCount+' ').appendTo(localStats);
}
- $(' ] ').appendTo(localStats);
+ $(' ] ').appendTo(localStats);
}
}
} else {
- localCell.addClass("node-diff-empty");
+ localCell.addClass("red-ui-diff-empty");
}
if (remoteDiff) {
if (remoteDiff.deleted[tab.id]) {
- $(' ').appendTo(remoteCell);
+ $(' ').appendTo(remoteCell);
} else if (object.remoteTab) {
if (remoteDiff.added[tab.id]) {
- $(' ').appendTo(remoteCell);
+ $(' ').appendTo(remoteCell);
} else {
if (tab.id) {
if (remoteDiff.changed[tab.id]) {
@@ -244,31 +244,31 @@ RED.diff = (function() {
flowStats.remote.unchangedCount++;
}
}
- var remoteStats = $('',{class:"node-diff-tab-stats"}).appendTo(remoteCell);
- $(' ').text(RED._('diff.nodeCount',{count:remoteNodeCount})).appendTo(remoteStats);
+ var remoteStats = $('',{class:"red-ui-diff-list-flow-stats"}).appendTo(remoteCell);
+ $(' ').text(RED._('diff.nodeCount',{count:remoteNodeCount})).appendTo(remoteStats);
if (flowStats.conflicts + flowStats.remote.addedCount + flowStats.remote.changedCount + flowStats.remote.deletedCount > 0) {
- $(' [ ').appendTo(remoteStats);
+ $(' [ ').appendTo(remoteStats);
if (flowStats.conflicts > 0) {
- $(' '+flowStats.conflicts+' ').appendTo(remoteStats);
+ $(' '+flowStats.conflicts+' ').appendTo(remoteStats);
}
if (flowStats.remote.addedCount > 0) {
- $(' '+flowStats.remote.addedCount+' ').appendTo(remoteStats);
+ $(' '+flowStats.remote.addedCount+' ').appendTo(remoteStats);
}
if (flowStats.remote.changedCount > 0) {
- $(' '+flowStats.remote.changedCount+' ').appendTo(remoteStats);
+ $(' '+flowStats.remote.changedCount+' ').appendTo(remoteStats);
}
if (flowStats.remote.deletedCount > 0) {
- $(' '+flowStats.remote.deletedCount+' ').appendTo(remoteStats);
+ $(' '+flowStats.remote.deletedCount+' ').appendTo(remoteStats);
}
- $(' ] ').appendTo(remoteStats);
+ $(' ] ').appendTo(remoteStats);
}
}
} else {
- remoteCell.addClass("node-diff-empty");
+ remoteCell.addClass("red-ui-diff-empty");
}
selectState = "";
if (flowStats.conflicts > 0) {
- titleRow.addClass("node-diff-node-entry-conflict");
+ titleRow.addClass("red-ui-diff-list-node-conflict");
} else {
selectState = CurrentDiff.resolutions[tab.id];
}
@@ -279,8 +279,8 @@ RED.diff = (function() {
}
}
- if (tabDiv.find(".node-diff-node-entry").length === 0) {
- tabDiv.addClass("node-diff-tab-empty");
+ if (tabDiv.find(".red-ui-diff-list-node").length === 0) {
+ tabDiv.addClass("red-ui-diff-list-flow-empty");
}
container.i18n();
}
@@ -288,10 +288,10 @@ RED.diff = (function() {
return diffList;
}
function buildDiffPanel(container,diff,options) {
- var diffPanel = $('
').appendTo(container);
- var diffHeaders = $('').appendTo(diffPanel);
+ var diffPanel = $('
').appendTo(container);
+ var diffHeaders = $('').appendTo(diffPanel);
if (options.mode === "merge") {
- diffPanel.addClass("node-dialog-view-diff-panel-merge");
+ diffPanel.addClass("red-ui-diff-panel-merge");
}
var diffList = createDiffTable(diffPanel, diff);
@@ -304,13 +304,13 @@ RED.diff = (function() {
if (remoteDiff !== undefined) {
- diffPanel.addClass('node-diff-three-way');
+ diffPanel.addClass('red-ui-diff-three-way');
var localTitle = options.oldRevTitle || RED._('diff.local');
var remoteTitle = options.newRevTitle || RED._('diff.remote');
$('
').text(localTitle).appendTo(diffHeaders);
$('
').text(remoteTitle).appendTo(diffHeaders);
} else {
- diffPanel.removeClass('node-diff-three-way');
+ diffPanel.removeClass('red-ui-diff-three-way');
}
return {
@@ -458,7 +458,7 @@ RED.diff = (function() {
};
}
function formatWireProperty(wires,allNodes) {
- var result = $("",{class:"node-diff-property-wires"})
+ var result = $("
",{class:"red-ui-diff-list-wires"})
var list = $("
");
var c = 0;
wires.forEach(function(p,i) {
@@ -489,7 +489,7 @@ RED.diff = (function() {
return result;
}
function createNodeIcon(node,def) {
- var nodeDiv = $("
",{class:"node-diff-node-entry-node"});
+ var nodeDiv = $("
",{class:"red-ui-diff-list-node-icon"});
var colour = RED.utils.getNodeColor(node.type,def);
var icon_url = RED.utils.getNodeIcon(def,node);
if (node.type === 'tab') {
@@ -497,17 +497,16 @@ RED.diff = (function() {
}
nodeDiv.css('backgroundColor',colour);
- var iconContainer = $('
',{class:"palette_icon_container"}).appendTo(nodeDiv);
+ var iconContainer = $('
',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
RED.utils.createIconElement(icon_url, iconContainer, false);
return nodeDiv;
}
function createNode(node,def) {
- var nodeTitleDiv = $("
",{class:"node-diff-node-entry-title"})
+ var nodeTitleDiv = $("
",{class:"red-ui-diff-list-node-title"})
createNodeIcon(node,def).appendTo(nodeTitleDiv);
- var contentDiv = $('
',{class:"node-diff-node-description"}).appendTo(nodeTitleDiv);
var nodeLabel = node.label || node.name || node.id;
- $('
',{class:"node-diff-node-label"}).text(nodeLabel).appendTo(contentDiv);
+ $('',{class:"red-ui-diff-list-node-description"}).text(nodeLabel).appendTo(nodeTitleDiv);
return nodeTitleDiv;
}
function createNodeDiffRow(node,stats,CurrentDiff) {
@@ -559,80 +558,80 @@ RED.diff = (function() {
def = {};
}
}
- var div = $("
",{class:"node-diff-node-entry collapsed"});
- var row = $("
",{class:"node-diff-node-entry-header"}).appendTo(div);
+ var div = $("
",{class:"red-ui-diff-list-node collapsed"});
+ var row = $("
",{class:"red-ui-diff-list-node-header"}).appendTo(div);
- var originalNodeDiv = $("
",{class:"node-diff-node-entry-cell"}).appendTo(row);
- var localNodeDiv = $("
",{class:"node-diff-node-entry-cell node-diff-node-local"}).appendTo(row);
+ var originalNodeDiv = $("
",{class:"red-ui-diff-list-node-cell"}).appendTo(row);
+ var localNodeDiv = $("
",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-local"}).appendTo(row);
var remoteNodeDiv;
var chevron;
if (remoteDiff) {
- remoteNodeDiv = $("
",{class:"node-diff-node-entry-cell node-diff-node-remote"}).appendTo(row);
+ remoteNodeDiv = $("
",{class:"red-ui-diff-list-node-cell red-ui-diff-list-node-remote"}).appendTo(row);
}
- $('
').appendTo(originalNodeDiv);
+ $('
').appendTo(originalNodeDiv);
if (unChanged) {
stats.local.unchangedCount++;
createNode(node,def).appendTo(originalNodeDiv);
- localNodeDiv.addClass("node-diff-node-unchanged");
- $('
').appendTo(localNodeDiv);
+ localNodeDiv.addClass("red-ui-diff-status-unchanged");
+ $('
').appendTo(localNodeDiv);
if (remoteDiff) {
stats.remote.unchangedCount++;
- remoteNodeDiv.addClass("node-diff-node-unchanged");
- $('
').appendTo(remoteNodeDiv);
+ remoteNodeDiv.addClass("red-ui-diff-status-unchanged");
+ $('
').appendTo(remoteNodeDiv);
}
- div.addClass("node-diff-node-unchanged");
+ div.addClass("red-ui-diff-status-unchanged");
} else if (localDiff.added[node.id]) {
- localNodeDiv.addClass("node-diff-node-added");
+ localNodeDiv.addClass("red-ui-diff-status-added");
if (remoteNodeDiv) {
- remoteNodeDiv.addClass("node-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-empty");
}
- $('
').appendTo(localNodeDiv);
+ $('
').appendTo(localNodeDiv);
createNode(node,def).appendTo(originalNodeDiv);
} else if (remoteDiff && remoteDiff.added[node.id]) {
- localNodeDiv.addClass("node-diff-empty");
- remoteNodeDiv.addClass("node-diff-node-added");
- $('
').appendTo(remoteNodeDiv);
+ localNodeDiv.addClass("red-ui-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-status-added");
+ $('
').appendTo(remoteNodeDiv);
createNode(node,def).appendTo(originalNodeDiv);
} else {
createNode(node,def).appendTo(originalNodeDiv);
if (localDiff.moved[node.id]) {
var localN = localDiff.newConfig.all[node.id];
if (!localDiff.deleted[node.z] && node.z !== localN.z && node.z !== "" && !localDiff.newConfig.all[node.z]) {
- localNodeDiv.addClass("node-diff-empty");
+ localNodeDiv.addClass("red-ui-diff-empty");
} else {
- localNodeDiv.addClass("node-diff-node-moved");
+ localNodeDiv.addClass("red-ui-diff-status-moved");
var localMovedMessage = "";
if (node.z === localN.z) {
localMovedMessage = RED._("diff.type.movedFrom",{id:(localDiff.currentConfig.all[node.id].z||'global')});
} else {
localMovedMessage = RED._("diff.type.movedTo",{id:(localN.z||'global')});
}
- $('
'+localMovedMessage+'').appendTo(localNodeDiv);
+ $('
'+localMovedMessage+'').appendTo(localNodeDiv);
}
localChanged = true;
} else if (localDiff.deleted[node.z]) {
- localNodeDiv.addClass("node-diff-empty");
+ localNodeDiv.addClass("red-ui-diff-empty");
localChanged = true;
} else if (localDiff.deleted[node.id]) {
- localNodeDiv.addClass("node-diff-node-deleted");
- $('
').appendTo(localNodeDiv);
+ localNodeDiv.addClass("red-ui-diff-status-deleted");
+ $('
').appendTo(localNodeDiv);
localChanged = true;
} else if (localDiff.changed[node.id]) {
if (localDiff.newConfig.all[node.id].z !== node.z) {
- localNodeDiv.addClass("node-diff-empty");
+ localNodeDiv.addClass("red-ui-diff-empty");
} else {
- localNodeDiv.addClass("node-diff-node-changed");
- $('
').appendTo(localNodeDiv);
+ localNodeDiv.addClass("red-ui-diff-status-changed");
+ $('
').appendTo(localNodeDiv);
localChanged = true;
}
} else {
if (localDiff.newConfig.all[node.id].z !== node.z) {
- localNodeDiv.addClass("node-diff-empty");
+ localNodeDiv.addClass("red-ui-diff-empty");
} else {
stats.local.unchangedCount++;
- localNodeDiv.addClass("node-diff-node-unchanged");
- $('
').appendTo(localNodeDiv);
+ localNodeDiv.addClass("red-ui-diff-status-unchanged");
+ $('
').appendTo(localNodeDiv);
}
}
@@ -640,36 +639,36 @@ RED.diff = (function() {
if (remoteDiff.moved[node.id]) {
var remoteN = remoteDiff.newConfig.all[node.id];
if (!remoteDiff.deleted[node.z] && node.z !== remoteN.z && node.z !== "" && !remoteDiff.newConfig.all[node.z]) {
- remoteNodeDiv.addClass("node-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-empty");
} else {
- remoteNodeDiv.addClass("node-diff-node-moved");
+ remoteNodeDiv.addClass("red-ui-diff-status-moved");
var remoteMovedMessage = "";
if (node.z === remoteN.z) {
remoteMovedMessage = RED._("diff.type.movedFrom",{id:(remoteDiff.currentConfig.all[node.id].z||'global')});
} else {
remoteMovedMessage = RED._("diff.type.movedTo",{id:(remoteN.z||'global')});
}
- $('
'+remoteMovedMessage+'').appendTo(remoteNodeDiv);
+ $('
'+remoteMovedMessage+'').appendTo(remoteNodeDiv);
}
} else if (remoteDiff.deleted[node.z]) {
- remoteNodeDiv.addClass("node-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-empty");
} else if (remoteDiff.deleted[node.id]) {
- remoteNodeDiv.addClass("node-diff-node-deleted");
- $('
').appendTo(remoteNodeDiv);
+ remoteNodeDiv.addClass("red-ui-diff-status-deleted");
+ $('
').appendTo(remoteNodeDiv);
} else if (remoteDiff.changed[node.id]) {
if (remoteDiff.newConfig.all[node.id].z !== node.z) {
- remoteNodeDiv.addClass("node-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-empty");
} else {
- remoteNodeDiv.addClass("node-diff-node-changed");
- $('
').appendTo(remoteNodeDiv);
+ remoteNodeDiv.addClass("red-ui-diff-status-changed");
+ $('
').appendTo(remoteNodeDiv);
}
} else {
if (remoteDiff.newConfig.all[node.id].z !== node.z) {
- remoteNodeDiv.addClass("node-diff-empty");
+ remoteNodeDiv.addClass("red-ui-diff-empty");
} else {
stats.remote.unchangedCount++;
- remoteNodeDiv.addClass("node-diff-node-unchanged");
- $('
').appendTo(remoteNodeDiv);
+ remoteNodeDiv.addClass("red-ui-diff-status-unchanged");
+ $('
').appendTo(remoteNodeDiv);
}
}
}
@@ -692,13 +691,13 @@ RED.diff = (function() {
if (conflicted) {
stats.conflicts++;
- if (!localNodeDiv.hasClass("node-diff-empty")) {
- $('
').prependTo(localNodeDiv);
+ if (!localNodeDiv.hasClass("red-ui-diff-empty")) {
+ $('
').prependTo(localNodeDiv);
}
- if (!remoteNodeDiv.hasClass("node-diff-empty")) {
- $('
').prependTo(remoteNodeDiv);
+ if (!remoteNodeDiv.hasClass("red-ui-diff-empty")) {
+ $('
').prependTo(remoteNodeDiv);
}
- div.addClass("node-diff-node-entry-conflict");
+ div.addClass("red-ui-diff-list-node-conflict");
} else {
selectState = CurrentDiff.resolutions[node.id];
}
@@ -707,7 +706,7 @@ RED.diff = (function() {
row.on("click", function(evt) {
$(this).parent().toggleClass('collapsed');
- if($(this).siblings('.node-diff-node-entry-properties').length === 0) {
+ if($(this).siblings('.red-ui-diff-list-node-properties').length === 0) {
createNodePropertiesTable(def,node,localNode,remoteNode).appendTo(div);
}
});
@@ -722,7 +721,7 @@ RED.diff = (function() {
remoteNode = remoteNodeObj.node;
}
- var nodePropertiesDiv = $("
",{class:"node-diff-node-entry-properties"});
+ var nodePropertiesDiv = $("
",{class:"red-ui-diff-list-node-properties"});
var nodePropertiesTable = $("
").appendTo(nodePropertiesDiv);
var nodePropertiesTableCols = $(' ').appendTo(nodePropertiesTable);
if (remoteNode !== undefined) {
@@ -742,25 +741,25 @@ RED.diff = (function() {
var status;
row = $("").appendTo(nodePropertiesTableBody);
- $("",{class:"node-diff-property-cell-label"}).text("id").appendTo(row);
- localCell = $(" ",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row);
+ $(" ",{class:"red-ui-diff-list-cell-label"}).text("id").appendTo(row);
+ localCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row);
if (localNode) {
- localCell.addClass("node-diff-node-unchanged");
- $(' ').appendTo(localCell);
- element = $(' ').appendTo(localCell);
+ localCell.addClass("red-ui-diff-status-unchanged");
+ $(' ').appendTo(localCell);
+ element = $(' ').appendTo(localCell);
propertyElements['local.id'] = RED.utils.createObjectElement(localNode.id).appendTo(element);
} else {
- localCell.addClass("node-diff-empty");
+ localCell.addClass("red-ui-diff-empty");
}
if (remoteNode !== undefined) {
- remoteCell = $(" ",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row);
- remoteCell.addClass("node-diff-node-unchanged");
+ remoteCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row);
+ remoteCell.addClass("red-ui-diff-status-unchanged");
if (remoteNode) {
- $(' ').appendTo(remoteCell);
- element = $(' ').appendTo(remoteCell);
+ $(' ').appendTo(remoteCell);
+ element = $(' ').appendTo(remoteCell);
propertyElements['remote.id'] = RED.utils.createObjectElement(remoteNode.id).appendTo(element);
} else {
- remoteCell.addClass("node-diff-empty");
+ remoteCell.addClass("red-ui-diff-empty");
}
}
@@ -785,12 +784,12 @@ RED.diff = (function() {
conflict = true;
}
row = $(" ").appendTo(nodePropertiesTableBody);
- $("",{class:"node-diff-property-cell-label"}).text("position").appendTo(row);
- localCell = $(" ",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row);
+ $(" ",{class:"red-ui-diff-list-cell-label"}).text("position").appendTo(row);
+ localCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row);
if (localNode) {
- localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged"));
- $(''+(localChanged?' ':'')+' ').appendTo(localCell);
- element = $(' ').appendTo(localCell);
+ localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged"));
+ $(''+(localChanged?' ':'')+' ').appendTo(localCell);
+ element = $(' ').appendTo(localCell);
propertyElements['local.position'] = RED.utils.createObjectElement({x:localNode.x,y:localNode.y},
{
path: "position",
@@ -803,15 +802,15 @@ RED.diff = (function() {
}
).appendTo(element);
} else {
- localCell.addClass("node-diff-empty");
+ localCell.addClass("red-ui-diff-empty");
}
if (remoteNode !== undefined) {
- remoteCell = $(" ",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row);
- remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged"));
+ remoteCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row);
+ remoteCell.addClass("red-ui-diff-status-"+(remoteChanged?"changed":"unchanged"));
if (remoteNode) {
- $(''+(remoteChanged?' ':'')+' ').appendTo(remoteCell);
- element = $(' ').appendTo(remoteCell);
+ $(''+(remoteChanged?' ':'')+' ').appendTo(remoteCell);
+ element = $(' ').appendTo(remoteCell);
propertyElements['remote.position'] = RED.utils.createObjectElement({x:remoteNode.x,y:remoteNode.y},
{
path: "position",
@@ -824,7 +823,7 @@ RED.diff = (function() {
}
).appendTo(element);
} else {
- remoteCell.addClass("node-diff-empty");
+ remoteCell.addClass("red-ui-diff-empty");
}
}
}
@@ -853,34 +852,34 @@ RED.diff = (function() {
conflict = true;
}
row = $(" ").appendTo(nodePropertiesTableBody);
- $("",{class:"node-diff-property-cell-label"}).text("wires").appendTo(row);
- localCell = $(" ",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row);
+ $(" ",{class:"red-ui-diff-list-cell-label"}).text("wires").appendTo(row);
+ localCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row);
if (localNode) {
if (!conflict) {
- localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged"));
- $(''+(localChanged?' ':'')+' ').appendTo(localCell);
+ localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged"));
+ $(''+(localChanged?' ':'')+' ').appendTo(localCell);
} else {
- localCell.addClass("node-diff-node-conflict");
- $(' ').appendTo(localCell);
+ localCell.addClass("red-ui-diff-status-conflict");
+ $(' ').appendTo(localCell);
}
formatWireProperty(localNode.wires,localNodeObj.all).appendTo(localCell);
} else {
- localCell.addClass("node-diff-empty");
+ localCell.addClass("red-ui-diff-empty");
}
if (remoteNode !== undefined) {
- remoteCell = $(" ",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row);
+ remoteCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row);
if (remoteNode) {
if (!conflict) {
- remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged"));
- $(''+(remoteChanged?' ':'')+' ').appendTo(remoteCell);
+ remoteCell.addClass("red-ui-diff-status-"+(remoteChanged?"changed":"unchanged"));
+ $(''+(remoteChanged?' ':'')+' ').appendTo(remoteCell);
} else {
- remoteCell.addClass("node-diff-node-conflict");
- $(' ').appendTo(remoteCell);
+ remoteCell.addClass("red-ui-diff-status-conflict");
+ $(' ').appendTo(remoteCell);
}
formatWireProperty(remoteNode.wires,remoteNodeObj.all).appendTo(remoteCell);
} else {
- remoteCell.addClass("node-diff-empty");
+ remoteCell.addClass("red-ui-diff-empty");
}
}
}
@@ -926,17 +925,17 @@ RED.diff = (function() {
}
row = $(" ").appendTo(nodePropertiesTableBody);
- var propertyNameCell = $("",{class:"node-diff-property-cell-label"}).text(d).appendTo(row);
- localCell = $(" ",{class:"node-diff-property-cell node-diff-node-local"}).appendTo(row);
+ var propertyNameCell = $(" ",{class:"red-ui-diff-list-cell-label"}).text(d).appendTo(row);
+ localCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-local"}).appendTo(row);
if (localNode) {
if (!conflict) {
- localCell.addClass("node-diff-node-"+(localChanged?"changed":"unchanged"));
- $(''+(localChanged?' ':'')+' ').appendTo(localCell);
+ localCell.addClass("red-ui-diff-status-"+(localChanged?"changed":"unchanged"));
+ $(''+(localChanged?' ':'')+' ').appendTo(localCell);
} else {
- localCell.addClass("node-diff-node-conflict");
- $(' ').appendTo(localCell);
+ localCell.addClass("red-ui-diff-status-conflict");
+ $(' ').appendTo(localCell);
}
- element = $(' ').appendTo(localCell);
+ element = $(' ').appendTo(localCell);
propertyElements['local.'+d] = RED.utils.createObjectElement(localNode[d],
{
path: d,
@@ -949,19 +948,19 @@ RED.diff = (function() {
}
).appendTo(element);
} else {
- localCell.addClass("node-diff-empty");
+ localCell.addClass("red-ui-diff-empty");
}
if (remoteNode !== undefined) {
- remoteCell = $(" ",{class:"node-diff-property-cell node-diff-node-remote"}).appendTo(row);
+ remoteCell = $(" ",{class:"red-ui-diff-list-cell red-ui-diff-list-node-remote"}).appendTo(row);
if (remoteNode) {
if (!conflict) {
- remoteCell.addClass("node-diff-node-"+(remoteChanged?"changed":"unchanged"));
- $(''+(remoteChanged?' ':'')+' ').appendTo(remoteCell);
+ remoteCell.addClass("red-ui-diff-status-"+(remoteChanged?"changed":"unchanged"));
+ $(''+(remoteChanged?' ':'')+' ').appendTo(remoteCell);
} else {
- remoteCell.addClass("node-diff-node-conflict");
- $(' ').appendTo(remoteCell);
+ remoteCell.addClass("red-ui-diff-status-conflict");
+ $(' ').appendTo(remoteCell);
}
- element = $(' ').appendTo(remoteCell);
+ element = $(' ').appendTo(remoteCell);
propertyElements['remote.'+d] = RED.utils.createObjectElement(remoteNode[d],
{
path: d,
@@ -974,12 +973,12 @@ RED.diff = (function() {
}
).appendTo(element);
} else {
- remoteCell.addClass("node-diff-empty");
+ remoteCell.addClass("red-ui-diff-empty");
}
}
if (localNode && remoteNode && typeof localNode[d] === "string") {
if (/\n/.test(localNode[d]) || /\n/.test(remoteNode[d])) {
- $(' ').on("click", function() {
+ $(' ').on("click", function() {
showTextDiff(localNode[d],remoteNode[d]);
}).appendTo(propertyNameCell);
}
@@ -990,10 +989,10 @@ RED.diff = (function() {
return nodePropertiesDiv;
}
function createNodeConflictRadioBoxes(node,row,localDiv,remoteDiv,propertiesTable,hide,state,diff) {
- var safeNodeId = "node-diff-selectbox-"+node.id.replace(/\./g,'-')+(propertiesTable?"-props":"");
+ var safeNodeId = "red-ui-diff-selectbox-"+node.id.replace(/\./g,'-')+(propertiesTable?"-props":"");
var className = "";
if (node.z||propertiesTable) {
- className = "node-diff-selectbox-tab-"+(propertiesTable?node.id:node.z).replace(/\./g,'-');
+ className = "red-ui-diff-selectbox-tab-"+(propertiesTable?node.id:node.z).replace(/\./g,'-');
}
var titleRow = !propertiesTable && (node.type === 'tab' || node.type === 'subflow');
var changeHandler = function(evt) {
@@ -1001,44 +1000,44 @@ RED.diff = (function() {
if (node.type === undefined) {
// TODO: handle globals
} else if (titleRow) {
- className = "node-diff-selectbox-tab-"+node.id.replace(/\./g,'-');
+ className = "red-ui-diff-selectbox-tab-"+node.id.replace(/\./g,'-');
$("."+className+"-"+this.value).prop('checked',true);
if (this.value === 'local') {
- $("."+className+"-"+this.value).closest(".node-diff-node-entry").addClass("node-diff-select-local");
- $("."+className+"-"+this.value).closest(".node-diff-node-entry").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(".node-diff-node-entry").removeClass("node-diff-select-local");
- $("."+className+"-"+this.value).closest(".node-diff-node-entry").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
- var parentId = "node-diff-selectbox-"+(propertiesTable?node.id:node.z).replace(/\./g,'-');
+ var parentId = "red-ui-diff-selectbox-"+(propertiesTable?node.id:node.z).replace(/\./g,'-');
$('#'+parentId+"-local").prop('checked',false);
$('#'+parentId+"-remote").prop('checked',false);
- var titleRowDiv = $('#'+parentId+"-local").closest(".node-diff-tab").find(".node-diff-tab-title");
- titleRowDiv.removeClass("node-diff-select-local");
- titleRowDiv.removeClass("node-diff-select-remote");
+ var titleRowDiv = $('#'+parentId+"-local").closest(".red-ui-diff-list-flow").find(".red-ui-diff-list-flow-title");
+ 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);
}
- var localSelectDiv = $('',{class:"node-diff-selectbox",for:safeNodeId+"-local"}).on("click", function(e) { e.stopPropagation();}).appendTo(localDiv);
- var localRadio = $(' ',{id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId,class:className+"-local"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).on("change", changeHandler).appendTo(localSelectDiv);
- var remoteSelectDiv = $('',{class:"node-diff-selectbox",for:safeNodeId+"-remote"}).on("click", function(e) { e.stopPropagation();}).appendTo(remoteDiv);
- var remoteRadio = $(' ',{id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId,class:className+"-remote"+(titleRow?"":" node-diff-select-node")}).data('node-id',node.id).on("change", changeHandler).appendTo(remoteSelectDiv);
+ var localSelectDiv = $('',{class:"red-ui-diff-selectbox",for:safeNodeId+"-local"}).on("click", function(e) { e.stopPropagation();}).appendTo(localDiv);
+ var localRadio = $(' ',{class:"red-ui-diff-selectbox-input",id:safeNodeId+"-local",type:'radio',value:"local",name:safeNodeId,class:className+"-local"}).data('node-id',node.id).on("change", changeHandler).appendTo(localSelectDiv);
+ var remoteSelectDiv = $('',{class:"red-ui-diff-selectbox",for:safeNodeId+"-remote"}).on("click", function(e) { e.stopPropagation();}).appendTo(remoteDiv);
+ var remoteRadio = $(' ',{class:"red-ui-diff-selectbox-input",id:safeNodeId+"-remote",type:'radio',value:"remote",name:safeNodeId,class:className+"-remote"}).data('node-id',node.id).on("change", changeHandler).appendTo(remoteSelectDiv);
if (state === 'local') {
localRadio.prop('checked',true);
} else if (state === 'remote') {
remoteRadio.prop('checked',true);
}
- if (hide||localDiv.hasClass("node-diff-empty") || remoteDiv.hasClass("node-diff-empty")) {
+ if (hide||localDiv.hasClass("red-ui-diff-empty") || remoteDiv.hasClass("red-ui-diff-empty")) {
localSelectDiv.hide();
remoteSelectDiv.hide();
}
@@ -1046,7 +1045,7 @@ RED.diff = (function() {
}
function refreshConflictHeader(currentDiff) {
var resolutionCount = 0;
- $(".node-diff-selectbox>input:checked").each(function() {
+ $(".red-ui-diff-selectbox>input:checked").each(function() {
if (currentDiff.conflicts[$(this).data('node-id')]) {
resolutionCount++;
}
@@ -1054,13 +1053,13 @@ RED.diff = (function() {
})
var conflictCount = Object.keys(currentDiff.conflicts).length;
if (conflictCount - resolutionCount === 0) {
- $("#node-diff-toolbar-resolved-conflicts").html(' '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount}));
+ $("#red-ui-diff-dialog-toolbar-resolved-conflicts").html(' '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount}));
} else {
- $("#node-diff-toolbar-resolved-conflicts").html(' '+RED._("diff.unresolvedCount",{count:conflictCount - resolutionCount}));
+ $("#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) {
@@ -1257,22 +1256,22 @@ RED.diff = (function() {
// trayWidth = dimensions.width;
},
open: function(tray) {
- var trayBody = tray.find('.editor-tray-body');
- var toolbar = $('