mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Namespace CSS for Debug, Keyboard, Clipboard, Settings
This commit is contained in:
parent
0e02e21967
commit
ad77565508
@ -28,7 +28,7 @@ RED.clipboard = (function() {
|
||||
var libraryBrowser;
|
||||
|
||||
function setupDialogs() {
|
||||
dialog = $('<div id="clipboard-dialog" class="hide node-red-dialog"><form class="dialog-form form-horizontal"></form></div>')
|
||||
dialog = $('<div id="red-ui-clipboard-dialog" class="hide node-red-dialog"><form class="dialog-form form-horizontal"></form></div>')
|
||||
.appendTo("#red-ui-editor")
|
||||
.dialog({
|
||||
modal: true,
|
||||
@ -37,14 +37,14 @@ RED.clipboard = (function() {
|
||||
resizable: false,
|
||||
buttons: [
|
||||
{
|
||||
id: "clipboard-dialog-cancel",
|
||||
id: "red-ui-clipboard-dialog-cancel",
|
||||
text: RED._("common.label.cancel"),
|
||||
click: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "clipboard-dialog-download",
|
||||
id: "red-ui-clipboard-dialog-download",
|
||||
class: "primary",
|
||||
text: RED._("clipboard.download"),
|
||||
click: function() {
|
||||
@ -59,11 +59,11 @@ RED.clipboard = (function() {
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "clipboard-dialog-export",
|
||||
id: "red-ui-clipboard-dialog-export",
|
||||
class: "primary",
|
||||
text: RED._("clipboard.export.copy"),
|
||||
click: function() {
|
||||
if (activeTab === "clipboard-dialog-export-tab-clipboard") {
|
||||
if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") {
|
||||
$("#clipboard-export").select();
|
||||
document.execCommand("copy");
|
||||
document.getSelection().removeAllRanges();
|
||||
@ -75,7 +75,7 @@ RED.clipboard = (function() {
|
||||
if (!selectedPath.children) {
|
||||
selectedPath = selectedPath.parent;
|
||||
}
|
||||
var filename = $("#clipboard-dialog-tab-library-name").val().trim();
|
||||
var filename = $("#red-ui-clipboard-dialog-tab-library-name").val().trim();
|
||||
var saveFlow = function() {
|
||||
$.ajax({
|
||||
url:'library/'+selectedPath.library+'/'+selectedPath.type+'/'+selectedPath.path + filename,
|
||||
@ -129,12 +129,12 @@ RED.clipboard = (function() {
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "clipboard-dialog-ok",
|
||||
id: "red-ui-clipboard-dialog-ok",
|
||||
class: "primary",
|
||||
text: RED._("common.label.import"),
|
||||
click: function() {
|
||||
var addNewFlow = ($("#import-tab > a.selected").attr('id') === 'import-tab-new');
|
||||
if (activeTab === "clipboard-dialog-import-tab-clipboard") {
|
||||
if (activeTab === "red-ui-clipboard-dialog-import-tab-clipboard") {
|
||||
RED.view.importNodes($("#clipboard-import").val(),addNewFlow);
|
||||
} else {
|
||||
var selectedPath = libraryBrowser.getSelected();
|
||||
@ -172,10 +172,10 @@ RED.clipboard = (function() {
|
||||
'</div>'+
|
||||
'<div style="height: 400px; position:relative; border:1px solid #999;">'+
|
||||
'<div style="position: absolute; top:0;left:0;bottom:0;width:120px;background: #f3f3f3;">'+
|
||||
'<ul id="clipboard-dialog-export-tabs"></ul>'+
|
||||
'<ul id="red-ui-clipboard-dialog-export-tabs"></ul>'+
|
||||
'</div>'+
|
||||
'<div id="clipboard-dialog-export-tabs-content" class="clipboard-dialog-tabs-content">'+
|
||||
'<div id="clipboard-dialog-export-tab-clipboard" class="clipboard-dialog-tab-clipboard">'+
|
||||
'<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 class="form-row">'+
|
||||
'<textarea readonly id="clipboard-export"></textarea>'+
|
||||
'</div>'+
|
||||
@ -186,10 +186,10 @@ RED.clipboard = (function() {
|
||||
'</span>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="clipboard-dialog-export-tab-library" class="clipboard-dialog-tab-library">'+
|
||||
'<div id="clipboard-dialog-export-tab-library-browser"></div>'+
|
||||
'<div id="red-ui-clipboard-dialog-export-tab-library" class="red-ui-clipboard-dialog-tab-library">'+
|
||||
'<div id="red-ui-clipboard-dialog-export-tab-library-browser"></div>'+
|
||||
'<div class="form-row">'+
|
||||
'<label data-i18n="clipboard.export.exportAs"></label><input id="clipboard-dialog-tab-library-name" type="text">'+
|
||||
'<label data-i18n="clipboard.export.exportAs"></label><input id="red-ui-clipboard-dialog-tab-library-name" type="text">'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
@ -200,10 +200,10 @@ RED.clipboard = (function() {
|
||||
importNodesDialog =
|
||||
'<div style="height: 400px; position:relative; border:1px solid #999; margin-bottom: 12px">'+
|
||||
'<div style="position: absolute; top:0;left:0;bottom:0;width:120px;background: #f3f3f3;">'+
|
||||
'<ul id="clipboard-dialog-import-tabs"></ul>'+
|
||||
'<ul id="red-ui-clipboard-dialog-import-tabs"></ul>'+
|
||||
'</div>'+
|
||||
'<div id="clipboard-dialog-import-tabs-content" class="clipboard-dialog-tabs-content">'+
|
||||
'<div id="clipboard-dialog-import-tab-clipboard" class="clipboard-dialog-tab-clipboard">'+
|
||||
'<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 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>'+
|
||||
'<input type="file" id="import-file-upload" accept=".json" style="display:none">'+
|
||||
@ -212,8 +212,8 @@ RED.clipboard = (function() {
|
||||
'<textarea id="clipboard-import"></textarea>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'<div id="clipboard-dialog-import-tab-library" class="clipboard-dialog-tab-library">'+
|
||||
'<div id="clipboard-dialog-import-tab-library-browser"></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-browser"></div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
@ -233,22 +233,22 @@ 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);
|
||||
}
|
||||
@ -259,7 +259,7 @@ RED.clipboard = (function() {
|
||||
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 +282,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 +296,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 = $('<div class="clipboard-import-error"></div>').text(errString);
|
||||
var message = $('<div class="red-ui-clipboard-import-error"></div>').text(errString);
|
||||
var errorPos;
|
||||
// Chrome error messages
|
||||
var m = /at position (\d+)/i.exec(errString);
|
||||
@ -335,15 +335,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,17 +358,17 @@ 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") {
|
||||
if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") {
|
||||
$("#clipboard-import").trigger("focus");
|
||||
} else {
|
||||
libraryBrowser.focus();
|
||||
@ -377,15 +377,15 @@ 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");
|
||||
@ -393,17 +393,17 @@ RED.clipboard = (function() {
|
||||
}
|
||||
|
||||
|
||||
$("#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,11 +411,11 @@ 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");
|
||||
$("#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");
|
||||
$("#clipboard-import").on("keyup", validateImport);
|
||||
$("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
|
||||
|
||||
@ -461,50 +461,50 @@ 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";
|
||||
@ -584,9 +584,9 @@ RED.clipboard = (function() {
|
||||
$("#clipboard-export").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");
|
||||
@ -607,9 +607,9 @@ RED.clipboard = (function() {
|
||||
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-cancel").show();
|
||||
$("#red-ui-clipboard-dialog-export").show();
|
||||
$("#red-ui-clipboard-dialog-download").show();
|
||||
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ RED.stack = (function() {
|
||||
var icon = $('<i class="fa fa-angle-down"></i>').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();
|
||||
|
@ -187,7 +187,7 @@ RED.diff = (function() {
|
||||
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-debug-msg-element').addClass('collapsed');
|
||||
}
|
||||
// }
|
||||
})
|
||||
|
@ -113,7 +113,7 @@ RED.h = handlers;
|
||||
get: getSettingsPane,
|
||||
focus: function() {
|
||||
setTimeout(function() {
|
||||
$("#user-settings-tab-keyboard-filter").trigger("focus");
|
||||
$("#red-ui-settings-tab-keyboard-filter").trigger("focus");
|
||||
},200);
|
||||
}
|
||||
})
|
||||
@ -521,10 +521,10 @@ RED.h = handlers;
|
||||
}
|
||||
|
||||
function getSettingsPane() {
|
||||
var pane = $('<div id="user-settings-tab-keyboard"></div>');
|
||||
var pane = $('<div id="red-ui-settings-tab-keyboard"></div>');
|
||||
|
||||
$('<div class="keyboard-shortcut-entry keyboard-shortcut-list-header">'+
|
||||
'<div class="keyboard-shortcut-entry-key keyboard-shortcut-entry-text"><input id="user-settings-tab-keyboard-filter" type="text" data-i18n="[placeholder]keyboard.filterActions"></div>'+
|
||||
'<div class="keyboard-shortcut-entry-key keyboard-shortcut-entry-text"><input id="red-ui-settings-tab-keyboard-filter" type="text" data-i18n="[placeholder]keyboard.filterActions"></div>'+
|
||||
'<div class="keyboard-shortcut-entry-key" data-i18n="keyboard.shortcut"></div>'+
|
||||
'<div class="keyboard-shortcut-entry-scope" data-i18n="keyboard.scope"></div>'+
|
||||
'</div>').appendTo(pane);
|
||||
|
@ -20,16 +20,16 @@ RED.library = (function() {
|
||||
var libraryEditor;
|
||||
var activeLibrary;
|
||||
|
||||
var _libraryLookup = '<div id="node-dialog-library-load" class="hide">'+
|
||||
var _libraryLookup = '<div id="red-ui-library-dialog-load" class="hide">'+
|
||||
'<form class="form-horizontal">'+
|
||||
'<div style="height: 400px; position:relative; ">'+
|
||||
'<div id="node-dialog-library-load-panes">'+
|
||||
'<div class="red-ui-panel" id="node-dialog-library-load-browser"></div>'+
|
||||
'<div id="red-ui-library-dialog-load-panes">'+
|
||||
'<div class="red-ui-panel" id="red-ui-library-dialog-load-browser"></div>'+
|
||||
'<div class="red-ui-panel">'+
|
||||
'<div id="node-dialog-library-load-preview">'+
|
||||
'<div class="red-ui-panel" id="node-dialog-library-load-preview-text"></div>'+
|
||||
'<div class="red-ui-panel" id="node-dialog-library-load-preview-details">'+
|
||||
'<table id="node-dialog-library-load-preview-details-table" class="node-info"></table>'+
|
||||
'<div id="red-ui-library-dialog-load-preview">'+
|
||||
'<div class="red-ui-panel" id="red-ui-library-dialog-load-preview-text"></div>'+
|
||||
'<div class="red-ui-panel" id="red-ui-library-dialog-load-preview-details">'+
|
||||
'<table id="red-ui-library-dialog-load-preview-details-table" class="node-info"></table>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
@ -39,12 +39,12 @@ RED.library = (function() {
|
||||
'</div>'
|
||||
|
||||
|
||||
var _librarySave = '<div id="node-dialog-library-save" class="hide">'+
|
||||
var _librarySave = '<div id="red-ui-library-dialog-save" class="hide">'+
|
||||
'<form class="form-horizontal">'+
|
||||
'<div style="height: 400px; position:relative; ">'+
|
||||
'<div id="node-dialog-library-save-browser"></div>'+
|
||||
'<div id="red-ui-library-dialog-save-browser"></div>'+
|
||||
'<div class="form-row">'+
|
||||
'<label data-i18n="clipboard.export.exportAs"></label><input id="node-dialog-library-save-filename" type="text">'+
|
||||
'<label data-i18n="clipboard.export.exportAs"></label><input id="red-ui-library-dialog-save-filename" type="text">'+
|
||||
'</div>'+
|
||||
'</div>'+
|
||||
'</form>'+
|
||||
@ -56,7 +56,7 @@ RED.library = (function() {
|
||||
if (name === "") {
|
||||
name = RED._("library.unnamedType",{type:activeLibrary.type});
|
||||
}
|
||||
var filename = $("#node-dialog-library-save-filename").val().trim()
|
||||
var filename = $("#red-ui-library-dialog-save-filename").val().trim()
|
||||
var selectedPath = saveLibraryBrowser.getSelected();
|
||||
if (!selectedPath.children) {
|
||||
selectedPath = selectedPath.parent;
|
||||
@ -97,7 +97,7 @@ RED.library = (function() {
|
||||
}
|
||||
});
|
||||
if (exists) {
|
||||
$( "#node-dialog-library-save" ).dialog("close");
|
||||
$( "#red-ui-library-dialog-save" ).dialog("close");
|
||||
var notification = RED.notify(RED._("clipboard.export.exists",{file:RED.utils.sanitize(filename)}),{
|
||||
type: "warning",
|
||||
fixed: true,
|
||||
@ -105,7 +105,7 @@ RED.library = (function() {
|
||||
text: RED._("common.label.cancel"),
|
||||
click: function() {
|
||||
notification.hideNotification()
|
||||
$( "#node-dialog-library-save" ).dialog( "open" );
|
||||
$( "#red-ui-library-dialog-save" ).dialog( "open" );
|
||||
}
|
||||
},{
|
||||
text: RED._("clipboard.export.overwrite"),
|
||||
@ -174,10 +174,10 @@ RED.library = (function() {
|
||||
var valid = filename.length > 0 && !/[\/\\]/.test(filename);
|
||||
if (valid) {
|
||||
filenameInput.removeClass("input-error");
|
||||
$("#node-dialog-library-save-button").button("enable");
|
||||
$("#red-ui-library-dialog-save-button").button("enable");
|
||||
} else {
|
||||
filenameInput.addClass("input-error");
|
||||
$("#node-dialog-library-save-button").button("disable");
|
||||
$("#red-ui-library-dialog-save-button").button("disable");
|
||||
}
|
||||
},100);
|
||||
}
|
||||
@ -234,7 +234,7 @@ RED.library = (function() {
|
||||
}]
|
||||
loadLibraryBrowser.data(listing);
|
||||
});
|
||||
libraryEditor = ace.edit('node-dialog-library-load-preview-text',{
|
||||
libraryEditor = ace.edit('red-ui-library-dialog-load-preview-text',{
|
||||
useWorker: false
|
||||
});
|
||||
libraryEditor.setTheme("ace/theme/tomorrow");
|
||||
@ -249,7 +249,7 @@ RED.library = (function() {
|
||||
libraryEditor.renderer.$cursorLayer.element.style.opacity=0;
|
||||
libraryEditor.$blockScrolling = Infinity;
|
||||
|
||||
$( "#node-dialog-library-load" ).dialog("option","title",RED._("library.typeLibrary", {type:options.type})).dialog( "open" );
|
||||
$( "#red-ui-library-dialog-load" ).dialog("option","title",RED._("library.typeLibrary", {type:options.type})).dialog( "open" );
|
||||
}
|
||||
},
|
||||
{ id:'node-input-'+options.type+'-menu-save-library',
|
||||
@ -262,7 +262,7 @@ RED.library = (function() {
|
||||
if (filename === "") {
|
||||
filename = "unnamed-"+options.type;
|
||||
}
|
||||
$("#node-dialog-library-save-filename").attr("value",filename+".js");
|
||||
$("#red-ui-library-dialog-save-filename").attr("value",filename+".js");
|
||||
|
||||
loadLibraryFolder("local",options.url, "", function(items) {
|
||||
var listing = [{
|
||||
@ -281,7 +281,7 @@ RED.library = (function() {
|
||||
}]
|
||||
saveLibraryBrowser.data(listing);
|
||||
});
|
||||
$( "#node-dialog-library-save" ).dialog( "open" );
|
||||
$( "#red-ui-library-dialog-save" ).dialog( "open" );
|
||||
}
|
||||
}
|
||||
]})
|
||||
@ -427,7 +427,7 @@ RED.library = (function() {
|
||||
$(_librarySave).appendTo("#red-ui-editor");
|
||||
$(_libraryLookup).appendTo("#red-ui-editor");
|
||||
|
||||
$( "#node-dialog-library-save" ).dialog({
|
||||
$( "#red-ui-library-dialog-save" ).dialog({
|
||||
title: RED._("library.saveToLibrary"),
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
@ -441,7 +441,7 @@ RED.library = (function() {
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "node-dialog-library-save-button",
|
||||
id: "red-ui-library-dialog-save-button",
|
||||
text: RED._("common.label.save"),
|
||||
class: "primary",
|
||||
click: function() {
|
||||
@ -456,26 +456,26 @@ RED.library = (function() {
|
||||
});
|
||||
|
||||
saveLibraryBrowser = RED.library.createBrowser({
|
||||
container: $("#node-dialog-library-save-browser"),
|
||||
container: $("#red-ui-library-dialog-save-browser"),
|
||||
addFolderButton: true,
|
||||
onselect: function(item) {
|
||||
if (item.label) {
|
||||
if (!item.children) {
|
||||
$("#node-dialog-library-save-filename").val(item.label);
|
||||
$("#red-ui-library-dialog-save-filename").val(item.label);
|
||||
item = item.parent;
|
||||
}
|
||||
if (item.writable === false) {
|
||||
$("#node-dialog-library-save-button").button("disable");
|
||||
$("#red-ui-library-dialog-save-button").button("disable");
|
||||
} else {
|
||||
$("#node-dialog-library-save-button").button("enable");
|
||||
$("#red-ui-library-dialog-save-button").button("enable");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#node-dialog-library-save-filename").on("keyup", function() { validateExportFilename($(this))});
|
||||
$("#node-dialog-library-save-filename").on('paste',function() { var input = $(this); setTimeout(function() { validateExportFilename(input)},10)});
|
||||
$("#red-ui-library-dialog-save-filename").on("keyup", function() { validateExportFilename($(this))});
|
||||
$("#red-ui-library-dialog-save-filename").on('paste',function() { var input = $(this); setTimeout(function() { validateExportFilename(input)},10)});
|
||||
|
||||
$( "#node-dialog-library-load" ).dialog({
|
||||
$( "#red-ui-library-dialog-load" ).dialog({
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: 800,
|
||||
@ -514,9 +514,9 @@ RED.library = (function() {
|
||||
}
|
||||
});
|
||||
loadLibraryBrowser = RED.library.createBrowser({
|
||||
container: $("#node-dialog-library-load-browser"),
|
||||
container: $("#red-ui-library-dialog-load-browser"),
|
||||
onselect: function(file) {
|
||||
var table = $("#node-dialog-library-load-preview-details-table").empty();
|
||||
var table = $("#red-ui-library-dialog-load-preview-details-table").empty();
|
||||
selectedLibraryItem = file.props;
|
||||
if (file && file.label && !file.children) {
|
||||
$.get("library/"+file.library+"/"+file.type+"/"+file.path, function(data) {
|
||||
@ -542,11 +542,11 @@ RED.library = (function() {
|
||||
}
|
||||
});
|
||||
RED.panels.create({
|
||||
container:$("#node-dialog-library-load-panes"),
|
||||
container:$("#red-ui-library-dialog-load-panes"),
|
||||
dir: "horizontal"
|
||||
});
|
||||
RED.panels.create({
|
||||
container:$("#node-dialog-library-load-preview"),
|
||||
container:$("#red-ui-library-dialog-load-preview"),
|
||||
dir: "vertical"
|
||||
});
|
||||
},
|
||||
|
@ -257,7 +257,7 @@ RED.palette.editor = (function() {
|
||||
setElements.enableButton.text(RED._('palette.editor.enable'));
|
||||
}
|
||||
}
|
||||
setElements.setRow.toggleClass("palette-module-set-disabled",!set.enabled);
|
||||
setElements.setRow.toggleClass("red-ui-palette-module-set-disabled",!set.enabled);
|
||||
}
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ RED.palette.editor = (function() {
|
||||
catalogueLoadErrors = true;
|
||||
}
|
||||
if (catalogueCount > 1) {
|
||||
$(".palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>"+catalogueLoadStatus.length+"/"+catalogueCount);
|
||||
$(".red-ui-palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>"+catalogueLoadStatus.length+"/"+catalogueCount);
|
||||
}
|
||||
if (catalogueLoadStatus.length === catalogueCount) {
|
||||
if (catalogueLoadErrors) {
|
||||
@ -358,7 +358,7 @@ RED.palette.editor = (function() {
|
||||
}
|
||||
var delta = 250-(Date.now() - catalogueLoadStart);
|
||||
setTimeout(function() {
|
||||
$("#palette-module-install-shade").hide();
|
||||
$("#red-ui-palette-module-install-shade").hide();
|
||||
},Math.max(delta,0));
|
||||
|
||||
}
|
||||
@ -370,15 +370,15 @@ RED.palette.editor = (function() {
|
||||
loadedIndex = {};
|
||||
packageList.editableList('empty');
|
||||
|
||||
$(".palette-module-shade-status").text(RED._('palette.editor.loading'));
|
||||
$(".red-ui-palette-module-shade-status").text(RED._('palette.editor.loading'));
|
||||
var catalogues = RED.settings.theme('palette.catalogues')||['https://catalogue.nodered.org/catalogue.json'];
|
||||
catalogueLoadStatus = [];
|
||||
catalogueLoadErrors = false;
|
||||
catalogueCount = catalogues.length;
|
||||
if (catalogues.length > 1) {
|
||||
$(".palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>0/"+catalogues.length);
|
||||
$(".red-ui-palette-module-shade-status").html(RED._('palette.editor.loading')+"<br>0/"+catalogues.length);
|
||||
}
|
||||
$("#palette-module-install-shade").show();
|
||||
$("#red-ui-palette-module-install-shade").show();
|
||||
catalogueLoadStart = Date.now();
|
||||
var handled = 0;
|
||||
catalogues.forEach(function(catalog,index) {
|
||||
@ -542,15 +542,15 @@ RED.palette.editor = (function() {
|
||||
|
||||
|
||||
function createSettingsPane() {
|
||||
settingsPane = $('<div id="user-settings-tab-palette"></div>');
|
||||
var content = $('<div id="palette-editor">'+
|
||||
'<ul id="palette-editor-tabs"></ul>'+
|
||||
settingsPane = $('<div id="red-ui-settings-tab-palette"></div>');
|
||||
var content = $('<div id="red-ui-palette-editor">'+
|
||||
'<ul id="red-ui-palette-editor-tabs"></ul>'+
|
||||
'</div>').appendTo(settingsPane);
|
||||
|
||||
editorTabs = RED.tabs.create({
|
||||
element: settingsPane.find('#palette-editor-tabs'),
|
||||
element: settingsPane.find('#red-ui-palette-editor-tabs'),
|
||||
onchange:function(tab) {
|
||||
content.find(".palette-editor-tab").hide();
|
||||
content.find(".red-ui-palette-editor-tab").hide();
|
||||
tab.content.show();
|
||||
if (filterInput) {
|
||||
filterInput.searchBox('value',"");
|
||||
@ -572,7 +572,7 @@ RED.palette.editor = (function() {
|
||||
});
|
||||
|
||||
|
||||
var modulesTab = $('<div>',{class:"palette-editor-tab"}).appendTo(content);
|
||||
var modulesTab = $('<div>',{class:"red-ui-palette-editor-tab"}).appendTo(content);
|
||||
|
||||
editorTabs.addTab({
|
||||
id: 'nodes',
|
||||
@ -591,7 +591,7 @@ RED.palette.editor = (function() {
|
||||
});
|
||||
|
||||
|
||||
nodeList = $('<ol>',{id:"palette-module-list", style:"position: absolute;top: 35px;bottom: 0;left: 0;right: 0px;"}).appendTo(modulesTab).editableList({
|
||||
nodeList = $('<ol>',{id:"red-ui-palette-module-list", style:"position: absolute;top: 35px;bottom: 0;left: 0;right: 0px;"}).appendTo(modulesTab).editableList({
|
||||
addButton: false,
|
||||
scrollOnAdd: false,
|
||||
sort: function(A,B) {
|
||||
@ -607,18 +607,18 @@ RED.palette.editor = (function() {
|
||||
addItem: function(container,i,object) {
|
||||
var entry = object.info;
|
||||
if (entry) {
|
||||
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container);
|
||||
var titleRow = $('<div class="palette-module-meta palette-module-name"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
|
||||
var headerRow = $('<div>',{class:"red-ui-palette-module-header"}).appendTo(container);
|
||||
var titleRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-name"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
|
||||
$('<span>').text(entry.name).appendTo(titleRow);
|
||||
var metaRow = $('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow);
|
||||
var metaRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow);
|
||||
var versionSpan = $('<span>').text(entry.version).appendTo(metaRow);
|
||||
|
||||
var errorRow = $('<div class="palette-module-meta palette-module-errors"><i class="fa fa-warning"></i></div>').hide().appendTo(headerRow);
|
||||
var errorList = $('<ul class="palette-module-error-list"></ul>').appendTo(errorRow);
|
||||
var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow);
|
||||
var setButton = $('<a href="#" class="editor-button editor-button-small palette-module-set-button"><i class="fa fa-angle-right palette-module-node-chevron"></i> </a>').appendTo(buttonRow);
|
||||
var errorRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-errors"><i class="fa fa-warning"></i></div>').hide().appendTo(headerRow);
|
||||
var errorList = $('<ul class="red-ui-palette-module-error-list"></ul>').appendTo(errorRow);
|
||||
var buttonRow = $('<div>',{class:"red-ui-palette-module-meta"}).appendTo(headerRow);
|
||||
var setButton = $('<a href="#" class="editor-button editor-button-small red-ui-palette-module-set-button"><i class="fa fa-angle-right red-ui-palette-module-node-chevron"></i> </a>').appendTo(buttonRow);
|
||||
var setCount = $('<span>').appendTo(setButton);
|
||||
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow);
|
||||
var buttonGroup = $('<div>',{class:"red-ui-palette-module-button-group"}).appendTo(buttonRow);
|
||||
|
||||
var updateButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.update')).appendTo(buttonGroup);
|
||||
updateButton.attr('id','up_'+Math.floor(Math.random()*1000000000));
|
||||
@ -642,8 +642,8 @@ RED.palette.editor = (function() {
|
||||
}
|
||||
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.disableall')).appendTo(buttonGroup);
|
||||
|
||||
var contentRow = $('<div>',{class:"palette-module-content"}).appendTo(container);
|
||||
var shade = $('<div class="palette-module-shade hide"><img src="red/images/spin.svg" class="red-ui-palette-spinner"/></div>').appendTo(container);
|
||||
var contentRow = $('<div>',{class:"red-ui-palette-module-content"}).appendTo(container);
|
||||
var shade = $('<div class="red-ui-palette-module-shade hide"><img src="red/images/spin.svg" class="red-ui-palette-spinner"/></div>').appendTo(container);
|
||||
|
||||
object.elements = {
|
||||
updateButton: updateButton,
|
||||
@ -674,13 +674,13 @@ RED.palette.editor = (function() {
|
||||
});
|
||||
setList.forEach(function(setName) {
|
||||
var set = entry.sets[setName];
|
||||
var setRow = $('<div>',{class:"palette-module-set"}).appendTo(contentRow);
|
||||
var buttonGroup = $('<div>',{class:"palette-module-set-button-group"}).appendTo(setRow);
|
||||
var setRow = $('<div>',{class:"red-ui-palette-module-set"}).appendTo(contentRow);
|
||||
var buttonGroup = $('<div>',{class:"red-ui-palette-module-set-button-group"}).appendTo(setRow);
|
||||
var typeSwatches = {};
|
||||
set.types.forEach(function(t) {
|
||||
var typeDiv = $('<div>',{class:"palette-module-type"}).appendTo(setRow);
|
||||
typeSwatches[t] = $('<span>',{class:"palette-module-type-swatch"}).appendTo(typeDiv);
|
||||
$('<span>',{class:"palette-module-type-node"}).text(t).appendTo(typeDiv);
|
||||
var typeDiv = $('<div>',{class:"red-ui-palette-module-type"}).appendTo(setRow);
|
||||
typeSwatches[t] = $('<span>',{class:"red-ui-palette-module-type-swatch"}).appendTo(typeDiv);
|
||||
$('<span>',{class:"red-ui-palette-module-type-node"}).text(t).appendTo(typeDiv);
|
||||
})
|
||||
var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup);
|
||||
enableButton.on("click", function(evt) {
|
||||
@ -726,7 +726,7 @@ RED.palette.editor = (function() {
|
||||
|
||||
|
||||
|
||||
var installTab = $('<div>',{class:"palette-editor-tab hide"}).appendTo(content);
|
||||
var installTab = $('<div>',{class:"red-ui-palette-editor-tab hide"}).appendTo(content);
|
||||
|
||||
editorTabs.addTab({
|
||||
id: 'install',
|
||||
@ -734,7 +734,7 @@ RED.palette.editor = (function() {
|
||||
content: installTab
|
||||
})
|
||||
|
||||
var toolBar = $('<div>',{class:"palette-editor-toolbar"}).appendTo(installTab);
|
||||
var toolBar = $('<div>',{class:"red-ui-palette-editor-toolbar"}).appendTo(installTab);
|
||||
|
||||
var searchDiv = $('<div>',{class:"red-ui-palette-search"}).appendTo(installTab);
|
||||
searchInput = $('<input type="text" data-i18n="[placeholder]palette.search"></input>')
|
||||
@ -761,9 +761,9 @@ RED.palette.editor = (function() {
|
||||
|
||||
$('<span>').text(RED._("palette.editor.sort")+' ').appendTo(toolBar);
|
||||
var sortGroup = $('<span class="button-group"></span>').appendTo(toolBar);
|
||||
var sortRelevance = $('<a href="#" class="palette-editor-install-sort-option red-ui-sidebar-header-button-toggle selected"><i class="fa fa-sort-amount-desc"></i></a>').appendTo(sortGroup);
|
||||
var sortAZ = $('<a href="#" class="palette-editor-install-sort-option red-ui-sidebar-header-button-toggle" data-i18n="palette.editor.sortAZ"></a>').appendTo(sortGroup);
|
||||
var sortRecent = $('<a href="#" class="palette-editor-install-sort-option red-ui-sidebar-header-button-toggle" data-i18n="palette.editor.sortRecent"></a>').appendTo(sortGroup);
|
||||
var sortRelevance = $('<a href="#" class="red-ui-palette-editor-install-sort-option red-ui-sidebar-header-button-toggle selected"><i class="fa fa-sort-amount-desc"></i></a>').appendTo(sortGroup);
|
||||
var sortAZ = $('<a href="#" class="red-ui-palette-editor-install-sort-option red-ui-sidebar-header-button-toggle" data-i18n="palette.editor.sortAZ"></a>').appendTo(sortGroup);
|
||||
var sortRecent = $('<a href="#" class="red-ui-palette-editor-install-sort-option red-ui-sidebar-header-button-toggle" data-i18n="palette.editor.sortRecent"></a>').appendTo(sortGroup);
|
||||
|
||||
|
||||
var sortOpts = [
|
||||
@ -777,7 +777,7 @@ RED.palette.editor = (function() {
|
||||
if ($(this).hasClass("selected")) {
|
||||
return;
|
||||
}
|
||||
$(".palette-editor-install-sort-option").removeClass("selected");
|
||||
$(".red-ui-palette-editor-install-sort-option").removeClass("selected");
|
||||
$(this).addClass("selected");
|
||||
activeSort = opt.func;
|
||||
refreshFilteredItems();
|
||||
@ -802,8 +802,8 @@ RED.palette.editor = (function() {
|
||||
return
|
||||
}
|
||||
if (object.more) {
|
||||
container.addClass('palette-module-more');
|
||||
var moreRow = $('<div>',{class:"palette-module-header palette-module"}).appendTo(container);
|
||||
container.addClass('red-ui-palette-module-more');
|
||||
var moreRow = $('<div>',{class:"red-ui-palette-module-header palette-module"}).appendTo(container);
|
||||
var moreLink = $('<a href="#"></a>').text(RED._('palette.editor.more',{count:object.more})).appendTo(moreRow);
|
||||
moreLink.on("click", function(e) {
|
||||
e.preventDefault();
|
||||
@ -819,15 +819,15 @@ RED.palette.editor = (function() {
|
||||
}
|
||||
if (object.info) {
|
||||
var entry = object.info;
|
||||
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container);
|
||||
var titleRow = $('<div class="palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
|
||||
$('<span>',{class:"palette-module-name"}).text(entry.name||entry.id).appendTo(titleRow);
|
||||
$('<a target="_blank" class="palette-module-link"><i class="fa fa-external-link"></i></a>').attr('href',entry.url).appendTo(titleRow);
|
||||
var descRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow);
|
||||
$('<div>',{class:"palette-module-description"}).text(entry.description).appendTo(descRow);
|
||||
var metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow);
|
||||
$('<span class="palette-module-version"><i class="fa fa-tag"></i> '+entry.version+'</span>').appendTo(metaRow);
|
||||
$('<span class="palette-module-updated"><i class="fa fa-calendar"></i> '+formatUpdatedAt(entry.updated_at)+'</span>').appendTo(metaRow);
|
||||
var headerRow = $('<div>',{class:"red-ui-palette-module-header"}).appendTo(container);
|
||||
var titleRow = $('<div class="red-ui-palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
|
||||
$('<span>',{class:"red-ui-palette-module-name"}).text(entry.name||entry.id).appendTo(titleRow);
|
||||
$('<a target="_blank" class="red-ui-palette-module-link"><i class="fa fa-external-link"></i></a>').attr('href',entry.url).appendTo(titleRow);
|
||||
var descRow = $('<div class="red-ui-palette-module-meta"></div>').appendTo(headerRow);
|
||||
$('<div>',{class:"red-ui-palette-module-description"}).text(entry.description).appendTo(descRow);
|
||||
var metaRow = $('<div class="red-ui-palette-module-meta"></div>').appendTo(headerRow);
|
||||
$('<span class="red-ui-palette-module-version"><i class="fa fa-tag"></i> '+entry.version+'</span>').appendTo(metaRow);
|
||||
$('<span class="red-ui-palette-module-updated"><i class="fa fa-calendar"></i> '+formatUpdatedAt(entry.updated_at)+'</span>').appendTo(metaRow);
|
||||
|
||||
var duplicateType = false;
|
||||
if (entry.types && entry.types.length > 0) {
|
||||
@ -839,11 +839,11 @@ RED.palette.editor = (function() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// $('<div>',{class:"palette-module-meta"}).text(entry.types.join(",")).appendTo(headerRow);
|
||||
// $('<div>',{class:"red-ui-palette-module-meta"}).text(entry.types.join(",")).appendTo(headerRow);
|
||||
}
|
||||
|
||||
var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow);
|
||||
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow);
|
||||
var buttonRow = $('<div>',{class:"red-ui-palette-module-meta"}).appendTo(headerRow);
|
||||
var buttonGroup = $('<div>',{class:"red-ui-palette-module-button-group"}).appendTo(buttonRow);
|
||||
var installButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.install')).appendTo(buttonGroup);
|
||||
installButton.on("click", function(e) {
|
||||
e.preventDefault();
|
||||
@ -875,7 +875,7 @@ RED.palette.editor = (function() {
|
||||
}
|
||||
});
|
||||
|
||||
$('<div id="palette-module-install-shade" class="palette-module-shade hide"><div class="palette-module-shade-status"></div><img src="red/images/spin.svg" class="red-ui-palette-spinner"/></div>').appendTo(installTab);
|
||||
$('<div id="red-ui-palette-module-install-shade" class="red-ui-palette-module-shade hide"><div class="red-ui-palette-module-shade-status"></div><img src="red/images/spin.svg" class="red-ui-palette-spinner"/></div>').appendTo(installTab);
|
||||
}
|
||||
function update(entry,version,container,done) {
|
||||
if (RED.settings.theme('palette.editable') === false) {
|
||||
@ -894,7 +894,7 @@ RED.palette.editor = (function() {
|
||||
},
|
||||
{
|
||||
text: RED._("palette.editor.confirm.button.update"),
|
||||
class: "primary palette-module-install-confirm-button-update",
|
||||
class: "primary red-ui-palette-module-install-confirm-button-update",
|
||||
click: function() {
|
||||
var spinner = RED.utils.addSpinnerOverlay(container, true);
|
||||
var buttonRow = $('<div style="position: relative;bottom: calc(50% + 17px); padding-right: 10px;text-align: right;"></div>').appendTo(spinner);
|
||||
@ -953,7 +953,7 @@ RED.palette.editor = (function() {
|
||||
},
|
||||
{
|
||||
text: RED._("palette.editor.confirm.button.remove"),
|
||||
class: "primary palette-module-install-confirm-button-remove",
|
||||
class: "primary red-ui-palette-module-install-confirm-button-remove",
|
||||
click: function() {
|
||||
var spinner = RED.utils.addSpinnerOverlay(container, true);
|
||||
var buttonRow = $('<div style="position: relative;bottom: calc(50% + 17px); padding-right: 10px;text-align: right;"></div>').appendTo(spinner);
|
||||
@ -1009,7 +1009,7 @@ RED.palette.editor = (function() {
|
||||
if (entry.url) {
|
||||
buttons.push({
|
||||
text: RED._("palette.editor.confirm.button.review"),
|
||||
class: "primary palette-module-install-confirm-button-install",
|
||||
class: "primary red-ui-palette-module-install-confirm-button-install",
|
||||
click: function() {
|
||||
var url = entry.url||"";
|
||||
window.open(url);
|
||||
@ -1018,7 +1018,7 @@ RED.palette.editor = (function() {
|
||||
}
|
||||
buttons.push({
|
||||
text: RED._("palette.editor.confirm.button.install"),
|
||||
class: "primary palette-module-install-confirm-button-install",
|
||||
class: "primary red-ui-palette-module-install-confirm-button-install",
|
||||
click: function() {
|
||||
var spinner = RED.utils.addSpinnerOverlay(container, true);
|
||||
|
||||
|
@ -46,7 +46,6 @@ RED.projects.settings = (function() {
|
||||
}
|
||||
|
||||
settingsVisible = true;
|
||||
var tabContainer;
|
||||
|
||||
var trayOptions = {
|
||||
title: RED._("sidebar.project.projectSettings.title"),
|
||||
@ -68,7 +67,7 @@ RED.projects.settings = (function() {
|
||||
|
||||
var trayBody = tray.find('.red-ui-tray-body');
|
||||
var settingsContent = $('<div></div>').appendTo(trayBody);
|
||||
var tabContainer = $('<div></div>',{id:"user-settings-tabs-container"}).appendTo(settingsContent);
|
||||
var tabContainer = $('<div></div>',{class:"red-ui-settings-tabs-container"}).appendTo(settingsContent);
|
||||
|
||||
$('<ul></ul>',{id:"user-settings-tabs"}).appendTo(tabContainer);
|
||||
var settingsTabs = RED.tabs.create({
|
||||
@ -76,7 +75,7 @@ RED.projects.settings = (function() {
|
||||
vertical: true,
|
||||
onchange: function(tab) {
|
||||
setTimeout(function() {
|
||||
$("#user-settings-tabs-content").children().hide();
|
||||
tabContents.children().hide();
|
||||
$("#" + tab.id).show();
|
||||
if (tab.pane.focus) {
|
||||
tab.pane.focus();
|
||||
@ -84,7 +83,7 @@ RED.projects.settings = (function() {
|
||||
},50);
|
||||
}
|
||||
});
|
||||
var tabContents = $('<div></div>',{id:"user-settings-tabs-content"}).appendTo(settingsContent);
|
||||
var tabContents = $('<div></div>',{class:"red-ui-settings-tabs-content"}).appendTo(settingsContent);
|
||||
|
||||
panes.forEach(function(pane) {
|
||||
settingsTabs.addTab({
|
||||
@ -393,17 +392,17 @@ RED.projects.settings = (function() {
|
||||
addButton: false,
|
||||
addItem: function(row,index,entry) {
|
||||
// console.log(entry);
|
||||
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(row);
|
||||
var headerRow = $('<div>',{class:"red-ui-palette-module-header"}).appendTo(row);
|
||||
if (entry.label) {
|
||||
if (entry.index === 0) {
|
||||
headerRow.addClass("red-ui-search-empty")
|
||||
} else {
|
||||
row.parent().addClass("palette-module-section");
|
||||
row.parent().addClass("red-ui-palette-module-section");
|
||||
}
|
||||
headerRow.text(entry.label);
|
||||
// if (RED.user.hasPermission("projects.write")) {
|
||||
// if (entry.index === 1) {
|
||||
// var addButton = $('<button class="editor-button editor-button-small palette-module-button">add to project</button>').appendTo(headerRow).on("click", function(evt) {
|
||||
// var addButton = $('<button class="editor-button editor-button-small red-ui-palette-module-button">add to project</button>').appendTo(headerRow).on("click", function(evt) {
|
||||
// evt.preventDefault();
|
||||
// var deps = $.extend(true, {}, activeProject.dependencies);
|
||||
// for (var m in modulesInUse) {
|
||||
@ -414,7 +413,7 @@ RED.projects.settings = (function() {
|
||||
// editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList);
|
||||
// });
|
||||
// } else if (entry.index === 3) {
|
||||
// var removeButton = $('<button class="editor-button editor-button-small palette-module-button">remove from project</button>').appendTo(headerRow).on("click", function(evt) {
|
||||
// var removeButton = $('<button class="editor-button editor-button-small red-ui-palette-module-button">remove from project</button>').appendTo(headerRow).on("click", function(evt) {
|
||||
// evt.preventDefault();
|
||||
// var deps = $.extend(true, {}, activeProject.dependencies);
|
||||
// for (var m in activeProject.dependencies) {
|
||||
@ -427,17 +426,17 @@ RED.projects.settings = (function() {
|
||||
// }
|
||||
// }
|
||||
} else {
|
||||
headerRow.addClass("palette-module-header");
|
||||
headerRow.addClass("red-ui-palette-module-header");
|
||||
if (!entry.installed) {
|
||||
headerRow.addClass("palette-module-not-installed");
|
||||
headerRow.addClass("red-ui-palette-module-not-installed");
|
||||
} else if (entry.count === 0) {
|
||||
headerRow.addClass("palette-module-unused");
|
||||
headerRow.addClass("red-ui-palette-module-unused");
|
||||
} else if (!entry.known) {
|
||||
headerRow.addClass("palette-module-unknown");
|
||||
headerRow.addClass("red-ui-palette-module-unknown");
|
||||
}
|
||||
|
||||
entry.element = headerRow;
|
||||
var titleRow = $('<div class="palette-module-meta palette-module-name"></div>').appendTo(headerRow);
|
||||
var titleRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-name"></div>').appendTo(headerRow);
|
||||
var iconClass = "fa-cube";
|
||||
if (!entry.installed) {
|
||||
iconClass = "fa-warning";
|
||||
@ -445,10 +444,10 @@ RED.projects.settings = (function() {
|
||||
var icon = $('<i class="fa '+iconClass+'"></i>').appendTo(titleRow);
|
||||
entry.icon = icon;
|
||||
$('<span>').text(entry.id).appendTo(titleRow);
|
||||
var metaRow = $('<div class="palette-module-meta palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow);
|
||||
var metaRow = $('<div class="red-ui-palette-module-meta red-ui-palette-module-version"><i class="fa fa-tag"></i></div>').appendTo(headerRow);
|
||||
var versionSpan = $('<span>').text(entry.version).appendTo(metaRow);
|
||||
metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow);
|
||||
var buttons = $('<div class="palette-module-button-group"></div>').appendTo(metaRow);
|
||||
metaRow = $('<div class="red-ui-palette-module-meta"></div>').appendTo(headerRow);
|
||||
var buttons = $('<div class="red-ui-palette-module-button-group"></div>').appendTo(metaRow);
|
||||
if (RED.user.hasPermission("projects.write")) {
|
||||
if (!entry.installed && RED.settings.theme('palette.editable') !== false) {
|
||||
$('<a href="#" class="editor-button editor-button-small">' + RED._("sidebar.project.projectSettings.install") + '</a>').appendTo(buttons)
|
||||
@ -496,7 +495,7 @@ RED.projects.settings = (function() {
|
||||
saveDependencies(depsList,row,deps,function(err) {
|
||||
if (!err) {
|
||||
buttons.remove();
|
||||
headerRow.removeClass("palette-module-unknown");
|
||||
headerRow.removeClass("red-ui-palette-module-unknown");
|
||||
} else {
|
||||
console.log(err);
|
||||
}
|
||||
@ -729,7 +728,7 @@ RED.projects.settings = (function() {
|
||||
|
||||
function createFilesSection(activeProject,pane) {
|
||||
var title = $('<h3></h3>').text(RED._("sidebar.project.projectSettings.files")).appendTo(pane);
|
||||
var filesContainer = $('<div class="user-settings-section"></div>').appendTo(pane);
|
||||
var filesContainer = $('<div class="red-ui-settings-section"></div>').appendTo(pane);
|
||||
if (RED.user.hasPermission("projects.write")) {
|
||||
var editFilesButton = $('<button type="button" id="project-settings-tab-settings-file-edit" class="editor-button editor-button-small" style="float: right;">' + RED._('sidebar.project.projectSettings.edit') + '</button>')
|
||||
.appendTo(title)
|
||||
@ -754,7 +753,7 @@ RED.projects.settings = (function() {
|
||||
|
||||
// credentialStateLabel.parent().hide();
|
||||
credentialStateLabel.addClass("uneditable-input");
|
||||
$(".user-settings-row-credentials").show();
|
||||
$(".red-ui-settings-row-credentials").show();
|
||||
credentialStateLabel.css('height','auto');
|
||||
credentialFormRows.hide();
|
||||
credentialSecretButtons.show();
|
||||
@ -763,7 +762,7 @@ RED.projects.settings = (function() {
|
||||
var row;
|
||||
|
||||
// Flow files
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(filesContainer);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(filesContainer);
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.package")).appendTo(row);
|
||||
var packageFileLabel = $('<div class="uneditable-input" style="padding:0">').appendTo(row);
|
||||
var packageFileLabelText = $('<span style="display:inline-block; padding: 6px">').text(activeProject.files.package||"package.json").appendTo(packageFileLabel);
|
||||
@ -819,7 +818,7 @@ RED.projects.settings = (function() {
|
||||
var projectRoot = projectPackage.substring(0,projectPackage.length - 12);
|
||||
|
||||
// Flow files
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(filesContainer);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(filesContainer);
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.flow")).appendTo(row);
|
||||
var flowFileLabel = $('<div class="uneditable-input" style="padding:0">').appendTo(row);
|
||||
var flowFileLabelPrefixText = $('<span style="display:inline-block; padding: 6px 0 6px 6px">').text(projectRoot).appendTo(flowFileLabel);
|
||||
@ -879,7 +878,7 @@ RED.projects.settings = (function() {
|
||||
})
|
||||
RED.popover.tooltip(flowFileInputSearch,RED._("sidebar.project.projectSettings.selectFile"));
|
||||
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(filesContainer);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(filesContainer);
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.credentials")).appendTo(row);
|
||||
|
||||
var credFileName = "flows_cred.json";
|
||||
@ -942,7 +941,7 @@ RED.projects.settings = (function() {
|
||||
// }
|
||||
|
||||
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(filesContainer);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(filesContainer);
|
||||
|
||||
$('<label></label>').appendTo(row);
|
||||
var credentialStateLabel = $('<span><i class="user-settings-credentials-state-icon fa"></i> <span class="user-settings-credentials-state"></span></span>').appendTo(row);
|
||||
@ -1006,7 +1005,7 @@ RED.projects.settings = (function() {
|
||||
|
||||
RED.popover.tooltip(credentialSecretEditButton,RED._("sidebar.project.projectSettings.changeTheEncryptionKey"));
|
||||
|
||||
row = $('<div class="user-settings-row user-settings-row-credentials"></div>').hide().appendTo(filesContainer);
|
||||
row = $('<div class="red-ui-settings-row red-ui-settings-row-credentials"></div>').hide().appendTo(filesContainer);
|
||||
|
||||
|
||||
|
||||
@ -1016,7 +1015,7 @@ RED.projects.settings = (function() {
|
||||
var credentialChangeLabel = $('<div style="margin: 20px 0 10px 5px;">' + RED._("sidebar.project.projectSettings.changeTheEncryptionKey") + '</div>').hide().appendTo(credentialFormRows);
|
||||
var credentialResetLabel = $('<div style="margin: 20px 0 10px 5px;">' + RED._("sidebar.project.projectSettings.resetTheEncryptionKey") + '</div>').hide().appendTo(credentialFormRows);
|
||||
|
||||
var credentialSecretExistingRow = $('<div class="user-settings-row user-settings-row-credentials"></div>').appendTo(credentialFormRows);
|
||||
var credentialSecretExistingRow = $('<div class="red-ui-settings-row red-ui-settings-row-credentials"></div>').appendTo(credentialFormRows);
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.currentKey")).appendTo(credentialSecretExistingRow);
|
||||
var credentialSecretExistingInput = $('<input type="password">').appendTo(credentialSecretExistingRow)
|
||||
.on("change keyup paste",function() {
|
||||
@ -1027,7 +1026,7 @@ RED.projects.settings = (function() {
|
||||
checkFiles();
|
||||
});
|
||||
|
||||
var credentialSecretNewRow = $('<div class="user-settings-row user-settings-row-credentials"></div>').appendTo(credentialFormRows);
|
||||
var credentialSecretNewRow = $('<div class="red-ui-settings-row red-ui-settings-row-credentials"></div>').appendTo(credentialFormRows);
|
||||
|
||||
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.newKey")).appendTo(credentialSecretNewRow);
|
||||
@ -1055,7 +1054,7 @@ RED.projects.settings = (function() {
|
||||
flowFileLabel.css('height','');
|
||||
flowFileLabel.css('color','');
|
||||
|
||||
$(".user-settings-row-credentials").hide();
|
||||
$(".red-ui-settings-row-credentials").hide();
|
||||
credentialFormRows.hide();
|
||||
credentialSecretButtons.hide();
|
||||
credentialSecretResetButton.removeClass("selected");
|
||||
@ -1179,10 +1178,10 @@ RED.projects.settings = (function() {
|
||||
}
|
||||
|
||||
function createLocalBranchListSection(activeProject,pane) {
|
||||
var localBranchContainer = $('<div class="user-settings-section"></div>').appendTo(pane);
|
||||
var localBranchContainer = $('<div class="red-ui-settings-section"></div>').appendTo(pane);
|
||||
$('<h4></h4>').text(RED._("sidebar.project.projectSettings.branches")).appendTo(localBranchContainer);
|
||||
|
||||
var row = $('<div class="user-settings-row projects-dialog-list"></div>').appendTo(localBranchContainer);
|
||||
var row = $('<div class="red-ui-settings-row projects-dialog-list"></div>').appendTo(localBranchContainer);
|
||||
|
||||
|
||||
var branchList = $('<ol>').appendTo(row).editableList({
|
||||
@ -1317,7 +1316,7 @@ RED.projects.settings = (function() {
|
||||
|
||||
createLocalBranchListSection(activeProject,pane);
|
||||
|
||||
var repoContainer = $('<div class="user-settings-section"></div>').appendTo(pane);
|
||||
var repoContainer = $('<div class="red-ui-settings-section"></div>').appendTo(pane);
|
||||
var title = $('<h4></h4>').text(RED._("sidebar.project.projectSettings.gitRemotes")).appendTo(repoContainer);
|
||||
|
||||
var editRepoButton = $('<button class="editor-button editor-button-small" style="float: right; margin-right: 10px;">' + RED._("sidebar.project.projectSettings.addRemote") + '</button>')
|
||||
@ -1339,9 +1338,9 @@ RED.projects.settings = (function() {
|
||||
|
||||
var emptyItem = { empty: true };
|
||||
var isEmpty = true;
|
||||
var row = $('<div class="user-settings-row"></div>').appendTo(repoContainer);
|
||||
var row = $('<div class="red-ui-settings-row"></div>').appendTo(repoContainer);
|
||||
var addRemoteDialog = $('<div class="projects-dialog-list-dialog"></div>').hide().appendTo(row);
|
||||
row = $('<div class="user-settings-row projects-dialog-list"></div>').appendTo(repoContainer);
|
||||
row = $('<div class="red-ui-settings-row projects-dialog-list"></div>').appendTo(repoContainer);
|
||||
var remotesList = $('<ol>').appendTo(row);
|
||||
remotesList.editableList({
|
||||
addButton: false,
|
||||
@ -1464,14 +1463,14 @@ RED.projects.settings = (function() {
|
||||
|
||||
$('<div class="projects-dialog-list-dialog-header">').text(RED._('sidebar.project.projectSettings.addRemote2')).appendTo(addRemoteDialog);
|
||||
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(addRemoteDialog);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(addRemoteDialog);
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.remoteName")).appendTo(row);
|
||||
var remoteNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() {
|
||||
remoteNameInputChanged = true;
|
||||
validateForm();
|
||||
});
|
||||
$('<label class="projects-edit-form-sublabel"><small>' + RED._("sidebar.project.projectSettings.nameRule") + '</small></label>').appendTo(row).find("small");
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(addRemoteDialog);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(addRemoteDialog);
|
||||
$('<label for=""></label>').text(RED._("sidebar.project.projectSettings.url")).appendTo(row);
|
||||
var remoteURLInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() {
|
||||
remoteURLInputChanged = true;
|
||||
|
@ -26,15 +26,15 @@ RED.projects.userSettings = (function() {
|
||||
|
||||
var title = $('<h3></h3>').text(RED._("editor:sidebar.project.userSettings.committerDetail")).appendTo(pane);
|
||||
|
||||
var gitconfigContainer = $('<div class="user-settings-section"></div>').appendTo(pane);
|
||||
var gitconfigContainer = $('<div class="red-ui-settings-section"></div>').appendTo(pane);
|
||||
$('<div style="color:#aaa;"></div>').appendTo(gitconfigContainer).text(RED._("editor:sidebar.project.userSettings.committerTip"));
|
||||
|
||||
var row = $('<div class="user-settings-row"></div>').appendTo(gitconfigContainer);
|
||||
var row = $('<div class="red-ui-settings-row"></div>').appendTo(gitconfigContainer);
|
||||
$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(row);
|
||||
gitUsernameInput = $('<input type="text">').appendTo(row);
|
||||
gitUsernameInput.val(currentGitSettings.user.name||"");
|
||||
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(gitconfigContainer);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(gitconfigContainer);
|
||||
$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(row);
|
||||
gitEmailInput = $('<input type="text">').appendTo(row);
|
||||
gitEmailInput.val(currentGitSettings.user.email||"");
|
||||
@ -42,7 +42,7 @@ RED.projects.userSettings = (function() {
|
||||
|
||||
|
||||
function createSSHKeySection(pane) {
|
||||
var container = $('<div class="user-settings-section"></div>').appendTo(pane);
|
||||
var container = $('<div class="red-ui-settings-section"></div>').appendTo(pane);
|
||||
var popover;
|
||||
var title = $('<h3></h3>').text(RED._("editor:sidebar.project.userSettings.sshKeys")).appendTo(container);
|
||||
var subtitle = $('<div style="color:#aaa;"></div>').appendTo(container).text(RED._("editor:sidebar.project.userSettings.sshKeysTip"));
|
||||
@ -89,12 +89,12 @@ RED.projects.userSettings = (function() {
|
||||
}
|
||||
};
|
||||
|
||||
var row = $('<div class="user-settings-row"></div>').appendTo(container);
|
||||
var row = $('<div class="red-ui-settings-row"></div>').appendTo(container);
|
||||
var addKeyDialog = $('<div class="projects-dialog-list-dialog"></div>').hide().appendTo(row);
|
||||
$('<div class="projects-dialog-list-dialog-header">').text(RED._("editor:sidebar.project.userSettings.addSshKey")).appendTo(addKeyDialog);
|
||||
var addKeyDialogBody = $('<div>').appendTo(addKeyDialog);
|
||||
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(addKeyDialogBody);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(addKeyDialogBody);
|
||||
$('<div style="color:#aaa;"></div>').appendTo(row).text(RED._("editor:sidebar.project.userSettings.addSshKeyTip"));
|
||||
// var bg = $('<div></div>',{class:"button-group", style:"text-align: center"}).appendTo(row);
|
||||
// var addLocalButton = $('<button class="editor-button toggle selected">use local key</button>').appendTo(bg);
|
||||
@ -124,7 +124,7 @@ RED.projects.userSettings = (function() {
|
||||
// })
|
||||
|
||||
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(addKeyDialogBody);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(addKeyDialogBody);
|
||||
$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.name")).appendTo(row);
|
||||
var keyNameInputChanged = false;
|
||||
var keyNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() {
|
||||
@ -134,27 +134,27 @@ RED.projects.userSettings = (function() {
|
||||
$('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.nameRule")+'</small></label>').appendTo(row).find("small");
|
||||
|
||||
var generateKeyPane = $('<div>').appendTo(addKeyDialogBody);
|
||||
row = $('<div class="user-settings-row"></div>').appendTo(generateKeyPane);
|
||||
row = $('<div class="red-ui-settings-row"></div>').appendTo(generateKeyPane);
|
||||
$('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.passphrase")).appendTo(row);
|
||||
var passphraseInput = $('<input type="password">').appendTo(row).on("change keyup paste",validateForm);
|
||||
var passphraseInputSubLabel = $('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.optional")+'</small></label>').appendTo(row).find("small");
|
||||
|
||||
// var addLocalKeyPane = $('<div>').hide().appendTo(addKeyDialogBody);
|
||||
// row = $('<div class="user-settings-row"></div>').appendTo(addLocalKeyPane);
|
||||
// row = $('<div class="red-ui-settings-row"></div>').appendTo(addLocalKeyPane);
|
||||
// $('<label for=""></label>').text('Public key').appendTo(row);
|
||||
// var localPublicKeyPathInput = $('<input type="text">').appendTo(row).on("change keyup paste",validateForm);
|
||||
// $('<label class="projects-edit-form-sublabel"><small>Public key file path, for example: ~/.ssh/id_rsa.pub</small></label>').appendTo(row).find("small");
|
||||
// row = $('<div class="user-settings-row"></div>').appendTo(addLocalKeyPane);
|
||||
// row = $('<div class="red-ui-settings-row"></div>').appendTo(addLocalKeyPane);
|
||||
// $('<label for=""></label>').text('Private key').appendTo(row);
|
||||
// var localPrivateKeyPathInput = $('<input type="text">').appendTo(row).on("change keyup paste",validateForm);
|
||||
// $('<label class="projects-edit-form-sublabel"><small>Private key file path, for example: ~/.ssh/id_rsa</small></label>').appendTo(row).find("small");
|
||||
//
|
||||
// var uploadKeyPane = $('<div>').hide().appendTo(addKeyDialogBody);
|
||||
// row = $('<div class="user-settings-row"></div>').appendTo(uploadKeyPane);
|
||||
// row = $('<div class="red-ui-settings-row"></div>').appendTo(uploadKeyPane);
|
||||
// $('<label for=""></label>').text('Public key').appendTo(row);
|
||||
// var publicKeyInput = $('<textarea>').appendTo(row).on("change keyup paste",validateForm);
|
||||
// $('<label class="projects-edit-form-sublabel"><small>Paste in public key contents, for example: ~/.ssh/id_rsa.pub</small></label>').appendTo(row).find("small");
|
||||
// row = $('<div class="user-settings-row"></div>').appendTo(uploadKeyPane);
|
||||
// row = $('<div class="red-ui-settings-row"></div>').appendTo(uploadKeyPane);
|
||||
// $('<label for=""></label>').text('Private key').appendTo(row);
|
||||
// var privateKeyInput = $('<textarea>').appendTo(row).on("change keyup paste",validateForm);
|
||||
// $('<label class="projects-edit-form-sublabel"><small>Paste in private key contents, for example: ~/.ssh/id_rsa</small></label>').appendTo(row).find("small");
|
||||
@ -239,7 +239,7 @@ RED.projects.userSettings = (function() {
|
||||
},payload);
|
||||
});
|
||||
|
||||
row = $('<div class="user-settings-row projects-dialog-list"></div>').appendTo(container);
|
||||
row = $('<div class="red-ui-settings-row projects-dialog-list"></div>').appendTo(container);
|
||||
var emptyItem = { empty: true };
|
||||
var expandKey = function(container,entry) {
|
||||
var row = $('<div class="projects-dialog-ssh-public-key">',{style:"position:relative"}).appendTo(container);
|
||||
@ -389,7 +389,7 @@ RED.projects.userSettings = (function() {
|
||||
}
|
||||
|
||||
function createSettingsPane(activeProject) {
|
||||
var pane = $('<div id="user-settings-tab-gitconfig" class="project-settings-tab-pane node-help"></div>');
|
||||
var pane = $('<div id="red-ui-settings-tab-gitconfig" class="project-settings-tab-pane node-help"></div>');
|
||||
createGitUserSection(pane);
|
||||
createSSHKeySection(pane);
|
||||
return pane;
|
||||
|
@ -104,7 +104,7 @@ RED.projects = (function() {
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
// id: "clipboard-dialog-cancel",
|
||||
// id: "red-ui-clipboard-dialog-cancel",
|
||||
text: RED._("projects.welcome.openExistingProject"),
|
||||
class: "secondary",
|
||||
click: function() {
|
||||
@ -116,7 +116,7 @@ RED.projects = (function() {
|
||||
},
|
||||
|
||||
{
|
||||
// id: "clipboard-dialog-cancel",
|
||||
// id: "red-ui-clipboard-dialog-cancel",
|
||||
text: RED._("projects.welcome.not-right-now"),
|
||||
click: function() {
|
||||
createProjectOptions = {};
|
||||
@ -179,7 +179,7 @@ RED.projects = (function() {
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
// id: "clipboard-dialog-cancel",
|
||||
// id: "red-ui-clipboard-dialog-cancel",
|
||||
text: RED._("common.label.back"),
|
||||
click: function() {
|
||||
show('welcome');
|
||||
@ -769,7 +769,7 @@ RED.projects = (function() {
|
||||
buttons: function(options) {
|
||||
return [
|
||||
{
|
||||
// id: "clipboard-dialog-cancel",
|
||||
// id: "red-ui-clipboard-dialog-cancel",
|
||||
text: RED._(options.existingProject ? "common.label.cancel": "common.label.back"),
|
||||
click: function() {
|
||||
if (options.existingProject) {
|
||||
@ -928,7 +928,7 @@ RED.projects = (function() {
|
||||
buttons: function(options) {
|
||||
return [
|
||||
{
|
||||
// id: "clipboard-dialog-cancel",
|
||||
// id: "red-ui-clipboard-dialog-cancel",
|
||||
text: RED._("common.label.back"),
|
||||
click: function() {
|
||||
show('default-files',options);
|
||||
|
@ -34,7 +34,6 @@ RED.userSettings = (function() {
|
||||
return;
|
||||
}
|
||||
settingsVisible = true;
|
||||
var tabContainer;
|
||||
|
||||
var trayOptions = {
|
||||
title: RED._("menu.label.userSettings"),
|
||||
@ -54,7 +53,7 @@ RED.userSettings = (function() {
|
||||
open: function(tray) {
|
||||
var trayBody = tray.find('.red-ui-tray-body');
|
||||
var settingsContent = $('<div></div>').appendTo(trayBody);
|
||||
var tabContainer = $('<div></div>',{id:"user-settings-tabs-container"}).appendTo(settingsContent);
|
||||
var tabContainer = $('<div></div>',{class:"red-ui-settings-tabs-container"}).appendTo(settingsContent);
|
||||
|
||||
$('<ul></ul>',{id:"user-settings-tabs"}).appendTo(tabContainer);
|
||||
var settingsTabs = RED.tabs.create({
|
||||
@ -62,7 +61,7 @@ RED.userSettings = (function() {
|
||||
vertical: true,
|
||||
onchange: function(tab) {
|
||||
setTimeout(function() {
|
||||
$("#user-settings-tabs-content").children().hide();
|
||||
tabContents.children().hide();
|
||||
$("#" + tab.id).show();
|
||||
if (tab.pane.focus) {
|
||||
tab.pane.focus();
|
||||
@ -70,18 +69,18 @@ RED.userSettings = (function() {
|
||||
},50);
|
||||
}
|
||||
});
|
||||
var tabContents = $('<div></div>',{id:"user-settings-tabs-content"}).appendTo(settingsContent);
|
||||
var tabContents = $('<div></div>',{class:"red-ui-settings-tabs-content"}).appendTo(settingsContent);
|
||||
|
||||
panes.forEach(function(pane) {
|
||||
settingsTabs.addTab({
|
||||
id: "user-settings-tab-"+pane.id,
|
||||
id: "red-ui-settings-tab-"+pane.id,
|
||||
label: pane.title,
|
||||
pane: pane
|
||||
});
|
||||
pane.get().hide().appendTo(tabContents);
|
||||
});
|
||||
settingsContent.i18n();
|
||||
settingsTabs.activateTab("user-settings-tab-"+(initialTab||'view'))
|
||||
settingsTabs.activateTab("red-ui-settings-tab-"+(initialTab||'view'))
|
||||
$("#red-ui-sidebar-shade").show();
|
||||
},
|
||||
close: function() {
|
||||
@ -134,7 +133,7 @@ RED.userSettings = (function() {
|
||||
|
||||
function createViewPane() {
|
||||
|
||||
var pane = $('<div id="user-settings-tab-view" class="node-help"></div>');
|
||||
var pane = $('<div id="red-ui-settings-tab-view" class="node-help"></div>');
|
||||
|
||||
var currentEditorSettings = RED.settings.get('editor') || {};
|
||||
currentEditorSettings.view = currentEditorSettings.view || {};
|
||||
@ -150,7 +149,7 @@ RED.userSettings = (function() {
|
||||
} else {
|
||||
initialState = currentEditorSettings.view[opt.setting];
|
||||
}
|
||||
var row = $('<div class="user-settings-row"></div>').appendTo(pane);
|
||||
var row = $('<div class="red-ui-settings-row"></div>').appendTo(pane);
|
||||
var input;
|
||||
if (opt.toggle) {
|
||||
input = $('<label for="user-settings-'+opt.setting+'"><input id="user-settings-'+opt.setting+'" type="checkbox"> '+RED._(opt.label)+'</label>').appendTo(row).find("input");
|
||||
|
@ -26,20 +26,20 @@ RED.utils = (function() {
|
||||
function buildMessageSummaryValue(value) {
|
||||
var result;
|
||||
if (Array.isArray(value)) {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('array['+value.length+']');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('array['+value.length+']');
|
||||
} else if (value === null) {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-null">null</span>');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-null">null</span>');
|
||||
} else if (typeof value === 'object') {
|
||||
if (value.hasOwnProperty('type') && value.type === 'Buffer' && value.hasOwnProperty('data')) {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('buffer['+value.length+']');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('buffer['+value.length+']');
|
||||
} else if (value.hasOwnProperty('type') && value.type === 'array' && value.hasOwnProperty('data')) {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('array['+value.length+']');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('array['+value.length+']');
|
||||
} else if (value.hasOwnProperty('type') && value.type === 'function') {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-meta"></span>').text('function');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta"></span>').text('function');
|
||||
} else if (value.hasOwnProperty('type') && value.type === 'number') {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-number"></span>').text(value.data);
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number"></span>').text(value.data);
|
||||
} else {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-meta">object</span>');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-meta">object</span>');
|
||||
}
|
||||
} else if (typeof value === 'string') {
|
||||
var subvalue;
|
||||
@ -48,16 +48,16 @@ RED.utils = (function() {
|
||||
} else {
|
||||
subvalue = sanitize(value);
|
||||
}
|
||||
result = $('<span class="debug-message-object-value debug-message-type-string"></span>').html('"'+formatString(subvalue)+'"');
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-string"></span>').html('"'+formatString(subvalue)+'"');
|
||||
} else if (typeof value === 'number') {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-number"></span>').text(""+value);
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-number"></span>').text(""+value);
|
||||
} else {
|
||||
result = $('<span class="debug-message-object-value debug-message-type-other"></span>').text(""+value);
|
||||
result = $('<span class="red-ui-debug-msg-object-value red-ui-debug-msg-type-other"></span>').text(""+value);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function makeExpandable(el,onbuild,ontoggle,expand) {
|
||||
el.addClass("debug-message-expandable");
|
||||
el.addClass("red-ui-debug-msg-expandable");
|
||||
el.prop('toggle',function() {
|
||||
return function(state) {
|
||||
var parent = el.parent();
|
||||
@ -117,8 +117,8 @@ RED.utils = (function() {
|
||||
if (!pinnedPaths.hasOwnProperty(sourceId)) {
|
||||
pinnedPaths[sourceId] = {}
|
||||
}
|
||||
var tools = $('<span class="debug-message-tools"></span>').appendTo(obj);
|
||||
var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools);
|
||||
var tools = $('<span class="red-ui-debug-msg-tools"></span>').appendTo(obj);
|
||||
var copyTools = $('<span class="red-ui-debug-msg-tools-copy button-group"></span>').appendTo(tools);
|
||||
if (!!key) {
|
||||
var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).on("click", function(e) {
|
||||
e.preventDefault();
|
||||
@ -134,24 +134,24 @@ RED.utils = (function() {
|
||||
if (strippedKey !== undefined && strippedKey !== '') {
|
||||
var isPinned = pinnedPaths[sourceId].hasOwnProperty(strippedKey);
|
||||
|
||||
var pinPath = $('<button class="editor-button editor-button-small debug-message-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(tools).on("click", function(e) {
|
||||
var pinPath = $('<button class="editor-button editor-button-small red-ui-debug-msg-tools-pin"><i class="fa fa-map-pin"></i></button>').appendTo(tools).on("click", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) {
|
||||
delete pinnedPaths[sourceId][strippedKey];
|
||||
$(this).removeClass("selected");
|
||||
obj.removeClass("debug-message-row-pinned");
|
||||
obj.removeClass("red-ui-debug-msg-row-pinned");
|
||||
} else {
|
||||
var rootedPath = "$"+(strippedKey[0] === '['?"":".")+strippedKey;
|
||||
pinnedPaths[sourceId][strippedKey] = normalisePropertyExpression(rootedPath);
|
||||
$(this).addClass("selected");
|
||||
obj.addClass("debug-message-row-pinned");
|
||||
obj.addClass("red-ui-debug-msg-row-pinned");
|
||||
}
|
||||
}).toggleClass("selected",isPinned);
|
||||
obj.toggleClass("debug-message-row-pinned",isPinned);
|
||||
obj.toggleClass("red-ui-debug-msg-row-pinned",isPinned);
|
||||
}
|
||||
if (extraTools) {
|
||||
extraTools.addClass("debug-message-tools-other");
|
||||
extraTools.addClass("red-ui-debug-msg-tools-other");
|
||||
extraTools.appendTo(tools);
|
||||
}
|
||||
}
|
||||
@ -243,10 +243,10 @@ RED.utils = (function() {
|
||||
}
|
||||
if (format === 'raw') {
|
||||
button.text('raw');
|
||||
element.removeClass('debug-message-buffer-string').addClass('debug-message-buffer-raw');
|
||||
element.removeClass('red-ui-debug-msg-buffer-string').addClass('red-ui-debug-msg-buffer-raw');
|
||||
} else if (format === 'string') {
|
||||
button.text('string');
|
||||
element.addClass('debug-message-buffer-string').removeClass('debug-message-buffer-raw');
|
||||
element.addClass('red-ui-debug-msg-buffer-string').removeClass('red-ui-debug-msg-buffer-raw');
|
||||
}
|
||||
}
|
||||
|
||||
@ -275,16 +275,16 @@ RED.utils = (function() {
|
||||
if (path !== undefined && rootPath !== undefined) {
|
||||
strippedKey = path.substring(rootPath.length+(path[rootPath.length]==="."?1:0));
|
||||
}
|
||||
var element = $('<span class="debug-message-element"></span>');
|
||||
var element = $('<span class="red-ui-debug-msg-element"></span>');
|
||||
element.collapse = function() {
|
||||
element.find(".debug-message-expandable").parent().addClass("collapsed");
|
||||
element.find(".red-ui-debug-msg-expandable").parent().addClass("collapsed");
|
||||
}
|
||||
header = $('<span class="debug-message-row"></span>').appendTo(element);
|
||||
header = $('<span class="red-ui-debug-msg-row"></span>').appendTo(element);
|
||||
if (sourceId) {
|
||||
addMessageControls(header,sourceId,path,obj,rootPath,strippedKey,tools);
|
||||
}
|
||||
if (!key) {
|
||||
element.addClass("debug-message-top-level");
|
||||
element.addClass("red-ui-debug-msg-top-level");
|
||||
if (sourceId) {
|
||||
var pinned = pinnedPaths[sourceId];
|
||||
expandPaths = [];
|
||||
@ -303,17 +303,17 @@ RED.utils = (function() {
|
||||
expandPaths.sort();
|
||||
}
|
||||
element.clearPinned = function() {
|
||||
element.find(".debug-message-row-pinned").removeClass("debug-message-row-pinned");
|
||||
element.find(".red-ui-debug-msg-row-pinned").removeClass("red-ui-debug-msg-row-pinned");
|
||||
pinnedPaths[sourceId] = {};
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!hideKey) {
|
||||
$('<span class="debug-message-object-key"></span>').text(key).appendTo(header);
|
||||
$('<span class="red-ui-debug-msg-object-key"></span>').text(key).appendTo(header);
|
||||
$('<span>: </span>').appendTo(header);
|
||||
}
|
||||
}
|
||||
entryObj = $('<span class="debug-message-object-value"></span>').appendTo(header);
|
||||
entryObj = $('<span class="red-ui-debug-msg-object-value"></span>').appendTo(header);
|
||||
|
||||
var isArray = Array.isArray(obj);
|
||||
var isArrayObject = false;
|
||||
@ -322,33 +322,33 @@ RED.utils = (function() {
|
||||
isArrayObject = true;
|
||||
}
|
||||
if (obj === null || obj === undefined) {
|
||||
$('<span class="debug-message-type-null">'+obj+'</span>').appendTo(entryObj);
|
||||
$('<span class="red-ui-debug-msg-type-null">'+obj+'</span>').appendTo(entryObj);
|
||||
} else if (obj.__enc__ && obj.type === 'number') {
|
||||
e = $('<span class="debug-message-type-number debug-message-object-header"></span>').text(obj.data).appendTo(entryObj);
|
||||
e = $('<span class="red-ui-debug-msg-type-number red-ui-debug-msg-object-header"></span>').text(obj.data).appendTo(entryObj);
|
||||
} else if (typeHint === "function" || (obj.__enc__ && obj.type === 'function')) {
|
||||
e = $('<span class="debug-message-type-meta debug-message-object-header"></span>').text("function").appendTo(entryObj);
|
||||
e = $('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-header"></span>').text("function").appendTo(entryObj);
|
||||
} else if (typeHint === "internal" || (obj.__enc__ && obj.type === 'internal')) {
|
||||
e = $('<span class="debug-message-type-meta debug-message-object-header"></span>').text("[internal]").appendTo(entryObj);
|
||||
e = $('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-header"></span>').text("[internal]").appendTo(entryObj);
|
||||
} else if (typeof obj === 'string') {
|
||||
if (/[\t\n\r]/.test(obj)) {
|
||||
element.addClass('collapsed');
|
||||
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header);
|
||||
$('<i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i> ').prependTo(header);
|
||||
makeExpandable(header, function() {
|
||||
$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(typeHint||'string').appendTo(header);
|
||||
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element);
|
||||
$('<pre class="debug-message-type-string"></pre>').text(obj).appendTo(row);
|
||||
$('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-type-header"></span>').text(typeHint||'string').appendTo(header);
|
||||
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(element);
|
||||
$('<pre class="red-ui-debug-msg-type-string"></pre>').text(obj).appendTo(row);
|
||||
},function(state) {if (ontoggle) { ontoggle(path,state);}}, checkExpanded(strippedKey,expandPaths));
|
||||
}
|
||||
e = $('<span class="debug-message-type-string debug-message-object-header"></span>').html('"'+formatString(sanitize(obj))+'"').appendTo(entryObj);
|
||||
e = $('<span class="red-ui-debug-msg-type-string red-ui-debug-msg-object-header"></span>').html('"'+formatString(sanitize(obj))+'"').appendTo(entryObj);
|
||||
if (/^#[0-9a-f]{6}$/i.test(obj)) {
|
||||
$('<span class="debug-message-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e);
|
||||
$('<span class="red-ui-debug-msg-type-string-swatch"></span>').css('backgroundColor',obj).appendTo(e);
|
||||
}
|
||||
|
||||
} else if (typeof obj === 'number') {
|
||||
e = $('<span class="debug-message-type-number"></span>').appendTo(entryObj);
|
||||
e = $('<span class="red-ui-debug-msg-type-number"></span>').appendTo(entryObj);
|
||||
|
||||
if (Number.isInteger(obj) && (obj >= 0)) { // if it's a +ve integer
|
||||
e.addClass("debug-message-type-number-toggle");
|
||||
e.addClass("red-ui-debug-msg-type-number-toggle");
|
||||
e.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
formatNumber($(this), obj, sourceId, path, true);
|
||||
@ -383,14 +383,14 @@ RED.utils = (function() {
|
||||
var fullLength = data.length;
|
||||
|
||||
if (originalLength > 0) {
|
||||
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header);
|
||||
var arrayRows = $('<div class="debug-message-array-rows"></div>').appendTo(element);
|
||||
element.addClass('debug-message-buffer-raw');
|
||||
$('<i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i> ').prependTo(header);
|
||||
var arrayRows = $('<div class="red-ui-debug-msg-array-rows"></div>').appendTo(element);
|
||||
element.addClass('red-ui-debug-msg-buffer-raw');
|
||||
}
|
||||
if (key) {
|
||||
headerHead = $('<span class="debug-message-type-meta"></span>').text(typeHint||(type+'['+originalLength+']')).appendTo(entryObj);
|
||||
headerHead = $('<span class="red-ui-debug-msg-type-meta"></span>').text(typeHint||(type+'['+originalLength+']')).appendTo(entryObj);
|
||||
} else {
|
||||
headerHead = $('<span class="debug-message-object-header"></span>').appendTo(entryObj);
|
||||
headerHead = $('<span class="red-ui-debug-msg-object-header"></span>').appendTo(entryObj);
|
||||
$('<span>[ </span>').appendTo(headerHead);
|
||||
var arrayLength = Math.min(originalLength,10);
|
||||
for (i=0;i<arrayLength;i++) {
|
||||
@ -403,7 +403,7 @@ RED.utils = (function() {
|
||||
$('<span> …</span>').appendTo(headerHead);
|
||||
}
|
||||
if (arrayLength === 0) {
|
||||
$('<span class="debug-message-type-meta">empty</span>').appendTo(headerHead);
|
||||
$('<span class="red-ui-debug-msg-type-meta">empty</span>').appendTo(headerHead);
|
||||
}
|
||||
$('<span> ]</span>').appendTo(headerHead);
|
||||
}
|
||||
@ -411,19 +411,19 @@ RED.utils = (function() {
|
||||
|
||||
makeExpandable(header,function() {
|
||||
if (!key) {
|
||||
headerHead = $('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(typeHint||(type+'['+originalLength+']')).appendTo(header);
|
||||
headerHead = $('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-type-header"></span>').text(typeHint||(type+'['+originalLength+']')).appendTo(header);
|
||||
}
|
||||
if (type === 'buffer') {
|
||||
var stringRow = $('<div class="debug-message-string-rows"></div>').appendTo(element);
|
||||
var sr = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(stringRow);
|
||||
var stringRow = $('<div class="red-ui-debug-msg-string-rows"></div>').appendTo(element);
|
||||
var sr = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(stringRow);
|
||||
var stringEncoding = "";
|
||||
try {
|
||||
stringEncoding = String.fromCharCode.apply(null, new Uint16Array(data))
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
$('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr);
|
||||
var bufferOpts = $('<span class="debug-message-buffer-opts"></span>').appendTo(headerHead);
|
||||
$('<pre class="red-ui-debug-msg-type-string"></pre>').text(stringEncoding).appendTo(sr);
|
||||
var bufferOpts = $('<span class="red-ui-debug-msg-buffer-opts"></span>').appendTo(headerHead);
|
||||
var switchFormat = $('<a href="#"></a>').addClass('selected').text('raw').appendTo(bufferOpts).on("click", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
@ -435,7 +435,7 @@ RED.utils = (function() {
|
||||
var row;
|
||||
if (fullLength <= 10) {
|
||||
for (i=0;i<fullLength;i++) {
|
||||
row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(arrayRows);
|
||||
row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(arrayRows);
|
||||
subElements[path+"["+i+"]"] = buildMessageElement(
|
||||
data[i],
|
||||
{
|
||||
@ -454,16 +454,16 @@ RED.utils = (function() {
|
||||
} else {
|
||||
for (i=0;i<fullLength;i+=10) {
|
||||
var minRange = i;
|
||||
row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(arrayRows);
|
||||
row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(arrayRows);
|
||||
header = $('<span></span>').appendTo(row);
|
||||
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').appendTo(header);
|
||||
$('<i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i> ').appendTo(header);
|
||||
makeExpandable(header, (function() {
|
||||
var min = minRange;
|
||||
var max = Math.min(fullLength-1,(minRange+9));
|
||||
var parent = row;
|
||||
return function() {
|
||||
for (var i=min;i<=max;i++) {
|
||||
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(parent);
|
||||
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(parent);
|
||||
subElements[path+"["+i+"]"] = buildMessageElement(
|
||||
data[i],
|
||||
{
|
||||
@ -484,10 +484,10 @@ RED.utils = (function() {
|
||||
})(),
|
||||
(function() { var path = path+"["+i+"]"; return function(state) {if (ontoggle) { ontoggle(path,state);}}})(),
|
||||
checkExpanded(strippedKey,expandPaths,minRange,Math.min(fullLength-1,(minRange+9))));
|
||||
$('<span class="debug-message-object-key"></span>').html("["+minRange+" … "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header);
|
||||
$('<span class="red-ui-debug-msg-object-key"></span>').html("["+minRange+" … "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header);
|
||||
}
|
||||
if (fullLength < originalLength) {
|
||||
$('<div class="debug-message-object-entry collapsed"><span class="debug-message-object-key">['+fullLength+' … '+originalLength+']</span></div>').appendTo(arrayRows);
|
||||
$('<div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-object-key">['+fullLength+' … '+originalLength+']</span></div>').appendTo(arrayRows);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -498,13 +498,13 @@ RED.utils = (function() {
|
||||
element.addClass('collapsed');
|
||||
var keys = Object.keys(obj);
|
||||
if (key || keys.length > 0) {
|
||||
$('<i class="fa fa-caret-right debug-message-object-handle"></i> ').prependTo(header);
|
||||
$('<i class="fa fa-caret-right red-ui-debug-msg-object-handle"></i> ').prependTo(header);
|
||||
makeExpandable(header, function() {
|
||||
if (!key) {
|
||||
$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text('object').appendTo(header);
|
||||
$('<span class="red-ui-debug-msg-type-meta red-ui-debug-msg-object-type-header"></span>').text('object').appendTo(header);
|
||||
}
|
||||
for (i=0;i<keys.length;i++) {
|
||||
var row = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(element);
|
||||
var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(element);
|
||||
var newPath = path;
|
||||
if (newPath !== undefined) {
|
||||
if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) {
|
||||
@ -530,20 +530,20 @@ RED.utils = (function() {
|
||||
).appendTo(row);
|
||||
}
|
||||
if (keys.length === 0) {
|
||||
$('<div class="debug-message-object-entry debug-message-type-meta collapsed"></div>').text("empty").appendTo(element);
|
||||
$('<div class="red-ui-debug-msg-object-entry red-ui-debug-msg-type-meta collapsed"></div>').text("empty").appendTo(element);
|
||||
}
|
||||
},
|
||||
function(state) {if (ontoggle) { ontoggle(path,state);}},
|
||||
checkExpanded(strippedKey,expandPaths));
|
||||
}
|
||||
if (key) {
|
||||
$('<span class="debug-message-type-meta"></span>').text('object').appendTo(entryObj);
|
||||
$('<span class="red-ui-debug-msg-type-meta"></span>').text('object').appendTo(entryObj);
|
||||
} else {
|
||||
headerHead = $('<span class="debug-message-object-header"></span>').appendTo(entryObj);
|
||||
headerHead = $('<span class="red-ui-debug-msg-object-header"></span>').appendTo(entryObj);
|
||||
$('<span>{ </span>').appendTo(headerHead);
|
||||
var keysLength = Math.min(keys.length,5);
|
||||
for (i=0;i<keysLength;i++) {
|
||||
$('<span class="debug-message-object-key"></span>').text(keys[i]).appendTo(headerHead);
|
||||
$('<span class="red-ui-debug-msg-object-key"></span>').text(keys[i]).appendTo(headerHead);
|
||||
$('<span>: </span>').appendTo(headerHead);
|
||||
buildMessageSummaryValue(obj[keys[i]]).appendTo(headerHead);
|
||||
if (i < keysLength-1) {
|
||||
@ -554,12 +554,12 @@ RED.utils = (function() {
|
||||
$('<span> …</span>').appendTo(headerHead);
|
||||
}
|
||||
if (keysLength === 0) {
|
||||
$('<span class="debug-message-type-meta">empty</span>').appendTo(headerHead);
|
||||
$('<span class="red-ui-debug-msg-type-meta">empty</span>').appendTo(headerHead);
|
||||
}
|
||||
$('<span> }</span>').appendTo(headerHead);
|
||||
}
|
||||
} else {
|
||||
$('<span class="debug-message-type-other"></span>').text(""+obj).appendTo(entryObj);
|
||||
$('<span class="red-ui-debug-msg-type-other"></span>').text(""+obj).appendTo(entryObj);
|
||||
}
|
||||
if (exposeApi) {
|
||||
element.prop('expand', function() { return function(targetPath, state) {
|
||||
|
@ -14,16 +14,17 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
.debug-window {
|
||||
.red-ui-debug-window {
|
||||
padding:0;
|
||||
margin:0;
|
||||
background: #fff;
|
||||
line-height: 20px;
|
||||
}
|
||||
.debug-window .debug-message-payload {
|
||||
.red-ui-debug-msg-payload {
|
||||
font-size: 14px;
|
||||
}
|
||||
.debug-content {
|
||||
}
|
||||
|
||||
.red-ui-debug-content {
|
||||
position: absolute;
|
||||
top: 43px;
|
||||
bottom: 0px;
|
||||
@ -31,7 +32,7 @@
|
||||
right: 0px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.debug-filter-box {
|
||||
.red-ui-debug-filter-box {
|
||||
position:absolute;
|
||||
top: 42px;
|
||||
left: 0px;
|
||||
@ -42,57 +43,57 @@
|
||||
border-bottom: 1px solid #ddd;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
|
||||
}
|
||||
.debug-filter-row {
|
||||
.red-ui-debug-filter-row {
|
||||
.red-ui-nodeList {
|
||||
margin: 10px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.debug-message {
|
||||
.red-ui-debug-msg {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #eee;
|
||||
border-left: 8px solid #eee;
|
||||
border-right: 8px solid #eee;
|
||||
padding: 2px;
|
||||
&>.debug-message-meta .debug-message-tools {
|
||||
&>.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.debug-message-hover {
|
||||
&.red-ui-debug-msg-hover {
|
||||
border-right-color: #999;
|
||||
&>.debug-message-meta .debug-message-tools {
|
||||
&>.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
.debug-message-row {
|
||||
.debug-message-tools-pin {
|
||||
.red-ui-debug-msg-row {
|
||||
.red-ui-debug-msg-tools-pin {
|
||||
display: none;
|
||||
}
|
||||
&.debug-message-row-pinned .debug-message-tools-pin {
|
||||
&.red-ui-debug-msg-row-pinned .red-ui-debug-msg-tools-pin {
|
||||
display: inline-block;
|
||||
}
|
||||
&:hover {
|
||||
background: #f3f3f3;
|
||||
&>.debug-message-tools {
|
||||
.debug-message-tools-copy {
|
||||
&>.red-ui-debug-msg-tools {
|
||||
.red-ui-debug-msg-tools-copy {
|
||||
display: inline-block;
|
||||
}
|
||||
.debug-message-tools-pin {
|
||||
.red-ui-debug-msg-tools-pin {
|
||||
display: inline-block;
|
||||
}
|
||||
.debug-message-tools-other {
|
||||
.red-ui-debug-msg-tools-other {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.debug-message-meta .debug-message-tools {
|
||||
.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
|
||||
.editor-button-small {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
.debug-message-tools {
|
||||
.red-ui-debug-msg-tools {
|
||||
.button-group:not(:last-child) {
|
||||
margin-right: 3px;
|
||||
}
|
||||
@ -114,67 +115,67 @@
|
||||
}
|
||||
}
|
||||
|
||||
.debug-message-meta {
|
||||
.red-ui-debug-msg-meta {
|
||||
background: #fff;
|
||||
font-size: 11px;
|
||||
color: #707070;
|
||||
}
|
||||
.debug-message-date {
|
||||
.red-ui-debug-msg-date {
|
||||
padding: 1px 5px 1px 1px;
|
||||
}
|
||||
.debug-message-topic {
|
||||
.red-ui-debug-msg-topic {
|
||||
display: block;
|
||||
color: #a66;
|
||||
}
|
||||
.debug-message-name {
|
||||
.red-ui-debug-msg-name {
|
||||
padding: 1px 5px;
|
||||
color: #707070;
|
||||
}
|
||||
.debug-message-tools {
|
||||
.red-ui-debug-msg-tools {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 1px;
|
||||
.debug-message-tools-copy {
|
||||
.red-ui-debug-msg-tools-copy {
|
||||
display: none;
|
||||
}
|
||||
.debug-message-tools-other {
|
||||
.red-ui-debug-msg-tools-other {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.debug-message-payload {
|
||||
.red-ui-debug-msg-payload {
|
||||
display: block;
|
||||
padding: 2px;
|
||||
background: #fff;
|
||||
}
|
||||
.debug-message-level-log {
|
||||
.red-ui-debug-msg-level-log {
|
||||
border-left-color: #eee;
|
||||
border-right-color: #eee;
|
||||
}
|
||||
.debug-message-level-30 {
|
||||
.red-ui-debug-msg-level-30 {
|
||||
border-left-color: #ffdf9d;
|
||||
border-right-color: #ffdf9d;
|
||||
}
|
||||
.debug-message-level-20 {
|
||||
.red-ui-debug-msg-level-20 {
|
||||
border-left-color: #f99;
|
||||
border-right-color: #f99;
|
||||
}
|
||||
.debug-message-object-entry {
|
||||
.red-ui-debug-msg-object-entry {
|
||||
position: relative;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.debug-message-element {
|
||||
.red-ui-debug-msg-element {
|
||||
color: #333;
|
||||
font-family: Menlo, monospace;
|
||||
font-size: 13px !important;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.debug-message-object-key {
|
||||
.red-ui-debug-msg-object-key {
|
||||
color: #792e90;
|
||||
}
|
||||
.debug-message-object-value {
|
||||
.red-ui-debug-msg-object-value {
|
||||
|
||||
}
|
||||
.debug-message-object-handle {
|
||||
.red-ui-debug-msg-object-handle {
|
||||
color: #666;
|
||||
font-size: 1em;
|
||||
width: 1em;
|
||||
@ -182,63 +183,63 @@
|
||||
transition: transform 0.1s ease-in-out;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
.debug-message-element:not(.debug-message-top-level)>.debug-message-expandable>.debug-message-object-handle {
|
||||
.red-ui-debug-msg-element:not(.red-ui-debug-msg-top-level)>.red-ui-debug-msg-expandable>.red-ui-debug-msg-object-handle {
|
||||
margin-left: -1em;
|
||||
}
|
||||
.debug-message-object-entry>.debug-message-expandable>.debug-message-object-handle {
|
||||
.red-ui-debug-msg-object-entry>.red-ui-debug-msg-expandable>.red-ui-debug-msg-object-handle {
|
||||
margin-left: -1em;
|
||||
}
|
||||
.debug-message-object-entry.collapsed>span>.debug-message-object-handle {
|
||||
.red-ui-debug-msg-object-entry.collapsed>span>.red-ui-debug-msg-object-handle {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
.debug-message-element.collapsed>span>.debug-message-object-handle {
|
||||
.red-ui-debug-msg-element.collapsed>span>.red-ui-debug-msg-object-handle {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
.debug-message-object-entry.collapsed > .debug-message-object-entry {
|
||||
.red-ui-debug-msg-object-entry.collapsed > .red-ui-debug-msg-object-entry {
|
||||
display:none;
|
||||
}
|
||||
.debug-message-element.collapsed .debug-message-object-entry {
|
||||
.red-ui-debug-msg-element.collapsed .red-ui-debug-msg-object-entry {
|
||||
display:none;
|
||||
}
|
||||
.debug-message-element:not(.collapsed)>.debug-message-expandable>.debug-message-object-value>.debug-message-object-header {
|
||||
.red-ui-debug-msg-element:not(.collapsed)>.red-ui-debug-msg-expandable>.red-ui-debug-msg-object-value>.red-ui-debug-msg-object-header {
|
||||
display:none;
|
||||
}
|
||||
.debug-message-element.collapsed .debug-message-buffer-opts {
|
||||
.red-ui-debug-msg-element.collapsed .red-ui-debug-msg-buffer-opts {
|
||||
display: none;
|
||||
}
|
||||
.debug-message-element.collapsed .debug-message-object-type-header {
|
||||
.red-ui-debug-msg-element.collapsed .red-ui-debug-msg-object-type-header {
|
||||
display:none;
|
||||
}
|
||||
.debug-message-object-entry pre {
|
||||
.red-ui-debug-msg-object-entry pre {
|
||||
font-family: Menlo, monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.2em;
|
||||
margin: 0 0 0 -1em;
|
||||
}
|
||||
|
||||
.debug-message-type-other { color: #2033d6; }
|
||||
.debug-message-type-string { color: #b72828; }
|
||||
.debug-message-type-null { color: #666; font-style: italic;}
|
||||
.debug-message-type-meta { color: #666; font-style: italic;}
|
||||
.debug-message-type-number { color: #2033d6; };
|
||||
.debug-message-type-number-toggle { cursor: pointer;}
|
||||
.red-ui-debug-msg-type-other { color: #2033d6; }
|
||||
.red-ui-debug-msg-type-string { color: #b72828; }
|
||||
.red-ui-debug-msg-type-null { color: #666; font-style: italic;}
|
||||
.red-ui-debug-msg-type-meta { color: #666; font-style: italic;}
|
||||
.red-ui-debug-msg-type-number { color: #2033d6; };
|
||||
.red-ui-debug-msg-type-number-toggle { cursor: pointer;}
|
||||
|
||||
.debug-message-row {
|
||||
.red-ui-debug-msg-row {
|
||||
display: block;
|
||||
padding: 4px 2px 2px;
|
||||
position: relative;
|
||||
&.debug-message-row-pinned {
|
||||
&.red-ui-debug-msg-row-pinned {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
}
|
||||
.debug-message-expandable {
|
||||
.red-ui-debug-msg-expandable {
|
||||
cursor: pointer;
|
||||
}
|
||||
.debug-message-expandable:hover .debug-message-object-handle {
|
||||
.red-ui-debug-msg-expandable:hover .red-ui-debug-msg-object-handle {
|
||||
color: #b72828 !important;
|
||||
}
|
||||
|
||||
.debug-message-buffer-opts a {
|
||||
.red-ui-debug-msg-buffer-opts a {
|
||||
font-size: 9px;
|
||||
color: #bbb;
|
||||
border: 1px solid #bbb;
|
||||
@ -246,19 +247,19 @@
|
||||
padding: 2px 5px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.debug-message-buffer-opts a:hover {
|
||||
.red-ui-debug-msg-buffer-opts a:hover {
|
||||
text-decoration: none;
|
||||
color: #999;
|
||||
border: 1px solid #999;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
.debug-message-buffer-raw > .debug-message-string-rows {
|
||||
.red-ui-debug-msg-buffer-raw > .red-ui-debug-msg-string-rows {
|
||||
display: none;
|
||||
}
|
||||
.debug-message-buffer-string > .debug-message-array-rows {
|
||||
.red-ui-debug-msg-buffer-string > .red-ui-debug-msg-array-rows {
|
||||
display: none;
|
||||
}
|
||||
.debug-message-type-string-swatch {
|
||||
.red-ui-debug-msg-type-string-swatch {
|
||||
display: inline-block;
|
||||
width: 1.1em;
|
||||
height: 0.9em;
|
||||
|
@ -202,10 +202,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.dropdown-menu>li.disabled>a:hover>[class^="icon-"] {
|
||||
background-image: url("vendor/bootstrap/img/glyphicons-halflings.png") !important;
|
||||
}
|
||||
/** Fix for unreachable dropdown menu **/
|
||||
.dropdown-menu {
|
||||
border-radius: 0;
|
||||
|
@ -14,21 +14,16 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
#keyboard-help-dialog {
|
||||
font-size: 0.9em;
|
||||
padding-top: 10px;
|
||||
|
||||
}
|
||||
|
||||
#user-settings-tab-keyboard .red-ui-editableList-container {
|
||||
#red-ui-settings-tab-keyboard {
|
||||
.red-ui-editableList-container {
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
.keyboard-shortcut-entry.keyboard-shortcut-list-header {
|
||||
.keyboard-shortcut-list-header {
|
||||
padding:0 5px 0 5px;
|
||||
border-bottom: 1px solid $primary-border-color;
|
||||
div {
|
||||
color: #666 !important;
|
||||
}
|
||||
@ -38,10 +33,6 @@
|
||||
.keyboard-shortcut-entry-scope {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.keyboard-shortcut-list-header {
|
||||
border-bottom: 1px solid $primary-border-color;
|
||||
|
||||
}
|
||||
.keyboard-shortcut-list {
|
||||
@ -121,7 +112,6 @@
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.keyboard-shortcut-edit {
|
||||
}
|
||||
.help-key {
|
||||
border: 1px solid #ddd;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
.clipboard-import-error {
|
||||
.red-ui-clipboard-import-error {
|
||||
pre {
|
||||
margin: 10px 0;
|
||||
border: none;
|
||||
@ -30,7 +30,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.clipboard-dialog-tab-clipboard {
|
||||
.red-ui-clipboard-dialog-tab-clipboard {
|
||||
padding: 10px;
|
||||
textarea {
|
||||
resize: none;
|
||||
@ -46,7 +46,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.clipboard-dialog-tabs-content {
|
||||
.red-ui-clipboard-dialog-tabs-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 120px;
|
||||
@ -59,13 +59,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
.clipboard-dialog-tab-library {
|
||||
.red-ui-clipboard-dialog-tab-library {
|
||||
.form-row {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
#clipboard-dialog {
|
||||
#red-ui-clipboard-dialog {
|
||||
form {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -73,19 +73,19 @@
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
#clipboard-dialog-tab-library-name {
|
||||
#red-ui-clipboard-dialog-tab-library-name {
|
||||
width: calc(100% - 120px);
|
||||
}
|
||||
#clipboard-dialog-export-tab-library-browser {
|
||||
#red-ui-clipboard-dialog-export-tab-library-browser {
|
||||
height: calc(100% - 40px);
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid $primary-border-color;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#clipboard-dialog-import-tab-library {
|
||||
#red-ui-clipboard-dialog-import-tab-library {
|
||||
height: 100%;
|
||||
}
|
||||
#clipboard-dialog-import-tab-library-browser {
|
||||
#red-ui-clipboard-dialog-import-tab-library-browser {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@ -118,27 +118,27 @@
|
||||
}
|
||||
}
|
||||
|
||||
#node-dialog-library-save-browser {
|
||||
#red-ui-library-dialog-save-browser {
|
||||
height: calc(100% - 60px);
|
||||
border: 1px solid $primary-border-color;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#node-dialog-library-load-browser {
|
||||
#red-ui-library-dialog-load-browser {
|
||||
// border: 1px solid $primary-border-color;
|
||||
}
|
||||
#node-dialog-library-load-panes {
|
||||
#red-ui-library-dialog-load-panes {
|
||||
border: 1px solid $primary-border-color;
|
||||
}
|
||||
|
||||
|
||||
#node-dialog-library-load-preview {
|
||||
#red-ui-library-dialog-load-preview {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#node-dialog-library-load-preview-text {
|
||||
#red-ui-library-dialog-load-preview-text {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#node-dialog-library-load-preview-details {
|
||||
#red-ui-library-dialog-load-preview-details {
|
||||
box-sizing: border-box;
|
||||
.node-info-node-row:first-child {
|
||||
border-top: none;
|
||||
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
#user-settings-tab-palette {
|
||||
#red-ui-settings-tab-palette {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#palette-editor {
|
||||
#red-ui-palette-editor {
|
||||
text-align: left;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
@ -42,17 +42,17 @@
|
||||
.disabled {
|
||||
background: #f3f3f3;
|
||||
|
||||
.palette-module-name {
|
||||
.red-ui-palette-module-name {
|
||||
font-style: italic;
|
||||
color: #aaa;
|
||||
}
|
||||
.palette-module-version {
|
||||
.red-ui-palette-module-version {
|
||||
color: #aaa;
|
||||
}
|
||||
.palette-module-errors .fa-warning {
|
||||
.red-ui-palette-module-errors .fa-warning {
|
||||
opacity: 0.5;
|
||||
}
|
||||
ul.palette-module-error-list li {
|
||||
ul.red-ui-palette-module-error-list li {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
@ -67,65 +67,65 @@
|
||||
}
|
||||
|
||||
}
|
||||
.palette-editor-tab {
|
||||
.red-ui-palette-editor-tab {
|
||||
position:absolute;
|
||||
top:35px;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0
|
||||
}
|
||||
.palette-editor-toolbar {
|
||||
.red-ui-palette-editor-toolbar {
|
||||
background: #f3f3f3;
|
||||
box-sizing: border-box;
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid $primary-border-color;
|
||||
text-align: right;
|
||||
}
|
||||
.palette-module-shade-status {
|
||||
.red-ui-palette-module-shade-status {
|
||||
color: #666;
|
||||
}
|
||||
.palette-module-updated {
|
||||
.red-ui-palette-module-updated {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.palette-module-link {
|
||||
.red-ui-palette-module-link {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.palette-module-description {
|
||||
.red-ui-palette-module-description {
|
||||
margin-left: 20px;
|
||||
font-size: 0.9em;
|
||||
color: #999;
|
||||
}
|
||||
.palette-module-link {
|
||||
.red-ui-palette-module-link {
|
||||
}
|
||||
.palette-module-set-button-group {
|
||||
.red-ui-palette-module-set-button-group {
|
||||
}
|
||||
.palette-module-count {
|
||||
.red-ui-palette-module-count {
|
||||
border-radius: 4px;
|
||||
background: #eee;
|
||||
padding: 2px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.palette-module-content {
|
||||
.red-ui-palette-module-content {
|
||||
display: none;
|
||||
padding: 10px 3px;
|
||||
}
|
||||
i.fa.palette-module-node-chevron {
|
||||
i.fa.red-ui-palette-module-node-chevron {
|
||||
width: 8px;
|
||||
margin-right: 0;
|
||||
transform: rotate(0deg);
|
||||
transition: transform 0.2s ease-in-out;
|
||||
}
|
||||
.expanded {
|
||||
i.fa.palette-module-node-chevron {
|
||||
i.fa.red-ui-palette-module-node-chevron {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.palette-module-set-button {
|
||||
.red-ui-palette-module-set-button {
|
||||
background:#f3f3f3 !important;
|
||||
}
|
||||
}
|
||||
.palette-module-set {
|
||||
.red-ui-palette-module-set {
|
||||
border:1px solid $secondary-border-color;
|
||||
border-radius: 0;
|
||||
padding: 5px;
|
||||
@ -143,13 +143,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
.palette-module-type {
|
||||
.red-ui-palette-module-type {
|
||||
color: #666;
|
||||
padding-left: 5px;
|
||||
font-size: 0.9em;
|
||||
@include enable-selection;
|
||||
}
|
||||
.palette-module-type-swatch {
|
||||
.red-ui-palette-module-type-swatch {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
@ -159,19 +159,19 @@
|
||||
background: #fff;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
.palette-module-set-button-group {
|
||||
.red-ui-palette-module-set-button-group {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 4px;
|
||||
}
|
||||
|
||||
.palette-module-set-disabled {
|
||||
.red-ui-palette-module-set-disabled {
|
||||
background: #eee;
|
||||
.palette-module-type {
|
||||
.red-ui-palette-module-type {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.palette-module-more {
|
||||
.red-ui-palette-module-more {
|
||||
padding: 0 !important;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
@ -190,7 +190,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
.palette-module-meta {
|
||||
.red-ui-palette-module-meta {
|
||||
color: #666;
|
||||
position: relative;
|
||||
&.disabled {
|
||||
@ -203,23 +203,23 @@
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.palette-module-name {
|
||||
.red-ui-palette-module-name {
|
||||
white-space: nowrap;
|
||||
@include enable-selection;
|
||||
}
|
||||
.palette-module-version, .palette-module-updated, .palette-module-link {
|
||||
.red-ui-palette-module-version, .red-ui-palette-module-updated, .red-ui-palette-module-link {
|
||||
font-style:italic;
|
||||
font-size: 0.8em;
|
||||
@include enable-selection;
|
||||
}
|
||||
.palette-module-section {
|
||||
.red-ui-palette-module-section {
|
||||
padding:0 !important;
|
||||
background: #f9f9f9 !important;
|
||||
font-size: 0.9em;
|
||||
color: #666;
|
||||
|
||||
}
|
||||
.palette-module-button-group {
|
||||
.red-ui-palette-module-button-group {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
@ -227,10 +227,10 @@
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.palette-module-meta .fa-warning {
|
||||
.red-ui-palette-module-meta .fa-warning {
|
||||
color: #AD1625;
|
||||
}
|
||||
ul.palette-module-error-list {
|
||||
ul.red-ui-palette-module-error-list {
|
||||
display: inline-block;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
@ -241,11 +241,11 @@ ul.palette-module-error-list {
|
||||
}
|
||||
}
|
||||
|
||||
.palette-module-shade {
|
||||
.red-ui-palette-module-shade {
|
||||
@include shade;
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
}
|
||||
#palette-module-install-shade {
|
||||
#red-ui-palette-module-install-shade {
|
||||
padding-top: 80px;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@
|
||||
overflow: hidden;
|
||||
|
||||
.red-ui-palette-category {
|
||||
&:not(.palette-category-expanded) button {
|
||||
&:not(.expanded) button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@ -300,23 +300,23 @@
|
||||
.red-ui-editableList-item-content {
|
||||
padding: 0px 6px;
|
||||
}
|
||||
.palette-module-header {
|
||||
.red-ui-palette-module-header {
|
||||
padding: 6px 4px;
|
||||
}
|
||||
.palette-module-button {
|
||||
.red-ui-palette-module-button {
|
||||
float: right;
|
||||
}
|
||||
.palette-module-unused {
|
||||
.red-ui-palette-module-unused {
|
||||
& > * {
|
||||
color: #bbb;
|
||||
}
|
||||
// border: 1px dashed #bbb;
|
||||
}
|
||||
.palette-module-unknown {
|
||||
.red-ui-palette-module-unknown {
|
||||
border: 1px dashed #aaa;
|
||||
background: #fafafa;
|
||||
}
|
||||
.palette-module-not-installed {
|
||||
.red-ui-palette-module-not-installed {
|
||||
border: 1px dashed #b07575;
|
||||
background: #fee;
|
||||
i.fa-warning {
|
||||
|
@ -23,7 +23,7 @@
|
||||
overflow-y: scroll;
|
||||
|
||||
.red-ui-palette-category {
|
||||
&:not(.palette-category-expanded) button {
|
||||
&:not(.expanded) button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@ -31,12 +31,12 @@
|
||||
|
||||
.red-ui-sidebar-context-property {
|
||||
position: relative;
|
||||
.debug-message-tools {
|
||||
.red-ui-debug-msg-tools {
|
||||
right: 0px;
|
||||
margin-right: 5px;
|
||||
display: none;
|
||||
}
|
||||
&:hover .debug-message-tools {
|
||||
&:hover .red-ui-debug-msg-tools {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
#user-settings-tabs-container {
|
||||
.red-ui-settings-tabs-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -22,7 +22,7 @@
|
||||
width: 120px;
|
||||
background: #f3f3f3;
|
||||
}
|
||||
#user-settings-tabs-content {
|
||||
.red-ui-settings-tabs-content {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 120px;
|
||||
@ -60,7 +60,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
#user-settings-tab-view {
|
||||
#red-ui-settings-tab-view {
|
||||
position: absolute;
|
||||
top:0;
|
||||
right: 0;
|
||||
@ -69,10 +69,10 @@
|
||||
padding: 8px 20px 20px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.user-settings-row {
|
||||
.red-ui-settings-row {
|
||||
padding: 5px 10px 2px;
|
||||
}
|
||||
.user-settings-section {
|
||||
.red-ui-settings-section {
|
||||
position: relative;
|
||||
&:after {
|
||||
content: "";
|
||||
|
@ -52,12 +52,12 @@ RED.debug = (function() {
|
||||
'<span class="button-group"><a id="debug-tab-open" class="red-ui-footer-button" href="#" data-i18n="[title]node-red:debug.sidebar.openWindow"><i class="fa fa-desktop"></i></a></span> ' +
|
||||
'</div>');
|
||||
|
||||
messageList = $('<div class="debug-content debug-content-list"/>').appendTo(content);
|
||||
messageList = $('<div class="red-ui-debug-content debug-content-list"/>').appendTo(content);
|
||||
sbc = messageList[0];
|
||||
messageTable = $('<div class="debug-content debug-content-table hide"/>').appendTo(content);
|
||||
messageTable = $('<div class="red-ui-debug-content debug-content-table hide"/>').appendTo(content);
|
||||
|
||||
var filterDialog = $('<div class="debug-filter-box hide">'+
|
||||
'<div class="debug-filter-row">'+
|
||||
var filterDialog = $('<div class="red-ui-debug-filter-box hide">'+
|
||||
'<div class="red-ui-debug-filter-row">'+
|
||||
'<span class="button-group">'+
|
||||
'<a class="red-ui-sidebar-header-button-toggle debug-tab-filter-option selected" id="debug-tab-filterAll" href="#"><span data-i18n="node-red:debug.sidebar.filterAll"></span></a>'+
|
||||
'<a class="red-ui-sidebar-header-button-toggle debug-tab-filter-option" id="debug-tab-filterSelected" href="#"><span data-i18n="node-red:debug.sidebar.filterSelected"></span></a>'+
|
||||
@ -66,10 +66,10 @@ RED.debug = (function() {
|
||||
'</div>'+
|
||||
'</div>').appendTo(toolbar);//content);
|
||||
|
||||
// var filterTypeRow = $('<div class="debug-filter-row"></div>').appendTo(filterDialog);
|
||||
// var filterTypeRow = $('<div class="red-ui-debug-filter-row"></div>').appendTo(filterDialog);
|
||||
// $('<select><option>Show all debug nodes</option><option>Show selected debug nodes</option><option>Show current flow only</option></select>').appendTo(filterTypeRow);
|
||||
|
||||
var debugNodeListRow = $('<div class="debug-filter-row hide" id="debug-filter-node-list-row"></div>').appendTo(filterDialog);
|
||||
var debugNodeListRow = $('<div class="red-ui-debug-filter-row hide" id="debug-filter-node-list-row"></div>').appendTo(filterDialog);
|
||||
var flowCheckboxes = {};
|
||||
var debugNodeListHeader = $('<div><span data-i18n="node-red:debug.sidebar.debugNodes"></span><span></span></div>');
|
||||
var headerCheckbox = $('<input type="checkbox">').appendTo(debugNodeListHeader.find("span")[1]).checkboxSet();
|
||||
@ -118,7 +118,7 @@ RED.debug = (function() {
|
||||
parent: flowCheckboxes[node.z]
|
||||
}).on("change", function(e) {
|
||||
filteredNodes[node.id] = !$(this).prop('checked');
|
||||
$(".debug-message-node-"+node.id.replace(/\./g,"_")).toggleClass('hide',filteredNodes[node.id]);
|
||||
$(".red-ui-debug-msg-node-"+node.id.replace(/\./g,"_")).toggleClass('hide',filteredNodes[node.id]);
|
||||
});
|
||||
if (!node.active || RED.nodes.workspace(node.z).disabled) {
|
||||
container.addClass('disabled');
|
||||
@ -282,11 +282,11 @@ RED.debug = (function() {
|
||||
activeWorkspace = _activeWorkspace.replace(/\./g,"_");
|
||||
}
|
||||
if (filterType === "filterAll") {
|
||||
$(".debug-message").removeClass("hide");
|
||||
$(".red-ui-debug-msg").removeClass("hide");
|
||||
} else {
|
||||
$(".debug-message").each(function() {
|
||||
$(".red-ui-debug-msg").each(function() {
|
||||
if (filterType === 'filterCurrent') {
|
||||
$(this).toggleClass('hide',!$(this).hasClass('debug-message-flow-'+activeWorkspace));
|
||||
$(this).toggleClass('hide',!$(this).hasClass('red-ui-debug-msg-flow-'+activeWorkspace));
|
||||
} else if (filterType === 'filterSelected') {
|
||||
var id = $(this).data('source');
|
||||
if (id) {
|
||||
@ -320,7 +320,7 @@ RED.debug = (function() {
|
||||
var msg = m.el;
|
||||
var sourceNode = m.source;
|
||||
if (sourceNode) {
|
||||
var wrapper = $("<div>",{id:"debug-message-source-"+sourceNode.id.replace(/\./g,"_")}).appendTo(messageTable);
|
||||
var wrapper = $("<div>",{id:"red-ui-debug-msg-source-"+sourceNode.id.replace(/\./g,"_")}).appendTo(messageTable);
|
||||
wrapper.append(msg);
|
||||
}
|
||||
});
|
||||
@ -336,16 +336,16 @@ RED.debug = (function() {
|
||||
function showMessageMenu(button,dbgMessage,sourceId) {
|
||||
activeMenuMessage = dbgMessage;
|
||||
if (!menuOptionMenu) {
|
||||
menuOptionMenu = RED.menu.init({id:"debug-message-option-menu",
|
||||
menuOptionMenu = RED.menu.init({id:"red-ui-debug-msg-option-menu",
|
||||
options: [
|
||||
{id:"debug-message-menu-item-collapse",label:RED._("node-red:debug.messageMenu.collapseAll"),onselect:function(){
|
||||
{id:"red-ui-debug-msg-menu-item-collapse",label:RED._("node-red:debug.messageMenu.collapseAll"),onselect:function(){
|
||||
activeMenuMessage.collapse();
|
||||
}},
|
||||
{id:"debug-message-menu-item-clear-pins",label:RED._("node-red:debug.messageMenu.clearPinned"),onselect:function(){
|
||||
{id:"red-ui-debug-msg-menu-item-clear-pins",label:RED._("node-red:debug.messageMenu.clearPinned"),onselect:function(){
|
||||
activeMenuMessage.clearPinned();
|
||||
}},
|
||||
null,
|
||||
{id:"debug-message-menu-item-filter", label:RED._("node-red:debug.messageMenu.filterNode"),onselect:function(){
|
||||
{id:"red-ui-debug-msg-menu-item-filter", label:RED._("node-red:debug.messageMenu.filterNode"),onselect:function(){
|
||||
var candidateNodes = RED.nodes.filterNodes({type:'debug'});
|
||||
candidateNodes.forEach(function(n) {
|
||||
filteredNodes[n.id] = true;
|
||||
@ -354,7 +354,7 @@ RED.debug = (function() {
|
||||
$("#debug-tab-filterSelected").trigger("click");
|
||||
refreshMessageList();
|
||||
}},
|
||||
{id:"debug-message-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
||||
{id:"red-ui-debug-msg-menu-item-clear-filter",label:RED._("node-red:debug.messageMenu.clearFilter"),onselect:function(){
|
||||
$("#debug-tab-filterAll").trigger("click");
|
||||
refreshMessageList();
|
||||
}}
|
||||
@ -373,8 +373,8 @@ RED.debug = (function() {
|
||||
if (sourceNode && sourceNode.type !== 'debug') {
|
||||
filterOptionDisabled = true;
|
||||
}
|
||||
RED.menu.setDisabled('debug-message-menu-item-filter',filterOptionDisabled);
|
||||
RED.menu.setDisabled('debug-message-menu-item-clear-filter',filterOptionDisabled);
|
||||
RED.menu.setDisabled('red-ui-debug-msg-menu-item-filter',filterOptionDisabled);
|
||||
RED.menu.setDisabled('red-ui-debug-msg-menu-item-clear-filter',filterOptionDisabled);
|
||||
|
||||
var elementPos = button.offset();
|
||||
menuOptionMenu.css({
|
||||
@ -404,7 +404,7 @@ RED.debug = (function() {
|
||||
var sourceNode = o._source;
|
||||
|
||||
msg.onmouseenter = function() {
|
||||
$(msg).addClass('debug-message-hover');
|
||||
$(msg).addClass('red-ui-debug-msg-hover');
|
||||
if (o._source) {
|
||||
config.messageMouseEnter(o._source.id);
|
||||
if (o._source._alias) {
|
||||
@ -414,7 +414,7 @@ RED.debug = (function() {
|
||||
|
||||
};
|
||||
msg.onmouseleave = function() {
|
||||
$(msg).removeClass('debug-message-hover');
|
||||
$(msg).removeClass('red-ui-debug-msg-hover');
|
||||
if (o._source) {
|
||||
config.messageMouseLeave(o._source.id);
|
||||
if (o._source._alias) {
|
||||
@ -427,10 +427,10 @@ RED.debug = (function() {
|
||||
var property = sanitize(o.property?o.property:'');
|
||||
var payload = o.msg;
|
||||
var format = sanitize((o.format||"").toString());
|
||||
msg.className = 'debug-message'+(o.level?(' debug-message-level-'+o.level):'')+
|
||||
msg.className = 'red-ui-debug-msg'+(o.level?(' red-ui-debug-msg-level-'+o.level):'')+
|
||||
(sourceNode?(
|
||||
" debug-message-node-"+sourceNode.id.replace(/\./g,"_")+
|
||||
(sourceNode.z?" debug-message-flow-"+sourceNode.z.replace(/\./g,"_"):"")
|
||||
" red-ui-debug-msg-node-"+sourceNode.id.replace(/\./g,"_")+
|
||||
(sourceNode.z?" red-ui-debug-msg-flow-"+sourceNode.z.replace(/\./g,"_"):"")
|
||||
):"");
|
||||
|
||||
if (sourceNode) {
|
||||
@ -446,22 +446,22 @@ RED.debug = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
var metaRow = $('<div class="debug-message-meta"></div>').appendTo(msg);
|
||||
$('<span class="debug-message-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
|
||||
var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg);
|
||||
$('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
|
||||
if (sourceNode) {
|
||||
$('<a>',{href:"#",class:"debug-message-name"}).text('node: '+(sourceNode.name||sourceNode.id))
|
||||
$('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+(sourceNode.name||sourceNode.id))
|
||||
.appendTo(metaRow)
|
||||
.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
config.messageSourceClick(sourceNode.id);
|
||||
});
|
||||
} else if (name) {
|
||||
$('<span class="debug-message-name">'+name+'</span>').appendTo(metaRow);
|
||||
$('<span class="red-ui-debug-msg-name">'+name+'</span>').appendTo(metaRow);
|
||||
}
|
||||
|
||||
payload = RED.utils.decodeObject(payload,format);
|
||||
|
||||
var el = $('<span class="debug-message-payload"></span>').appendTo(msg);
|
||||
var el = $('<span class="red-ui-debug-msg-payload"></span>').appendTo(msg);
|
||||
var path = o.property||'';
|
||||
var debugMessage = RED.utils.createObjectElement(payload, {
|
||||
key: /*true*/null,
|
||||
@ -481,17 +481,17 @@ RED.debug = (function() {
|
||||
errorLvl = 30;
|
||||
errorLvlType = 'warn';
|
||||
}
|
||||
$(msg).addClass('debug-message-level-' + errorLvl);
|
||||
$('<span class="debug-message-topic">function : (' + errorLvlType + ')</span>').appendTo(metaRow);
|
||||
$(msg).addClass('red-ui-debug-msg-level-' + errorLvl);
|
||||
$('<span class="red-ui-debug-msg-topic">function : (' + errorLvlType + ')</span>').appendTo(metaRow);
|
||||
} else {
|
||||
var tools = $('<span class="debug-message-tools button-group"></span>').appendTo(metaRow);
|
||||
var tools = $('<span class="red-ui-debug-msg-tools button-group"></span>').appendTo(metaRow);
|
||||
var filterMessage = $('<button class="editor-button editor-button-small"><i class="fa fa-caret-down"></i></button>').appendTo(tools);
|
||||
filterMessage.on("click", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id);
|
||||
});
|
||||
$('<span class="debug-message-topic">'+
|
||||
$('<span class="red-ui-debug-msg-topic">'+
|
||||
(o.topic?topic+' : ':'')+
|
||||
(o.property?'msg.'+property:'msg')+" : "+format+
|
||||
'</span>').appendTo(metaRow);
|
||||
@ -510,9 +510,9 @@ RED.debug = (function() {
|
||||
messageList.append(msg);
|
||||
} else {
|
||||
if (sourceNode) {
|
||||
var wrapper = $("#debug-message-source-"+sourceNode.id.replace(/\./g,"_"));
|
||||
var wrapper = $("#red-ui-debug-msg-source-"+sourceNode.id.replace(/\./g,"_"));
|
||||
if (wrapper.length === 0 ) {
|
||||
wrapper = $("<div>",{id:"debug-message-source-"+sourceNode.id.replace(/\./g,"_")}).appendTo(messageTable);
|
||||
wrapper = $("<div>",{id:"red-ui-debug-msg-source-"+sourceNode.id.replace(/\./g,"_")}).appendTo(messageTable);
|
||||
}
|
||||
wrapper.empty();
|
||||
wrapper.append(msg);
|
||||
@ -531,7 +531,7 @@ RED.debug = (function() {
|
||||
}
|
||||
|
||||
function clearMessageList(clearFilter) {
|
||||
$(".debug-message").remove();
|
||||
$(".red-ui-debug-msg").remove();
|
||||
config.clear();
|
||||
if (!!clearFilter) {
|
||||
clearFilterSettings();
|
||||
|
@ -17,7 +17,7 @@ $(function() {
|
||||
|
||||
var uiComponents = RED.debug.init(options);
|
||||
|
||||
$(".debug-window").append(uiComponents.content);
|
||||
$(".red-ui-debug-window").append(uiComponents.content);
|
||||
|
||||
window.addEventListener('message',function(evt) {
|
||||
if (evt.data.event === "message") {
|
||||
|
@ -1,11 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<link href="../../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
||||
<link rel="stylesheet" href="../../red/style.min.css">
|
||||
<link rel="stylesheet" href="../../vendor/font-awesome/css/font-awesome.min.css">
|
||||
<title>Node-RED Debug Tools</title>
|
||||
</head>
|
||||
<body class="debug-window">
|
||||
<body class="red-ui-debug-window">
|
||||
</body>
|
||||
<script src="../../vendor/vendor.js"></script>
|
||||
<script src="../../red/red.min.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user