1
0
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:
Nick O'Leary 2019-05-02 22:33:29 +01:00
parent 0e02e21967
commit ad77565508
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
22 changed files with 533 additions and 549 deletions

View File

@ -28,7 +28,7 @@ RED.clipboard = (function() {
var libraryBrowser; var libraryBrowser;
function setupDialogs() { 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") .appendTo("#red-ui-editor")
.dialog({ .dialog({
modal: true, modal: true,
@ -37,14 +37,14 @@ RED.clipboard = (function() {
resizable: false, resizable: false,
buttons: [ buttons: [
{ {
id: "clipboard-dialog-cancel", id: "red-ui-clipboard-dialog-cancel",
text: RED._("common.label.cancel"), text: RED._("common.label.cancel"),
click: function() { click: function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
} }
}, },
{ {
id: "clipboard-dialog-download", id: "red-ui-clipboard-dialog-download",
class: "primary", class: "primary",
text: RED._("clipboard.download"), text: RED._("clipboard.download"),
click: function() { click: function() {
@ -59,11 +59,11 @@ RED.clipboard = (function() {
} }
}, },
{ {
id: "clipboard-dialog-export", id: "red-ui-clipboard-dialog-export",
class: "primary", class: "primary",
text: RED._("clipboard.export.copy"), text: RED._("clipboard.export.copy"),
click: function() { click: function() {
if (activeTab === "clipboard-dialog-export-tab-clipboard") { if (activeTab === "red-ui-clipboard-dialog-export-tab-clipboard") {
$("#clipboard-export").select(); $("#clipboard-export").select();
document.execCommand("copy"); document.execCommand("copy");
document.getSelection().removeAllRanges(); document.getSelection().removeAllRanges();
@ -75,7 +75,7 @@ RED.clipboard = (function() {
if (!selectedPath.children) { if (!selectedPath.children) {
selectedPath = selectedPath.parent; 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() { var saveFlow = function() {
$.ajax({ $.ajax({
url:'library/'+selectedPath.library+'/'+selectedPath.type+'/'+selectedPath.path + filename, 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", class: "primary",
text: RED._("common.label.import"), text: RED._("common.label.import"),
click: function() { click: function() {
var addNewFlow = ($("#import-tab > a.selected").attr('id') === 'import-tab-new'); var addNewFlow = ($("#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); RED.view.importNodes($("#clipboard-import").val(),addNewFlow);
} else { } else {
var selectedPath = libraryBrowser.getSelected(); var selectedPath = libraryBrowser.getSelected();
@ -172,10 +172,10 @@ RED.clipboard = (function() {
'</div>'+ '</div>'+
'<div style="height: 400px; position:relative; border:1px solid #999;">'+ '<div style="height: 400px; position:relative; border:1px solid #999;">'+
'<div style="position: absolute; top:0;left:0;bottom:0;width:120px;background: #f3f3f3;">'+ '<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>'+
'<div id="clipboard-dialog-export-tabs-content" class="clipboard-dialog-tabs-content">'+ '<div id="red-ui-clipboard-dialog-export-tabs-content" class="red-ui-clipboard-dialog-tabs-content">'+
'<div id="clipboard-dialog-export-tab-clipboard" class="clipboard-dialog-tab-clipboard">'+ '<div id="red-ui-clipboard-dialog-export-tab-clipboard" class="red-ui-clipboard-dialog-tab-clipboard">'+
'<div class="form-row">'+ '<div class="form-row">'+
'<textarea readonly id="clipboard-export"></textarea>'+ '<textarea readonly id="clipboard-export"></textarea>'+
'</div>'+ '</div>'+
@ -186,10 +186,10 @@ RED.clipboard = (function() {
'</span>'+ '</span>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'<div id="clipboard-dialog-export-tab-library" class="clipboard-dialog-tab-library">'+ '<div id="red-ui-clipboard-dialog-export-tab-library" class="red-ui-clipboard-dialog-tab-library">'+
'<div id="clipboard-dialog-export-tab-library-browser"></div>'+ '<div id="red-ui-clipboard-dialog-export-tab-library-browser"></div>'+
'<div class="form-row">'+ '<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>'+ '</div>'+
'</div>'+ '</div>'+
@ -200,10 +200,10 @@ RED.clipboard = (function() {
importNodesDialog = importNodesDialog =
'<div style="height: 400px; position:relative; border:1px solid #999; margin-bottom: 12px">'+ '<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;">'+ '<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>'+
'<div id="clipboard-dialog-import-tabs-content" class="clipboard-dialog-tabs-content">'+ '<div id="red-ui-clipboard-dialog-import-tabs-content" class="red-ui-clipboard-dialog-tabs-content">'+
'<div id="clipboard-dialog-import-tab-clipboard" class="clipboard-dialog-tab-clipboard">'+ '<div id="red-ui-clipboard-dialog-import-tab-clipboard" class="red-ui-clipboard-dialog-tab-clipboard">'+
'<div class="form-row"><span data-i18n="clipboard.pasteNodes"></span>'+ '<div class="form-row"><span data-i18n="clipboard.pasteNodes"></span>'+
' <a class="editor-button" id="import-file-upload-btn"><i class="fa fa-upload"></i> <span data-i18n="clipboard.selectFile"></span></a>'+ ' <a class="editor-button" id="import-file-upload-btn"><i class="fa fa-upload"></i> <span data-i18n="clipboard.selectFile"></span></a>'+
'<input type="file" id="import-file-upload" accept=".json" style="display:none">'+ '<input type="file" id="import-file-upload" accept=".json" style="display:none">'+
@ -212,8 +212,8 @@ RED.clipboard = (function() {
'<textarea id="clipboard-import"></textarea>'+ '<textarea id="clipboard-import"></textarea>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'<div id="clipboard-dialog-import-tab-library" class="clipboard-dialog-tab-library">'+ '<div id="red-ui-clipboard-dialog-import-tab-library" class="red-ui-clipboard-dialog-tab-library">'+
'<div id="clipboard-dialog-import-tab-library-browser"></div>'+ '<div id="red-ui-clipboard-dialog-import-tab-library-browser"></div>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
@ -233,22 +233,22 @@ RED.clipboard = (function() {
clearTimeout(validateExportFilenameTimeout); clearTimeout(validateExportFilenameTimeout);
} }
validateExportFilenameTimeout = setTimeout(function() { 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 filename = filenameInput.val().trim();
var valid = filename.length > 0 && !/[\/\\]/.test(filename); var valid = filename.length > 0 && !/[\/\\]/.test(filename);
if (valid) { if (valid) {
filenameInput.removeClass("input-error"); filenameInput.removeClass("input-error");
$("#clipboard-dialog-export").button("enable"); $("#red-ui-clipboard-dialog-export").button("enable");
} else { } else {
filenameInput.addClass("input-error"); filenameInput.addClass("input-error");
$("#clipboard-dialog-export").button("disable"); $("#red-ui-clipboard-dialog-export").button("disable");
} }
},100); },100);
} }
var validateImportTimeout; var validateImportTimeout;
function validateImport() { function validateImport() {
if (activeTab === "clipboard-dialog-import-tab-clipboard") { if (activeTab === "red-ui-clipboard-dialog-import-tab-clipboard") {
if (validateImportTimeout) { if (validateImportTimeout) {
clearTimeout(validateImportTimeout); clearTimeout(validateImportTimeout);
} }
@ -259,7 +259,7 @@ RED.clipboard = (function() {
popover.close(true); popover.close(true);
currentPopoverError = null; currentPopoverError = null;
importInput.removeClass("input-error"); importInput.removeClass("input-error");
$("#clipboard-dialog-ok").button("disable"); $("#red-ui-clipboard-dialog-ok").button("disable");
return; return;
} }
try { try {
@ -282,7 +282,7 @@ RED.clipboard = (function() {
popover.close(true); popover.close(true);
importInput.removeClass("input-error"); importInput.removeClass("input-error");
importInput.val(v); importInput.val(v);
$("#clipboard-dialog-ok").button("enable"); $("#red-ui-clipboard-dialog-ok").button("enable");
} catch(err) { } catch(err) {
if (v !== "") { if (v !== "") {
importInput.addClass("input-error"); importInput.addClass("input-error");
@ -296,7 +296,7 @@ RED.clipboard = (function() {
// which is the least useful, but most consistent message // which is the least useful, but most consistent message
// - use a custom/library parser that gives consistent messages // - use a custom/library parser that gives consistent messages
// which can be translated. // 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; var errorPos;
// Chrome error messages // Chrome error messages
var m = /at position (\d+)/i.exec(errString); var m = /at position (\d+)/i.exec(errString);
@ -335,15 +335,15 @@ RED.clipboard = (function() {
} else { } else {
currentPopoverError = null; currentPopoverError = null;
} }
$("#clipboard-dialog-ok").button("disable"); $("#red-ui-clipboard-dialog-ok").button("disable");
} }
},100); },100);
} else { } else {
var file = libraryBrowser.getSelected(); var file = libraryBrowser.getSelected();
if (file && file.label && !file.children) { if (file && file.label && !file.children) {
$("#clipboard-dialog-ok").button("enable"); $("#red-ui-clipboard-dialog-ok").button("enable");
} else { } else {
$("#clipboard-dialog-ok").button("disable"); $("#red-ui-clipboard-dialog-ok").button("disable");
} }
} }
} }
@ -358,17 +358,17 @@ RED.clipboard = (function() {
dialogContainer.append($(importNodesDialog)); dialogContainer.append($(importNodesDialog));
var tabs = RED.tabs.create({ var tabs = RED.tabs.create({
id: "clipboard-dialog-import-tabs", id: "red-ui-clipboard-dialog-import-tabs",
vertical: true, vertical: true,
onchange: function(tab) { onchange: function(tab) {
$("#clipboard-dialog-import-tabs-content").children().hide(); $("#red-ui-clipboard-dialog-import-tabs-content").children().hide();
$("#" + tab.id).show(); $("#" + tab.id).show();
activeTab = tab.id; activeTab = tab.id;
if (popover) { if (popover) {
popover.close(true); popover.close(true);
currentPopoverError = null; currentPopoverError = null;
} }
if (tab.id === "clipboard-dialog-import-tab-clipboard") { if (tab.id === "red-ui-clipboard-dialog-import-tab-clipboard") {
$("#clipboard-import").trigger("focus"); $("#clipboard-import").trigger("focus");
} else { } else {
libraryBrowser.focus(); libraryBrowser.focus();
@ -377,15 +377,15 @@ RED.clipboard = (function() {
} }
}); });
tabs.addTab({ tabs.addTab({
id: "clipboard-dialog-import-tab-clipboard", id: "red-ui-clipboard-dialog-import-tab-clipboard",
label: RED._("clipboard.clipboard") label: RED._("clipboard.clipboard")
}); });
tabs.addTab({ tabs.addTab({
id: "clipboard-dialog-import-tab-library", id: "red-ui-clipboard-dialog-import-tab-library",
label: RED._("library.library") label: RED._("library.library")
}); });
tabs.activateTab("clipboard-dialog-import-tab-"+mode); tabs.activateTab("red-ui-clipboard-dialog-import-tab-"+mode);
if (mode === 'clipboard') { if (mode === 'clipboard') {
setTimeout(function() { setTimeout(function() {
$("#clipboard-import").trigger("focus"); $("#clipboard-import").trigger("focus");
@ -393,17 +393,17 @@ RED.clipboard = (function() {
} }
$("#clipboard-dialog-tab-library-name").on("keyup", validateExportFilename); $("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
$("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)}); $("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
$("#clipboard-dialog-export").button("enable"); $("#red-ui-clipboard-dialog-export").button("enable");
libraryBrowser = RED.library.createBrowser({ libraryBrowser = RED.library.createBrowser({
container: $("#clipboard-dialog-import-tab-library-browser"), container: $("#red-ui-clipboard-dialog-import-tab-library-browser"),
onselect: function(file) { onselect: function(file) {
if (file && file.label && !file.children) { if (file && file.label && !file.children) {
$("#clipboard-dialog-ok").button("enable"); $("#red-ui-clipboard-dialog-ok").button("enable");
} else { } else {
$("#clipboard-dialog-ok").button("disable"); $("#red-ui-clipboard-dialog-ok").button("disable");
} }
} }
}) })
@ -411,11 +411,11 @@ RED.clipboard = (function() {
dialogContainer.i18n(); dialogContainer.i18n();
$("#clipboard-dialog-ok").show(); $("#red-ui-clipboard-dialog-ok").show();
$("#clipboard-dialog-cancel").show(); $("#red-ui-clipboard-dialog-cancel").show();
$("#clipboard-dialog-export").hide(); $("#red-ui-clipboard-dialog-export").hide();
$("#clipboard-dialog-download").hide(); $("#red-ui-clipboard-dialog-download").hide();
$("#clipboard-dialog-ok").button("disable"); $("#red-ui-clipboard-dialog-ok").button("disable");
$("#clipboard-import").on("keyup", validateImport); $("#clipboard-import").on("keyup", validateImport);
$("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)}); $("#clipboard-import").on('paste',function() { setTimeout(validateImport,10)});
@ -461,50 +461,50 @@ RED.clipboard = (function() {
dialogContainer.append($(exportNodesDialog)); dialogContainer.append($(exportNodesDialog));
var tabs = RED.tabs.create({ var tabs = RED.tabs.create({
id: "clipboard-dialog-export-tabs", id: "red-ui-clipboard-dialog-export-tabs",
vertical: true, vertical: true,
onchange: function(tab) { onchange: function(tab) {
$("#clipboard-dialog-export-tabs-content").children().hide(); $("#red-ui-clipboard-dialog-export-tabs-content").children().hide();
$("#" + tab.id).show(); $("#" + tab.id).show();
activeTab = tab.id; activeTab = tab.id;
if (tab.id === "clipboard-dialog-export-tab-clipboard") { if (tab.id === "red-ui-clipboard-dialog-export-tab-clipboard") {
$("#clipboard-dialog-export").button("option","label", RED._("clipboard.export.copy")) $("#red-ui-clipboard-dialog-export").button("option","label", RED._("clipboard.export.copy"))
$("#clipboard-dialog-download").show(); $("#red-ui-clipboard-dialog-download").show();
} else { } else {
$("#clipboard-dialog-export").button("option","label", RED._("clipboard.export.export")) $("#red-ui-clipboard-dialog-export").button("option","label", RED._("clipboard.export.export"))
$("#clipboard-dialog-download").hide(); $("#red-ui-clipboard-dialog-download").hide();
libraryBrowser.focus(); libraryBrowser.focus();
} }
} }
}); });
tabs.addTab({ tabs.addTab({
id: "clipboard-dialog-export-tab-clipboard", id: "red-ui-clipboard-dialog-export-tab-clipboard",
label: RED._("clipboard.clipboard") label: RED._("clipboard.clipboard")
}); });
tabs.addTab({ tabs.addTab({
id: "clipboard-dialog-export-tab-library", id: "red-ui-clipboard-dialog-export-tab-library",
label: RED._("library.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); $("#red-ui-clipboard-dialog-tab-library-name").on("keyup", validateExportFilename);
$("#clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)}); $("#red-ui-clipboard-dialog-tab-library-name").on('paste',function() { setTimeout(validateExportFilename,10)});
$("#clipboard-dialog-export").button("enable"); $("#red-ui-clipboard-dialog-export").button("enable");
libraryBrowser = RED.library.createBrowser({ libraryBrowser = RED.library.createBrowser({
container: $("#clipboard-dialog-export-tab-library-browser"), container: $("#red-ui-clipboard-dialog-export-tab-library-browser"),
folderTools: true, folderTools: true,
onselect: function(file) { onselect: function(file) {
if (file && file.label && !file.children) { 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); 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(); dialogContainer.i18n();
var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini"; var format = RED.settings.flowFilePretty ? "export-format-full" : "export-format-mini";
@ -584,9 +584,9 @@ RED.clipboard = (function() {
$("#clipboard-export").trigger("focus"); $("#clipboard-export").trigger("focus");
}) })
$("#clipboard-dialog-ok").hide(); $("#red-ui-clipboard-dialog-ok").hide();
$("#clipboard-dialog-cancel").hide(); $("#red-ui-clipboard-dialog-cancel").hide();
$("#clipboard-dialog-export").hide(); $("#red-ui-clipboard-dialog-export").hide();
var selection = RED.workspaces.selection(); var selection = RED.workspaces.selection();
if (selection.length > 0) { if (selection.length > 0) {
$("#export-range-selected").trigger("click"); $("#export-range-selected").trigger("click");
@ -607,9 +607,9 @@ RED.clipboard = (function() {
dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" ); dialog.dialog("option","title",RED._("clipboard.exportNodes")).dialog( "open" );
$("#clipboard-export").trigger("focus"); $("#clipboard-export").trigger("focus");
$("#clipboard-dialog-cancel").show(); $("#red-ui-clipboard-dialog-cancel").show();
$("#clipboard-dialog-export").show(); $("#red-ui-clipboard-dialog-export").show();
$("#clipboard-dialog-download").show(); $("#red-ui-clipboard-dialog-download").show();
} }

View File

@ -82,7 +82,7 @@ RED.stack = (function() {
var icon = $('<i class="fa fa-angle-down"></i>').appendTo(header); var icon = $('<i class="fa fa-angle-down"></i>').appendTo(header);
if (entry.expanded) { if (entry.expanded) {
entry.container.addClass("palette-category-expanded"); entry.container.addClass("expanded");
icon.addClass("expanded"); icon.addClass("expanded");
} else { } else {
entry.contentWrap.hide(); entry.contentWrap.hide();
@ -118,7 +118,7 @@ RED.stack = (function() {
} }
icon.addClass("expanded"); icon.addClass("expanded");
entry.container.addClass("palette-category-expanded"); entry.container.addClass("expanded");
entry.contentWrap.slideDown(200); entry.contentWrap.slideDown(200);
return true; return true;
} }
@ -126,13 +126,13 @@ RED.stack = (function() {
entry.collapse = function() { entry.collapse = function() {
if (entry.isExpanded()) { if (entry.isExpanded()) {
icon.removeClass("expanded"); icon.removeClass("expanded");
entry.container.removeClass("palette-category-expanded"); entry.container.removeClass("expanded");
entry.contentWrap.slideUp(200); entry.contentWrap.slideUp(200);
return true; return true;
} }
}; };
entry.isExpanded = function() { entry.isExpanded = function() {
return entry.container.hasClass("palette-category-expanded"); return entry.container.hasClass("expanded");
}; };
if (options.fill && options.singleExpanded) { if (options.fill && options.singleExpanded) {
resizeStack(); resizeStack();

View File

@ -187,7 +187,7 @@ RED.diff = (function() {
titleRow.parent().toggleClass('collapsed'); titleRow.parent().toggleClass('collapsed');
if ($(this).parent().hasClass('collapsed')) { if ($(this).parent().hasClass('collapsed')) {
$(this).parent().find('.node-diff-node-entry').addClass('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');
} }
// } // }
}) })

View File

@ -113,7 +113,7 @@ RED.h = handlers;
get: getSettingsPane, get: getSettingsPane,
focus: function() { focus: function() {
setTimeout(function() { setTimeout(function() {
$("#user-settings-tab-keyboard-filter").trigger("focus"); $("#red-ui-settings-tab-keyboard-filter").trigger("focus");
},200); },200);
} }
}) })
@ -521,10 +521,10 @@ RED.h = handlers;
} }
function getSettingsPane() { 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 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-key" data-i18n="keyboard.shortcut"></div>'+
'<div class="keyboard-shortcut-entry-scope" data-i18n="keyboard.scope"></div>'+ '<div class="keyboard-shortcut-entry-scope" data-i18n="keyboard.scope"></div>'+
'</div>').appendTo(pane); '</div>').appendTo(pane);

View File

@ -20,16 +20,16 @@ RED.library = (function() {
var libraryEditor; var libraryEditor;
var activeLibrary; 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">'+ '<form class="form-horizontal">'+
'<div style="height: 400px; position:relative; ">'+ '<div style="height: 400px; position:relative; ">'+
'<div id="node-dialog-library-load-panes">'+ '<div id="red-ui-library-dialog-load-panes">'+
'<div class="red-ui-panel" id="node-dialog-library-load-browser"></div>'+ '<div class="red-ui-panel" id="red-ui-library-dialog-load-browser"></div>'+
'<div class="red-ui-panel">'+ '<div class="red-ui-panel">'+
'<div id="node-dialog-library-load-preview">'+ '<div id="red-ui-library-dialog-load-preview">'+
'<div class="red-ui-panel" id="node-dialog-library-load-preview-text"></div>'+ '<div class="red-ui-panel" id="red-ui-library-dialog-load-preview-text"></div>'+
'<div class="red-ui-panel" id="node-dialog-library-load-preview-details">'+ '<div class="red-ui-panel" id="red-ui-library-dialog-load-preview-details">'+
'<table id="node-dialog-library-load-preview-details-table" class="node-info"></table>'+ '<table id="red-ui-library-dialog-load-preview-details-table" class="node-info"></table>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
'</div>'+ '</div>'+
@ -39,12 +39,12 @@ RED.library = (function() {
'</div>' '</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">'+ '<form class="form-horizontal">'+
'<div style="height: 400px; position:relative; ">'+ '<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">'+ '<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>'+
'</div>'+ '</div>'+
'</form>'+ '</form>'+
@ -56,7 +56,7 @@ RED.library = (function() {
if (name === "") { if (name === "") {
name = RED._("library.unnamedType",{type:activeLibrary.type}); 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(); var selectedPath = saveLibraryBrowser.getSelected();
if (!selectedPath.children) { if (!selectedPath.children) {
selectedPath = selectedPath.parent; selectedPath = selectedPath.parent;
@ -97,7 +97,7 @@ RED.library = (function() {
} }
}); });
if (exists) { 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)}),{ var notification = RED.notify(RED._("clipboard.export.exists",{file:RED.utils.sanitize(filename)}),{
type: "warning", type: "warning",
fixed: true, fixed: true,
@ -105,7 +105,7 @@ RED.library = (function() {
text: RED._("common.label.cancel"), text: RED._("common.label.cancel"),
click: function() { click: function() {
notification.hideNotification() notification.hideNotification()
$( "#node-dialog-library-save" ).dialog( "open" ); $( "#red-ui-library-dialog-save" ).dialog( "open" );
} }
},{ },{
text: RED._("clipboard.export.overwrite"), text: RED._("clipboard.export.overwrite"),
@ -174,10 +174,10 @@ RED.library = (function() {
var valid = filename.length > 0 && !/[\/\\]/.test(filename); var valid = filename.length > 0 && !/[\/\\]/.test(filename);
if (valid) { if (valid) {
filenameInput.removeClass("input-error"); filenameInput.removeClass("input-error");
$("#node-dialog-library-save-button").button("enable"); $("#red-ui-library-dialog-save-button").button("enable");
} else { } else {
filenameInput.addClass("input-error"); filenameInput.addClass("input-error");
$("#node-dialog-library-save-button").button("disable"); $("#red-ui-library-dialog-save-button").button("disable");
} }
},100); },100);
} }
@ -234,7 +234,7 @@ RED.library = (function() {
}] }]
loadLibraryBrowser.data(listing); loadLibraryBrowser.data(listing);
}); });
libraryEditor = ace.edit('node-dialog-library-load-preview-text',{ libraryEditor = ace.edit('red-ui-library-dialog-load-preview-text',{
useWorker: false useWorker: false
}); });
libraryEditor.setTheme("ace/theme/tomorrow"); libraryEditor.setTheme("ace/theme/tomorrow");
@ -249,7 +249,7 @@ RED.library = (function() {
libraryEditor.renderer.$cursorLayer.element.style.opacity=0; libraryEditor.renderer.$cursorLayer.element.style.opacity=0;
libraryEditor.$blockScrolling = Infinity; 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', { id:'node-input-'+options.type+'-menu-save-library',
@ -262,7 +262,7 @@ RED.library = (function() {
if (filename === "") { if (filename === "") {
filename = "unnamed-"+options.type; 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) { loadLibraryFolder("local",options.url, "", function(items) {
var listing = [{ var listing = [{
@ -281,7 +281,7 @@ RED.library = (function() {
}] }]
saveLibraryBrowser.data(listing); 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"); $(_librarySave).appendTo("#red-ui-editor");
$(_libraryLookup).appendTo("#red-ui-editor"); $(_libraryLookup).appendTo("#red-ui-editor");
$( "#node-dialog-library-save" ).dialog({ $( "#red-ui-library-dialog-save" ).dialog({
title: RED._("library.saveToLibrary"), title: RED._("library.saveToLibrary"),
modal: true, modal: true,
autoOpen: false, 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"), text: RED._("common.label.save"),
class: "primary", class: "primary",
click: function() { click: function() {
@ -456,26 +456,26 @@ RED.library = (function() {
}); });
saveLibraryBrowser = RED.library.createBrowser({ saveLibraryBrowser = RED.library.createBrowser({
container: $("#node-dialog-library-save-browser"), container: $("#red-ui-library-dialog-save-browser"),
addFolderButton: true, addFolderButton: true,
onselect: function(item) { onselect: function(item) {
if (item.label) { if (item.label) {
if (!item.children) { if (!item.children) {
$("#node-dialog-library-save-filename").val(item.label); $("#red-ui-library-dialog-save-filename").val(item.label);
item = item.parent; item = item.parent;
} }
if (item.writable === false) { if (item.writable === false) {
$("#node-dialog-library-save-button").button("disable"); $("#red-ui-library-dialog-save-button").button("disable");
} else { } 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))}); $("#red-ui-library-dialog-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('paste',function() { var input = $(this); setTimeout(function() { validateExportFilename(input)},10)});
$( "#node-dialog-library-load" ).dialog({ $( "#red-ui-library-dialog-load" ).dialog({
modal: true, modal: true,
autoOpen: false, autoOpen: false,
width: 800, width: 800,
@ -514,9 +514,9 @@ RED.library = (function() {
} }
}); });
loadLibraryBrowser = RED.library.createBrowser({ loadLibraryBrowser = RED.library.createBrowser({
container: $("#node-dialog-library-load-browser"), container: $("#red-ui-library-dialog-load-browser"),
onselect: function(file) { 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; selectedLibraryItem = file.props;
if (file && file.label && !file.children) { if (file && file.label && !file.children) {
$.get("library/"+file.library+"/"+file.type+"/"+file.path, function(data) { $.get("library/"+file.library+"/"+file.type+"/"+file.path, function(data) {
@ -542,11 +542,11 @@ RED.library = (function() {
} }
}); });
RED.panels.create({ RED.panels.create({
container:$("#node-dialog-library-load-panes"), container:$("#red-ui-library-dialog-load-panes"),
dir: "horizontal" dir: "horizontal"
}); });
RED.panels.create({ RED.panels.create({
container:$("#node-dialog-library-load-preview"), container:$("#red-ui-library-dialog-load-preview"),
dir: "vertical" dir: "vertical"
}); });
}, },

View File

@ -257,7 +257,7 @@ RED.palette.editor = (function() {
setElements.enableButton.text(RED._('palette.editor.enable')); 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; catalogueLoadErrors = true;
} }
if (catalogueCount > 1) { 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 (catalogueLoadStatus.length === catalogueCount) {
if (catalogueLoadErrors) { if (catalogueLoadErrors) {
@ -358,7 +358,7 @@ RED.palette.editor = (function() {
} }
var delta = 250-(Date.now() - catalogueLoadStart); var delta = 250-(Date.now() - catalogueLoadStart);
setTimeout(function() { setTimeout(function() {
$("#palette-module-install-shade").hide(); $("#red-ui-palette-module-install-shade").hide();
},Math.max(delta,0)); },Math.max(delta,0));
} }
@ -370,15 +370,15 @@ RED.palette.editor = (function() {
loadedIndex = {}; loadedIndex = {};
packageList.editableList('empty'); 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']; var catalogues = RED.settings.theme('palette.catalogues')||['https://catalogue.nodered.org/catalogue.json'];
catalogueLoadStatus = []; catalogueLoadStatus = [];
catalogueLoadErrors = false; catalogueLoadErrors = false;
catalogueCount = catalogues.length; catalogueCount = catalogues.length;
if (catalogues.length > 1) { 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(); catalogueLoadStart = Date.now();
var handled = 0; var handled = 0;
catalogues.forEach(function(catalog,index) { catalogues.forEach(function(catalog,index) {
@ -542,15 +542,15 @@ RED.palette.editor = (function() {
function createSettingsPane() { function createSettingsPane() {
settingsPane = $('<div id="user-settings-tab-palette"></div>'); settingsPane = $('<div id="red-ui-settings-tab-palette"></div>');
var content = $('<div id="palette-editor">'+ var content = $('<div id="red-ui-palette-editor">'+
'<ul id="palette-editor-tabs"></ul>'+ '<ul id="red-ui-palette-editor-tabs"></ul>'+
'</div>').appendTo(settingsPane); '</div>').appendTo(settingsPane);
editorTabs = RED.tabs.create({ editorTabs = RED.tabs.create({
element: settingsPane.find('#palette-editor-tabs'), element: settingsPane.find('#red-ui-palette-editor-tabs'),
onchange:function(tab) { onchange:function(tab) {
content.find(".palette-editor-tab").hide(); content.find(".red-ui-palette-editor-tab").hide();
tab.content.show(); tab.content.show();
if (filterInput) { if (filterInput) {
filterInput.searchBox('value',""); 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({ editorTabs.addTab({
id: 'nodes', 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, addButton: false,
scrollOnAdd: false, scrollOnAdd: false,
sort: function(A,B) { sort: function(A,B) {
@ -607,18 +607,18 @@ RED.palette.editor = (function() {
addItem: function(container,i,object) { addItem: function(container,i,object) {
var entry = object.info; var entry = object.info;
if (entry) { if (entry) {
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container); var headerRow = $('<div>',{class:"red-ui-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 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); $('<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 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 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="palette-module-error-list"></ul>').appendTo(errorRow); var errorList = $('<ul class="red-ui-palette-module-error-list"></ul>').appendTo(errorRow);
var buttonRow = $('<div>',{class:"palette-module-meta"}).appendTo(headerRow); var buttonRow = $('<div>',{class:"red-ui-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 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 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); 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)); 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 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 contentRow = $('<div>',{class:"red-ui-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 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 = { object.elements = {
updateButton: updateButton, updateButton: updateButton,
@ -674,13 +674,13 @@ RED.palette.editor = (function() {
}); });
setList.forEach(function(setName) { setList.forEach(function(setName) {
var set = entry.sets[setName]; var set = entry.sets[setName];
var setRow = $('<div>',{class:"palette-module-set"}).appendTo(contentRow); var setRow = $('<div>',{class:"red-ui-palette-module-set"}).appendTo(contentRow);
var buttonGroup = $('<div>',{class:"palette-module-set-button-group"}).appendTo(setRow); var buttonGroup = $('<div>',{class:"red-ui-palette-module-set-button-group"}).appendTo(setRow);
var typeSwatches = {}; var typeSwatches = {};
set.types.forEach(function(t) { set.types.forEach(function(t) {
var typeDiv = $('<div>',{class:"palette-module-type"}).appendTo(setRow); var typeDiv = $('<div>',{class:"red-ui-palette-module-type"}).appendTo(setRow);
typeSwatches[t] = $('<span>',{class:"palette-module-type-swatch"}).appendTo(typeDiv); typeSwatches[t] = $('<span>',{class:"red-ui-palette-module-type-swatch"}).appendTo(typeDiv);
$('<span>',{class:"palette-module-type-node"}).text(t).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); var enableButton = $('<a href="#" class="editor-button editor-button-small"></a>').appendTo(buttonGroup);
enableButton.on("click", function(evt) { 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({ editorTabs.addTab({
id: 'install', id: 'install',
@ -734,7 +734,7 @@ RED.palette.editor = (function() {
content: installTab 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); var searchDiv = $('<div>',{class:"red-ui-palette-search"}).appendTo(installTab);
searchInput = $('<input type="text" data-i18n="[placeholder]palette.search"></input>') 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); $('<span>').text(RED._("palette.editor.sort")+' ').appendTo(toolBar);
var sortGroup = $('<span class="button-group"></span>').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 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="palette-editor-install-sort-option red-ui-sidebar-header-button-toggle" data-i18n="palette.editor.sortAZ"></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="palette-editor-install-sort-option red-ui-sidebar-header-button-toggle" data-i18n="palette.editor.sortRecent"></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 = [ var sortOpts = [
@ -777,7 +777,7 @@ RED.palette.editor = (function() {
if ($(this).hasClass("selected")) { if ($(this).hasClass("selected")) {
return; return;
} }
$(".palette-editor-install-sort-option").removeClass("selected"); $(".red-ui-palette-editor-install-sort-option").removeClass("selected");
$(this).addClass("selected"); $(this).addClass("selected");
activeSort = opt.func; activeSort = opt.func;
refreshFilteredItems(); refreshFilteredItems();
@ -802,8 +802,8 @@ RED.palette.editor = (function() {
return return
} }
if (object.more) { if (object.more) {
container.addClass('palette-module-more'); container.addClass('red-ui-palette-module-more');
var moreRow = $('<div>',{class:"palette-module-header palette-module"}).appendTo(container); 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); var moreLink = $('<a href="#"></a>').text(RED._('palette.editor.more',{count:object.more})).appendTo(moreRow);
moreLink.on("click", function(e) { moreLink.on("click", function(e) {
e.preventDefault(); e.preventDefault();
@ -819,15 +819,15 @@ RED.palette.editor = (function() {
} }
if (object.info) { if (object.info) {
var entry = object.info; var entry = object.info;
var headerRow = $('<div>',{class:"palette-module-header"}).appendTo(container); var headerRow = $('<div>',{class:"red-ui-palette-module-header"}).appendTo(container);
var titleRow = $('<div class="palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(headerRow); var titleRow = $('<div class="red-ui-palette-module-meta"><i class="fa fa-cube"></i></div>').appendTo(headerRow);
$('<span>',{class:"palette-module-name"}).text(entry.name||entry.id).appendTo(titleRow); $('<span>',{class:"red-ui-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); $('<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="palette-module-meta"></div>').appendTo(headerRow); var descRow = $('<div class="red-ui-palette-module-meta"></div>').appendTo(headerRow);
$('<div>',{class:"palette-module-description"}).text(entry.description).appendTo(descRow); $('<div>',{class:"red-ui-palette-module-description"}).text(entry.description).appendTo(descRow);
var metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow); var metaRow = $('<div class="red-ui-palette-module-meta"></div>').appendTo(headerRow);
$('<span class="palette-module-version"><i class="fa fa-tag"></i> '+entry.version+'</span>').appendTo(metaRow); $('<span class="red-ui-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); $('<span class="red-ui-palette-module-updated"><i class="fa fa-calendar"></i> '+formatUpdatedAt(entry.updated_at)+'</span>').appendTo(metaRow);
var duplicateType = false; var duplicateType = false;
if (entry.types && entry.types.length > 0) { if (entry.types && entry.types.length > 0) {
@ -839,11 +839,11 @@ RED.palette.editor = (function() {
break; 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 buttonRow = $('<div>',{class:"red-ui-palette-module-meta"}).appendTo(headerRow);
var buttonGroup = $('<div>',{class:"palette-module-button-group"}).appendTo(buttonRow); 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); var installButton = $('<a href="#" class="editor-button editor-button-small"></a>').text(RED._('palette.editor.install')).appendTo(buttonGroup);
installButton.on("click", function(e) { installButton.on("click", function(e) {
e.preventDefault(); 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) { function update(entry,version,container,done) {
if (RED.settings.theme('palette.editable') === false) { if (RED.settings.theme('palette.editable') === false) {
@ -894,7 +894,7 @@ RED.palette.editor = (function() {
}, },
{ {
text: RED._("palette.editor.confirm.button.update"), 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() { click: function() {
var spinner = RED.utils.addSpinnerOverlay(container, true); 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); 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"), 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() { click: function() {
var spinner = RED.utils.addSpinnerOverlay(container, true); 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); 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) { if (entry.url) {
buttons.push({ buttons.push({
text: RED._("palette.editor.confirm.button.review"), 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() { click: function() {
var url = entry.url||""; var url = entry.url||"";
window.open(url); window.open(url);
@ -1018,7 +1018,7 @@ RED.palette.editor = (function() {
} }
buttons.push({ buttons.push({
text: RED._("palette.editor.confirm.button.install"), 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() { click: function() {
var spinner = RED.utils.addSpinnerOverlay(container, true); var spinner = RED.utils.addSpinnerOverlay(container, true);

View File

@ -46,7 +46,6 @@ RED.projects.settings = (function() {
} }
settingsVisible = true; settingsVisible = true;
var tabContainer;
var trayOptions = { var trayOptions = {
title: RED._("sidebar.project.projectSettings.title"), title: RED._("sidebar.project.projectSettings.title"),
@ -68,7 +67,7 @@ RED.projects.settings = (function() {
var trayBody = tray.find('.red-ui-tray-body'); var trayBody = tray.find('.red-ui-tray-body');
var settingsContent = $('<div></div>').appendTo(trayBody); 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); $('<ul></ul>',{id:"user-settings-tabs"}).appendTo(tabContainer);
var settingsTabs = RED.tabs.create({ var settingsTabs = RED.tabs.create({
@ -76,7 +75,7 @@ RED.projects.settings = (function() {
vertical: true, vertical: true,
onchange: function(tab) { onchange: function(tab) {
setTimeout(function() { setTimeout(function() {
$("#user-settings-tabs-content").children().hide(); tabContents.children().hide();
$("#" + tab.id).show(); $("#" + tab.id).show();
if (tab.pane.focus) { if (tab.pane.focus) {
tab.pane.focus(); tab.pane.focus();
@ -84,7 +83,7 @@ RED.projects.settings = (function() {
},50); },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) { panes.forEach(function(pane) {
settingsTabs.addTab({ settingsTabs.addTab({
@ -393,17 +392,17 @@ RED.projects.settings = (function() {
addButton: false, addButton: false,
addItem: function(row,index,entry) { addItem: function(row,index,entry) {
// console.log(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.label) {
if (entry.index === 0) { if (entry.index === 0) {
headerRow.addClass("red-ui-search-empty") headerRow.addClass("red-ui-search-empty")
} else { } else {
row.parent().addClass("palette-module-section"); row.parent().addClass("red-ui-palette-module-section");
} }
headerRow.text(entry.label); headerRow.text(entry.label);
// if (RED.user.hasPermission("projects.write")) { // if (RED.user.hasPermission("projects.write")) {
// if (entry.index === 1) { // 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(); // evt.preventDefault();
// var deps = $.extend(true, {}, activeProject.dependencies); // var deps = $.extend(true, {}, activeProject.dependencies);
// for (var m in modulesInUse) { // for (var m in modulesInUse) {
@ -414,7 +413,7 @@ RED.projects.settings = (function() {
// editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList); // editDependencies(activeProject,JSON.stringify(deps,"",4),pane,depsList);
// }); // });
// } else if (entry.index === 3) { // } 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(); // evt.preventDefault();
// var deps = $.extend(true, {}, activeProject.dependencies); // var deps = $.extend(true, {}, activeProject.dependencies);
// for (var m in activeProject.dependencies) { // for (var m in activeProject.dependencies) {
@ -427,17 +426,17 @@ RED.projects.settings = (function() {
// } // }
// } // }
} else { } else {
headerRow.addClass("palette-module-header"); headerRow.addClass("red-ui-palette-module-header");
if (!entry.installed) { if (!entry.installed) {
headerRow.addClass("palette-module-not-installed"); headerRow.addClass("red-ui-palette-module-not-installed");
} else if (entry.count === 0) { } else if (entry.count === 0) {
headerRow.addClass("palette-module-unused"); headerRow.addClass("red-ui-palette-module-unused");
} else if (!entry.known) { } else if (!entry.known) {
headerRow.addClass("palette-module-unknown"); headerRow.addClass("red-ui-palette-module-unknown");
} }
entry.element = headerRow; 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"; var iconClass = "fa-cube";
if (!entry.installed) { if (!entry.installed) {
iconClass = "fa-warning"; iconClass = "fa-warning";
@ -445,10 +444,10 @@ RED.projects.settings = (function() {
var icon = $('<i class="fa '+iconClass+'"></i>').appendTo(titleRow); var icon = $('<i class="fa '+iconClass+'"></i>').appendTo(titleRow);
entry.icon = icon; entry.icon = icon;
$('<span>').text(entry.id).appendTo(titleRow); $('<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); var versionSpan = $('<span>').text(entry.version).appendTo(metaRow);
metaRow = $('<div class="palette-module-meta"></div>').appendTo(headerRow); metaRow = $('<div class="red-ui-palette-module-meta"></div>').appendTo(headerRow);
var buttons = $('<div class="palette-module-button-group"></div>').appendTo(metaRow); var buttons = $('<div class="red-ui-palette-module-button-group"></div>').appendTo(metaRow);
if (RED.user.hasPermission("projects.write")) { if (RED.user.hasPermission("projects.write")) {
if (!entry.installed && RED.settings.theme('palette.editable') !== false) { 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) $('<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) { saveDependencies(depsList,row,deps,function(err) {
if (!err) { if (!err) {
buttons.remove(); buttons.remove();
headerRow.removeClass("palette-module-unknown"); headerRow.removeClass("red-ui-palette-module-unknown");
} else { } else {
console.log(err); console.log(err);
} }
@ -729,7 +728,7 @@ RED.projects.settings = (function() {
function createFilesSection(activeProject,pane) { function createFilesSection(activeProject,pane) {
var title = $('<h3></h3>').text(RED._("sidebar.project.projectSettings.files")).appendTo(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")) { 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>') 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) .appendTo(title)
@ -754,7 +753,7 @@ RED.projects.settings = (function() {
// credentialStateLabel.parent().hide(); // credentialStateLabel.parent().hide();
credentialStateLabel.addClass("uneditable-input"); credentialStateLabel.addClass("uneditable-input");
$(".user-settings-row-credentials").show(); $(".red-ui-settings-row-credentials").show();
credentialStateLabel.css('height','auto'); credentialStateLabel.css('height','auto');
credentialFormRows.hide(); credentialFormRows.hide();
credentialSecretButtons.show(); credentialSecretButtons.show();
@ -763,7 +762,7 @@ RED.projects.settings = (function() {
var row; var row;
// Flow files // 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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.package")).appendTo(row);
var packageFileLabel = $('<div class="uneditable-input" style="padding:0">').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); 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); var projectRoot = projectPackage.substring(0,projectPackage.length - 12);
// Flow files // 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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.flow")).appendTo(row);
var flowFileLabel = $('<div class="uneditable-input" style="padding:0">').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); 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")); 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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.credentials")).appendTo(row);
var credFileName = "flows_cred.json"; 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); $('<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); 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")); 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 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 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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.currentKey")).appendTo(credentialSecretExistingRow);
var credentialSecretExistingInput = $('<input type="password">').appendTo(credentialSecretExistingRow) var credentialSecretExistingInput = $('<input type="password">').appendTo(credentialSecretExistingRow)
.on("change keyup paste",function() { .on("change keyup paste",function() {
@ -1027,7 +1026,7 @@ RED.projects.settings = (function() {
checkFiles(); 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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.newKey")).appendTo(credentialSecretNewRow);
@ -1055,7 +1054,7 @@ RED.projects.settings = (function() {
flowFileLabel.css('height',''); flowFileLabel.css('height','');
flowFileLabel.css('color',''); flowFileLabel.css('color','');
$(".user-settings-row-credentials").hide(); $(".red-ui-settings-row-credentials").hide();
credentialFormRows.hide(); credentialFormRows.hide();
credentialSecretButtons.hide(); credentialSecretButtons.hide();
credentialSecretResetButton.removeClass("selected"); credentialSecretResetButton.removeClass("selected");
@ -1179,10 +1178,10 @@ RED.projects.settings = (function() {
} }
function createLocalBranchListSection(activeProject,pane) { 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); $('<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({ var branchList = $('<ol>').appendTo(row).editableList({
@ -1317,7 +1316,7 @@ RED.projects.settings = (function() {
createLocalBranchListSection(activeProject,pane); 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 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>') 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 emptyItem = { empty: true };
var isEmpty = 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); 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); var remotesList = $('<ol>').appendTo(row);
remotesList.editableList({ remotesList.editableList({
addButton: false, 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); $('<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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.remoteName")).appendTo(row);
var remoteNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() { var remoteNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() {
remoteNameInputChanged = true; remoteNameInputChanged = true;
validateForm(); validateForm();
}); });
$('<label class="projects-edit-form-sublabel"><small>' + RED._("sidebar.project.projectSettings.nameRule") + '</small></label>').appendTo(row).find("small"); $('<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); $('<label for=""></label>').text(RED._("sidebar.project.projectSettings.url")).appendTo(row);
var remoteURLInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() { var remoteURLInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() {
remoteURLInputChanged = true; remoteURLInputChanged = true;

View File

@ -26,15 +26,15 @@ RED.projects.userSettings = (function() {
var title = $('<h3></h3>').text(RED._("editor:sidebar.project.userSettings.committerDetail")).appendTo(pane); 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")); $('<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); $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.userName")).appendTo(row);
gitUsernameInput = $('<input type="text">').appendTo(row); gitUsernameInput = $('<input type="text">').appendTo(row);
gitUsernameInput.val(currentGitSettings.user.name||""); 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); $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.email")).appendTo(row);
gitEmailInput = $('<input type="text">').appendTo(row); gitEmailInput = $('<input type="text">').appendTo(row);
gitEmailInput.val(currentGitSettings.user.email||""); gitEmailInput.val(currentGitSettings.user.email||"");
@ -42,7 +42,7 @@ RED.projects.userSettings = (function() {
function createSSHKeySection(pane) { 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 popover;
var title = $('<h3></h3>').text(RED._("editor:sidebar.project.userSettings.sshKeys")).appendTo(container); 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")); 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); 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); $('<div class="projects-dialog-list-dialog-header">').text(RED._("editor:sidebar.project.userSettings.addSshKey")).appendTo(addKeyDialog);
var addKeyDialogBody = $('<div>').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")); $('<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 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); // 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); $('<label for=""></label>').text(RED._("editor:sidebar.project.userSettings.name")).appendTo(row);
var keyNameInputChanged = false; var keyNameInputChanged = false;
var keyNameInput = $('<input type="text">').appendTo(row).on("change keyup paste",function() { 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"); $('<label class="projects-edit-form-sublabel"><small>'+RED._("editor:sidebar.project.userSettings.nameRule")+'</small></label>').appendTo(row).find("small");
var generateKeyPane = $('<div>').appendTo(addKeyDialogBody); 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); $('<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 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 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); // 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); // $('<label for=""></label>').text('Public key').appendTo(row);
// var localPublicKeyPathInput = $('<input type="text">').appendTo(row).on("change keyup paste",validateForm); // 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"); // $('<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); // $('<label for=""></label>').text('Private key').appendTo(row);
// var localPrivateKeyPathInput = $('<input type="text">').appendTo(row).on("change keyup paste",validateForm); // 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"); // $('<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); // 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); // $('<label for=""></label>').text('Public key').appendTo(row);
// var publicKeyInput = $('<textarea>').appendTo(row).on("change keyup paste",validateForm); // 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"); // $('<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); // $('<label for=""></label>').text('Private key').appendTo(row);
// var privateKeyInput = $('<textarea>').appendTo(row).on("change keyup paste",validateForm); // 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"); // $('<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); },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 emptyItem = { empty: true };
var expandKey = function(container,entry) { var expandKey = function(container,entry) {
var row = $('<div class="projects-dialog-ssh-public-key">',{style:"position:relative"}).appendTo(container); 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) { 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); createGitUserSection(pane);
createSSHKeySection(pane); createSSHKeySection(pane);
return pane; return pane;

View File

@ -104,7 +104,7 @@ RED.projects = (function() {
}, },
buttons: [ buttons: [
{ {
// id: "clipboard-dialog-cancel", // id: "red-ui-clipboard-dialog-cancel",
text: RED._("projects.welcome.openExistingProject"), text: RED._("projects.welcome.openExistingProject"),
class: "secondary", class: "secondary",
click: function() { 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"), text: RED._("projects.welcome.not-right-now"),
click: function() { click: function() {
createProjectOptions = {}; createProjectOptions = {};
@ -179,7 +179,7 @@ RED.projects = (function() {
}, },
buttons: [ buttons: [
{ {
// id: "clipboard-dialog-cancel", // id: "red-ui-clipboard-dialog-cancel",
text: RED._("common.label.back"), text: RED._("common.label.back"),
click: function() { click: function() {
show('welcome'); show('welcome');
@ -769,7 +769,7 @@ RED.projects = (function() {
buttons: function(options) { buttons: function(options) {
return [ return [
{ {
// id: "clipboard-dialog-cancel", // id: "red-ui-clipboard-dialog-cancel",
text: RED._(options.existingProject ? "common.label.cancel": "common.label.back"), text: RED._(options.existingProject ? "common.label.cancel": "common.label.back"),
click: function() { click: function() {
if (options.existingProject) { if (options.existingProject) {
@ -928,7 +928,7 @@ RED.projects = (function() {
buttons: function(options) { buttons: function(options) {
return [ return [
{ {
// id: "clipboard-dialog-cancel", // id: "red-ui-clipboard-dialog-cancel",
text: RED._("common.label.back"), text: RED._("common.label.back"),
click: function() { click: function() {
show('default-files',options); show('default-files',options);

View File

@ -34,7 +34,6 @@ RED.userSettings = (function() {
return; return;
} }
settingsVisible = true; settingsVisible = true;
var tabContainer;
var trayOptions = { var trayOptions = {
title: RED._("menu.label.userSettings"), title: RED._("menu.label.userSettings"),
@ -54,7 +53,7 @@ RED.userSettings = (function() {
open: function(tray) { open: function(tray) {
var trayBody = tray.find('.red-ui-tray-body'); var trayBody = tray.find('.red-ui-tray-body');
var settingsContent = $('<div></div>').appendTo(trayBody); 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); $('<ul></ul>',{id:"user-settings-tabs"}).appendTo(tabContainer);
var settingsTabs = RED.tabs.create({ var settingsTabs = RED.tabs.create({
@ -62,7 +61,7 @@ RED.userSettings = (function() {
vertical: true, vertical: true,
onchange: function(tab) { onchange: function(tab) {
setTimeout(function() { setTimeout(function() {
$("#user-settings-tabs-content").children().hide(); tabContents.children().hide();
$("#" + tab.id).show(); $("#" + tab.id).show();
if (tab.pane.focus) { if (tab.pane.focus) {
tab.pane.focus(); tab.pane.focus();
@ -70,18 +69,18 @@ RED.userSettings = (function() {
},50); },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) { panes.forEach(function(pane) {
settingsTabs.addTab({ settingsTabs.addTab({
id: "user-settings-tab-"+pane.id, id: "red-ui-settings-tab-"+pane.id,
label: pane.title, label: pane.title,
pane: pane pane: pane
}); });
pane.get().hide().appendTo(tabContents); pane.get().hide().appendTo(tabContents);
}); });
settingsContent.i18n(); settingsContent.i18n();
settingsTabs.activateTab("user-settings-tab-"+(initialTab||'view')) settingsTabs.activateTab("red-ui-settings-tab-"+(initialTab||'view'))
$("#red-ui-sidebar-shade").show(); $("#red-ui-sidebar-shade").show();
}, },
close: function() { close: function() {
@ -134,7 +133,7 @@ RED.userSettings = (function() {
function createViewPane() { 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') || {}; var currentEditorSettings = RED.settings.get('editor') || {};
currentEditorSettings.view = currentEditorSettings.view || {}; currentEditorSettings.view = currentEditorSettings.view || {};
@ -150,7 +149,7 @@ RED.userSettings = (function() {
} else { } else {
initialState = currentEditorSettings.view[opt.setting]; 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; var input;
if (opt.toggle) { 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"); input = $('<label for="user-settings-'+opt.setting+'"><input id="user-settings-'+opt.setting+'" type="checkbox"> '+RED._(opt.label)+'</label>').appendTo(row).find("input");

View File

@ -26,20 +26,20 @@ RED.utils = (function() {
function buildMessageSummaryValue(value) { function buildMessageSummaryValue(value) {
var result; var result;
if (Array.isArray(value)) { 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) { } 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') { } else if (typeof value === 'object') {
if (value.hasOwnProperty('type') && value.type === 'Buffer' && value.hasOwnProperty('data')) { 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')) { } 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') { } 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') { } 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 { } 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') { } else if (typeof value === 'string') {
var subvalue; var subvalue;
@ -48,16 +48,16 @@ RED.utils = (function() {
} else { } else {
subvalue = sanitize(value); 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') { } 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 { } 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; return result;
} }
function makeExpandable(el,onbuild,ontoggle,expand) { function makeExpandable(el,onbuild,ontoggle,expand) {
el.addClass("debug-message-expandable"); el.addClass("red-ui-debug-msg-expandable");
el.prop('toggle',function() { el.prop('toggle',function() {
return function(state) { return function(state) {
var parent = el.parent(); var parent = el.parent();
@ -117,8 +117,8 @@ RED.utils = (function() {
if (!pinnedPaths.hasOwnProperty(sourceId)) { if (!pinnedPaths.hasOwnProperty(sourceId)) {
pinnedPaths[sourceId] = {} pinnedPaths[sourceId] = {}
} }
var tools = $('<span class="debug-message-tools"></span>').appendTo(obj); var tools = $('<span class="red-ui-debug-msg-tools"></span>').appendTo(obj);
var copyTools = $('<span class="debug-message-tools-copy button-group"></span>').appendTo(tools); var copyTools = $('<span class="red-ui-debug-msg-tools-copy button-group"></span>').appendTo(tools);
if (!!key) { if (!!key) {
var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).on("click", function(e) { var copyPath = $('<button class="editor-button editor-button-small"><i class="fa fa-terminal"></i></button>').appendTo(copyTools).on("click", function(e) {
e.preventDefault(); e.preventDefault();
@ -134,24 +134,24 @@ RED.utils = (function() {
if (strippedKey !== undefined && strippedKey !== '') { if (strippedKey !== undefined && strippedKey !== '') {
var isPinned = pinnedPaths[sourceId].hasOwnProperty(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.preventDefault();
e.stopPropagation(); e.stopPropagation();
if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) { if (pinnedPaths[sourceId].hasOwnProperty(strippedKey)) {
delete pinnedPaths[sourceId][strippedKey]; delete pinnedPaths[sourceId][strippedKey];
$(this).removeClass("selected"); $(this).removeClass("selected");
obj.removeClass("debug-message-row-pinned"); obj.removeClass("red-ui-debug-msg-row-pinned");
} else { } else {
var rootedPath = "$"+(strippedKey[0] === '['?"":".")+strippedKey; var rootedPath = "$"+(strippedKey[0] === '['?"":".")+strippedKey;
pinnedPaths[sourceId][strippedKey] = normalisePropertyExpression(rootedPath); pinnedPaths[sourceId][strippedKey] = normalisePropertyExpression(rootedPath);
$(this).addClass("selected"); $(this).addClass("selected");
obj.addClass("debug-message-row-pinned"); obj.addClass("red-ui-debug-msg-row-pinned");
} }
}).toggleClass("selected",isPinned); }).toggleClass("selected",isPinned);
obj.toggleClass("debug-message-row-pinned",isPinned); obj.toggleClass("red-ui-debug-msg-row-pinned",isPinned);
} }
if (extraTools) { if (extraTools) {
extraTools.addClass("debug-message-tools-other"); extraTools.addClass("red-ui-debug-msg-tools-other");
extraTools.appendTo(tools); extraTools.appendTo(tools);
} }
} }
@ -243,10 +243,10 @@ RED.utils = (function() {
} }
if (format === 'raw') { if (format === 'raw') {
button.text('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') { } else if (format === 'string') {
button.text('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) { if (path !== undefined && rootPath !== undefined) {
strippedKey = path.substring(rootPath.length+(path[rootPath.length]==="."?1:0)); 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.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) { if (sourceId) {
addMessageControls(header,sourceId,path,obj,rootPath,strippedKey,tools); addMessageControls(header,sourceId,path,obj,rootPath,strippedKey,tools);
} }
if (!key) { if (!key) {
element.addClass("debug-message-top-level"); element.addClass("red-ui-debug-msg-top-level");
if (sourceId) { if (sourceId) {
var pinned = pinnedPaths[sourceId]; var pinned = pinnedPaths[sourceId];
expandPaths = []; expandPaths = [];
@ -303,17 +303,17 @@ RED.utils = (function() {
expandPaths.sort(); expandPaths.sort();
} }
element.clearPinned = function() { 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] = {}; pinnedPaths[sourceId] = {};
} }
} }
} else { } else {
if (!hideKey) { 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); $('<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 isArray = Array.isArray(obj);
var isArrayObject = false; var isArrayObject = false;
@ -322,33 +322,33 @@ RED.utils = (function() {
isArrayObject = true; isArrayObject = true;
} }
if (obj === null || obj === undefined) { 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') { } 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')) { } 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')) { } 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') { } else if (typeof obj === 'string') {
if (/[\t\n\r]/.test(obj)) { if (/[\t\n\r]/.test(obj)) {
element.addClass('collapsed'); 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() { makeExpandable(header, function() {
$('<span class="debug-message-type-meta debug-message-object-type-header"></span>').text(typeHint||'string').appendTo(header); $('<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="debug-message-object-entry collapsed"></div>').appendTo(element); var row = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(element);
$('<pre class="debug-message-type-string"></pre>').text(obj).appendTo(row); $('<pre class="red-ui-debug-msg-type-string"></pre>').text(obj).appendTo(row);
},function(state) {if (ontoggle) { ontoggle(path,state);}}, checkExpanded(strippedKey,expandPaths)); },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)) { 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') { } 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 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) { e.on("click", function(evt) {
evt.preventDefault(); evt.preventDefault();
formatNumber($(this), obj, sourceId, path, true); formatNumber($(this), obj, sourceId, path, true);
@ -383,14 +383,14 @@ RED.utils = (function() {
var fullLength = data.length; var fullLength = data.length;
if (originalLength > 0) { if (originalLength > 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);
var arrayRows = $('<div class="debug-message-array-rows"></div>').appendTo(element); var arrayRows = $('<div class="red-ui-debug-msg-array-rows"></div>').appendTo(element);
element.addClass('debug-message-buffer-raw'); element.addClass('red-ui-debug-msg-buffer-raw');
} }
if (key) { 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 { } 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); $('<span>[ </span>').appendTo(headerHead);
var arrayLength = Math.min(originalLength,10); var arrayLength = Math.min(originalLength,10);
for (i=0;i<arrayLength;i++) { for (i=0;i<arrayLength;i++) {
@ -403,7 +403,7 @@ RED.utils = (function() {
$('<span> &hellip;</span>').appendTo(headerHead); $('<span> &hellip;</span>').appendTo(headerHead);
} }
if (arrayLength === 0) { 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); $('<span> ]</span>').appendTo(headerHead);
} }
@ -411,19 +411,19 @@ RED.utils = (function() {
makeExpandable(header,function() { makeExpandable(header,function() {
if (!key) { 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') { if (type === 'buffer') {
var stringRow = $('<div class="debug-message-string-rows"></div>').appendTo(element); var stringRow = $('<div class="red-ui-debug-msg-string-rows"></div>').appendTo(element);
var sr = $('<div class="debug-message-object-entry collapsed"></div>').appendTo(stringRow); var sr = $('<div class="red-ui-debug-msg-object-entry collapsed"></div>').appendTo(stringRow);
var stringEncoding = ""; var stringEncoding = "";
try { try {
stringEncoding = String.fromCharCode.apply(null, new Uint16Array(data)) stringEncoding = String.fromCharCode.apply(null, new Uint16Array(data))
} catch(err) { } catch(err) {
console.log(err); console.log(err);
} }
$('<pre class="debug-message-type-string"></pre>').text(stringEncoding).appendTo(sr); $('<pre class="red-ui-debug-msg-type-string"></pre>').text(stringEncoding).appendTo(sr);
var bufferOpts = $('<span class="debug-message-buffer-opts"></span>').appendTo(headerHead); 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) { var switchFormat = $('<a href="#"></a>').addClass('selected').text('raw').appendTo(bufferOpts).on("click", function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
@ -435,7 +435,7 @@ RED.utils = (function() {
var row; var row;
if (fullLength <= 10) { if (fullLength <= 10) {
for (i=0;i<fullLength;i++) { 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( subElements[path+"["+i+"]"] = buildMessageElement(
data[i], data[i],
{ {
@ -454,16 +454,16 @@ RED.utils = (function() {
} else { } else {
for (i=0;i<fullLength;i+=10) { for (i=0;i<fullLength;i+=10) {
var minRange = i; 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); 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() { makeExpandable(header, (function() {
var min = minRange; var min = minRange;
var max = Math.min(fullLength-1,(minRange+9)); var max = Math.min(fullLength-1,(minRange+9));
var parent = row; var parent = row;
return function() { return function() {
for (var i=min;i<=max;i++) { 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( subElements[path+"["+i+"]"] = buildMessageElement(
data[i], data[i],
{ {
@ -484,10 +484,10 @@ RED.utils = (function() {
})(), })(),
(function() { var path = path+"["+i+"]"; return function(state) {if (ontoggle) { ontoggle(path,state);}}})(), (function() { var path = path+"["+i+"]"; return function(state) {if (ontoggle) { ontoggle(path,state);}}})(),
checkExpanded(strippedKey,expandPaths,minRange,Math.min(fullLength-1,(minRange+9)))); checkExpanded(strippedKey,expandPaths,minRange,Math.min(fullLength-1,(minRange+9))));
$('<span class="debug-message-object-key"></span>').html("["+minRange+" &hellip; "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header); $('<span class="red-ui-debug-msg-object-key"></span>').html("["+minRange+" &hellip; "+Math.min(fullLength-1,(minRange+9))+"]").appendTo(header);
} }
if (fullLength < originalLength) { if (fullLength < originalLength) {
$('<div class="debug-message-object-entry collapsed"><span class="debug-message-object-key">['+fullLength+' &hellip; '+originalLength+']</span></div>').appendTo(arrayRows); $('<div class="red-ui-debug-msg-object-entry collapsed"><span class="red-ui-debug-msg-object-key">['+fullLength+' &hellip; '+originalLength+']</span></div>').appendTo(arrayRows);
} }
} }
}, },
@ -498,13 +498,13 @@ RED.utils = (function() {
element.addClass('collapsed'); element.addClass('collapsed');
var keys = Object.keys(obj); var keys = Object.keys(obj);
if (key || keys.length > 0) { 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() { makeExpandable(header, function() {
if (!key) { 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++) { 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; var newPath = path;
if (newPath !== undefined) { if (newPath !== undefined) {
if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) { if (/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(keys[i])) {
@ -530,20 +530,20 @@ RED.utils = (function() {
).appendTo(row); ).appendTo(row);
} }
if (keys.length === 0) { 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);}}, function(state) {if (ontoggle) { ontoggle(path,state);}},
checkExpanded(strippedKey,expandPaths)); checkExpanded(strippedKey,expandPaths));
} }
if (key) { 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 { } 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); $('<span>{ </span>').appendTo(headerHead);
var keysLength = Math.min(keys.length,5); var keysLength = Math.min(keys.length,5);
for (i=0;i<keysLength;i++) { 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); $('<span>: </span>').appendTo(headerHead);
buildMessageSummaryValue(obj[keys[i]]).appendTo(headerHead); buildMessageSummaryValue(obj[keys[i]]).appendTo(headerHead);
if (i < keysLength-1) { if (i < keysLength-1) {
@ -554,12 +554,12 @@ RED.utils = (function() {
$('<span> &hellip;</span>').appendTo(headerHead); $('<span> &hellip;</span>').appendTo(headerHead);
} }
if (keysLength === 0) { 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); $('<span> }</span>').appendTo(headerHead);
} }
} else { } 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) { if (exposeApi) {
element.prop('expand', function() { return function(targetPath, state) { element.prop('expand', function() { return function(targetPath, state) {

View File

@ -14,16 +14,17 @@
* limitations under the License. * limitations under the License.
**/ **/
.debug-window { .red-ui-debug-window {
padding:0; padding:0;
margin:0; margin:0;
background: #fff; background: #fff;
line-height: 20px; line-height: 20px;
.red-ui-debug-msg-payload {
font-size: 14px;
}
} }
.debug-window .debug-message-payload {
font-size: 14px; .red-ui-debug-content {
}
.debug-content {
position: absolute; position: absolute;
top: 43px; top: 43px;
bottom: 0px; bottom: 0px;
@ -31,7 +32,7 @@
right: 0px; right: 0px;
overflow-y: scroll; overflow-y: scroll;
} }
.debug-filter-box { .red-ui-debug-filter-box {
position:absolute; position:absolute;
top: 42px; top: 42px;
left: 0px; left: 0px;
@ -42,57 +43,57 @@
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
box-shadow: 0 2px 6px rgba(0,0,0,0.1); box-shadow: 0 2px 6px rgba(0,0,0,0.1);
} }
.debug-filter-row { .red-ui-debug-filter-row {
.red-ui-nodeList { .red-ui-nodeList {
margin: 10px 0; margin: 10px 0;
} }
} }
.debug-message { .red-ui-debug-msg {
position: relative; position: relative;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-left: 8px solid #eee; border-left: 8px solid #eee;
border-right: 8px solid #eee; border-right: 8px solid #eee;
padding: 2px; padding: 2px;
&>.debug-message-meta .debug-message-tools { &>.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
display: none; display: none;
} }
&.debug-message-hover { &.red-ui-debug-msg-hover {
border-right-color: #999; border-right-color: #999;
&>.debug-message-meta .debug-message-tools { &>.red-ui-debug-msg-meta .red-ui-debug-msg-tools {
display: inline-block; display: inline-block;
} }
} }
} }
.debug-message-row { .red-ui-debug-msg-row {
.debug-message-tools-pin { .red-ui-debug-msg-tools-pin {
display: none; 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; display: inline-block;
} }
&:hover { &:hover {
background: #f3f3f3; background: #f3f3f3;
&>.debug-message-tools { &>.red-ui-debug-msg-tools {
.debug-message-tools-copy { .red-ui-debug-msg-tools-copy {
display: inline-block; display: inline-block;
} }
.debug-message-tools-pin { .red-ui-debug-msg-tools-pin {
display: inline-block; display: inline-block;
} }
.debug-message-tools-other { .red-ui-debug-msg-tools-other {
display: inline-block; display: inline-block;
} }
} }
} }
} }
.debug-message-meta .debug-message-tools { .red-ui-debug-msg-meta .red-ui-debug-msg-tools {
.editor-button-small { .editor-button-small {
font-size: 11px; font-size: 11px;
} }
} }
.debug-message-tools { .red-ui-debug-msg-tools {
.button-group:not(:last-child) { .button-group:not(:last-child) {
margin-right: 3px; margin-right: 3px;
} }
@ -114,67 +115,67 @@
} }
} }
.debug-message-meta { .red-ui-debug-msg-meta {
background: #fff; background: #fff;
font-size: 11px; font-size: 11px;
color: #707070; color: #707070;
} }
.debug-message-date { .red-ui-debug-msg-date {
padding: 1px 5px 1px 1px; padding: 1px 5px 1px 1px;
} }
.debug-message-topic { .red-ui-debug-msg-topic {
display: block; display: block;
color: #a66; color: #a66;
} }
.debug-message-name { .red-ui-debug-msg-name {
padding: 1px 5px; padding: 1px 5px;
color: #707070; color: #707070;
} }
.debug-message-tools { .red-ui-debug-msg-tools {
position: absolute; position: absolute;
top: 3px; top: 3px;
right: 1px; right: 1px;
.debug-message-tools-copy { .red-ui-debug-msg-tools-copy {
display: none; display: none;
} }
.debug-message-tools-other { .red-ui-debug-msg-tools-other {
display: none; display: none;
} }
} }
.debug-message-payload { .red-ui-debug-msg-payload {
display: block; display: block;
padding: 2px; padding: 2px;
background: #fff; background: #fff;
} }
.debug-message-level-log { .red-ui-debug-msg-level-log {
border-left-color: #eee; border-left-color: #eee;
border-right-color: #eee; border-right-color: #eee;
} }
.debug-message-level-30 { .red-ui-debug-msg-level-30 {
border-left-color: #ffdf9d; border-left-color: #ffdf9d;
border-right-color: #ffdf9d; border-right-color: #ffdf9d;
} }
.debug-message-level-20 { .red-ui-debug-msg-level-20 {
border-left-color: #f99; border-left-color: #f99;
border-right-color: #f99; border-right-color: #f99;
} }
.debug-message-object-entry { .red-ui-debug-msg-object-entry {
position: relative; position: relative;
padding-left: 15px; padding-left: 15px;
} }
.debug-message-element { .red-ui-debug-msg-element {
color: #333; color: #333;
font-family: Menlo, monospace; font-family: Menlo, monospace;
font-size: 13px !important; font-size: 13px !important;
line-height: 1.3em; line-height: 1.3em;
} }
.debug-message-object-key { .red-ui-debug-msg-object-key {
color: #792e90; color: #792e90;
} }
.debug-message-object-value { .red-ui-debug-msg-object-value {
} }
.debug-message-object-handle { .red-ui-debug-msg-object-handle {
color: #666; color: #666;
font-size: 1em; font-size: 1em;
width: 1em; width: 1em;
@ -182,63 +183,63 @@
transition: transform 0.1s ease-in-out; transition: transform 0.1s ease-in-out;
transform: rotate(90deg); 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; 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; 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); 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); 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; display:none;
} }
.debug-message-element.collapsed .debug-message-object-entry { .red-ui-debug-msg-element.collapsed .red-ui-debug-msg-object-entry {
display:none; 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; display:none;
} }
.debug-message-element.collapsed .debug-message-buffer-opts { .red-ui-debug-msg-element.collapsed .red-ui-debug-msg-buffer-opts {
display: none; 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; display:none;
} }
.debug-message-object-entry pre { .red-ui-debug-msg-object-entry pre {
font-family: Menlo, monospace; font-family: Menlo, monospace;
font-size: 13px; font-size: 13px;
line-height: 1.2em; line-height: 1.2em;
margin: 0 0 0 -1em; margin: 0 0 0 -1em;
} }
.debug-message-type-other { color: #2033d6; } .red-ui-debug-msg-type-other { color: #2033d6; }
.debug-message-type-string { color: #b72828; } .red-ui-debug-msg-type-string { color: #b72828; }
.debug-message-type-null { color: #666; font-style: italic;} .red-ui-debug-msg-type-null { color: #666; font-style: italic;}
.debug-message-type-meta { color: #666; font-style: italic;} .red-ui-debug-msg-type-meta { color: #666; font-style: italic;}
.debug-message-type-number { color: #2033d6; }; .red-ui-debug-msg-type-number { color: #2033d6; };
.debug-message-type-number-toggle { cursor: pointer;} .red-ui-debug-msg-type-number-toggle { cursor: pointer;}
.debug-message-row { .red-ui-debug-msg-row {
display: block; display: block;
padding: 4px 2px 2px; padding: 4px 2px 2px;
position: relative; position: relative;
&.debug-message-row-pinned { &.red-ui-debug-msg-row-pinned {
background: #f6f6f6; background: #f6f6f6;
} }
} }
.debug-message-expandable { .red-ui-debug-msg-expandable {
cursor: pointer; 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; color: #b72828 !important;
} }
.debug-message-buffer-opts a { .red-ui-debug-msg-buffer-opts a {
font-size: 9px; font-size: 9px;
color: #bbb; color: #bbb;
border: 1px solid #bbb; border: 1px solid #bbb;
@ -246,19 +247,19 @@
padding: 2px 5px; padding: 2px 5px;
margin-left: 5px; margin-left: 5px;
} }
.debug-message-buffer-opts a:hover { .red-ui-debug-msg-buffer-opts a:hover {
text-decoration: none; text-decoration: none;
color: #999; color: #999;
border: 1px solid #999; border: 1px solid #999;
background: #f3f3f3; background: #f3f3f3;
} }
.debug-message-buffer-raw > .debug-message-string-rows { .red-ui-debug-msg-buffer-raw > .red-ui-debug-msg-string-rows {
display: none; display: none;
} }
.debug-message-buffer-string > .debug-message-array-rows { .red-ui-debug-msg-buffer-string > .red-ui-debug-msg-array-rows {
display: none; display: none;
} }
.debug-message-type-string-swatch { .red-ui-debug-msg-type-string-swatch {
display: inline-block; display: inline-block;
width: 1.1em; width: 1.1em;
height: 0.9em; height: 0.9em;

View File

@ -202,10 +202,6 @@
display: none; 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 **/ /** Fix for unreachable dropdown menu **/
.dropdown-menu { .dropdown-menu {
border-radius: 0; border-radius: 0;

View File

@ -14,114 +14,104 @@
* limitations under the License. * limitations under the License.
**/ **/
#keyboard-help-dialog {
font-size: 0.9em;
padding-top: 10px;
} #red-ui-settings-tab-keyboard {
.red-ui-editableList-container {
#user-settings-tab-keyboard .red-ui-editableList-container { border-radius: 0;
border-radius: 0; border: none;
border: none;
padding: 0;
}
.keyboard-shortcut-entry.keyboard-shortcut-list-header {
padding:0 5px 0 5px;
div {
color: #666 !important;
}
.red-ui-searchBox-container {
width: calc(100% - 20px);
}
.keyboard-shortcut-entry-scope {
text-align: center;
}
}
.keyboard-shortcut-list-header {
border-bottom: 1px solid $primary-border-color;
}
.keyboard-shortcut-list {
position: absolute;
top:30px;
left:10px;
right:10px;
bottom:10px;
li {
padding: 0; padding: 0;
.red-ui-editableList-item-content { }
padding: 8px; .keyboard-shortcut-list-header {
cursor: pointer; padding:0 5px 0 5px;
border-bottom: 1px solid $primary-border-color;
div {
color: #666 !important;
}
.red-ui-searchBox-container {
width: calc(100% - 20px);
}
.keyboard-shortcut-entry-scope {
text-align: center;
}
}
.keyboard-shortcut-list {
position: absolute;
top:30px;
left:10px;
right:10px;
bottom:10px;
li {
padding: 0;
.red-ui-editableList-item-content {
padding: 8px;
cursor: pointer;
}
}
li:hover {
background: #f6f6f6;
} }
} }
li:hover { .keyboard-shortcut-entry {
background: #f6f6f6; div {
} display: inline-block;
} }
.keyboard-shortcut-entry { // white-space: nowrap;
div {
display: inline-block;
}
// white-space: nowrap;
select { select {
margin: 0; margin: 0;
width: calc(100% - 30px); width: calc(100% - 30px);
font-size: 0.9em; font-size: 0.9em;
margin-right: 5px; margin-right: 5px;
}
} }
}
.keyboard-shortcut-entry-key {
width:160px;
vertical-align: middle;
input {
margin:0;
width: calc(100% - 5px);
}
}
.keyboard-shortcut-entry-text {
vertical-align: middle;
width: calc(100% - 160px - 100px - 10px);
overflow: hidden;
i {
color: #ccc;
margin-right: 5px;
}
}
.keyboard-shortcut-entry-scope {
width:100px;
color: #999;
vertical-align: middle;
text-align: right;
}
.keyboard-shortcut-entry:not(.keyboard-shortcut-list-header) {
.keyboard-shortcut-entry-scope {
font-size: 0.8em;
}
}
.keyboard-shortcut-entry-unassigned {
color: #999;
.keyboard-shortcut-entry-key { .keyboard-shortcut-entry-key {
font-style: italic; width:160px;
} vertical-align: middle;
} input {
.keyboard-shortcut-entry-expanded { margin:0;
.keyboard-shortcut-entry-key { width: calc(100% - 5px);
width: 150px; }
} }
.keyboard-shortcut-entry-text { .keyboard-shortcut-entry-text {
vertical-align: middle;
width: calc(100% - 160px - 100px - 10px);
overflow: hidden;
i {
color: #ccc;
margin-right: 5px;
}
} }
.keyboard-shortcut-entry-scope { .keyboard-shortcut-entry-scope {
width: 110px; width:100px;
color: #999;
vertical-align: middle;
text-align: right;
} }
span { .keyboard-shortcut-entry:not(.keyboard-shortcut-list-header) {
display: none; .keyboard-shortcut-entry-scope {
font-size: 0.8em;
}
}
.keyboard-shortcut-entry-unassigned {
color: #999;
.keyboard-shortcut-entry-key {
font-style: italic;
}
}
.keyboard-shortcut-entry-expanded {
.keyboard-shortcut-entry-key {
width: 150px;
}
.keyboard-shortcut-entry-text {
}
.keyboard-shortcut-entry-scope {
width: 110px;
}
span {
display: none;
}
} }
}
.keyboard-shortcut-edit {
} }
.help-key { .help-key {
border: 1px solid #ddd; border: 1px solid #ddd;

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
.clipboard-import-error { .red-ui-clipboard-import-error {
pre { pre {
margin: 10px 0; margin: 10px 0;
border: none; border: none;
@ -30,7 +30,7 @@
} }
} }
} }
.clipboard-dialog-tab-clipboard { .red-ui-clipboard-dialog-tab-clipboard {
padding: 10px; padding: 10px;
textarea { textarea {
resize: none; resize: none;
@ -46,7 +46,7 @@
} }
} }
.clipboard-dialog-tabs-content { .red-ui-clipboard-dialog-tabs-content {
position: absolute; position: absolute;
top: 0; top: 0;
left: 120px; left: 120px;
@ -59,13 +59,13 @@
} }
} }
.clipboard-dialog-tab-library { .red-ui-clipboard-dialog-tab-library {
.form-row { .form-row {
margin-left: 10px; margin-left: 10px;
} }
} }
#clipboard-dialog { #red-ui-clipboard-dialog {
form { form {
margin-bottom: 0; margin-bottom: 0;
} }
@ -73,19 +73,19 @@
margin-bottom: 0; margin-bottom: 0;
} }
} }
#clipboard-dialog-tab-library-name { #red-ui-clipboard-dialog-tab-library-name {
width: calc(100% - 120px); width: calc(100% - 120px);
} }
#clipboard-dialog-export-tab-library-browser { #red-ui-clipboard-dialog-export-tab-library-browser {
height: calc(100% - 40px); height: calc(100% - 40px);
margin-bottom: 10px; margin-bottom: 10px;
border-bottom: 1px solid $primary-border-color; border-bottom: 1px solid $primary-border-color;
box-sizing: border-box; box-sizing: border-box;
} }
#clipboard-dialog-import-tab-library { #red-ui-clipboard-dialog-import-tab-library {
height: 100%; height: 100%;
} }
#clipboard-dialog-import-tab-library-browser { #red-ui-clipboard-dialog-import-tab-library-browser {
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
@ -118,27 +118,27 @@
} }
} }
#node-dialog-library-save-browser { #red-ui-library-dialog-save-browser {
height: calc(100% - 60px); height: calc(100% - 60px);
border: 1px solid $primary-border-color; border: 1px solid $primary-border-color;
margin-bottom: 10px; margin-bottom: 10px;
} }
#node-dialog-library-load-browser { #red-ui-library-dialog-load-browser {
// border: 1px solid $primary-border-color; // border: 1px solid $primary-border-color;
} }
#node-dialog-library-load-panes { #red-ui-library-dialog-load-panes {
border: 1px solid $primary-border-color; border: 1px solid $primary-border-color;
} }
#node-dialog-library-load-preview { #red-ui-library-dialog-load-preview {
height: 100%; height: 100%;
} }
#node-dialog-library-load-preview-text { #red-ui-library-dialog-load-preview-text {
box-sizing: border-box; box-sizing: border-box;
} }
#node-dialog-library-load-preview-details { #red-ui-library-dialog-load-preview-details {
box-sizing: border-box; box-sizing: border-box;
.node-info-node-row:first-child { .node-info-node-row:first-child {
border-top: none; border-top: none;

View File

@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
**/ **/
#user-settings-tab-palette { #red-ui-settings-tab-palette {
height: 100%; height: 100%;
} }
#palette-editor { #red-ui-palette-editor {
text-align: left; text-align: left;
position: absolute; position: absolute;
top: 0px; top: 0px;
@ -42,17 +42,17 @@
.disabled { .disabled {
background: #f3f3f3; background: #f3f3f3;
.palette-module-name { .red-ui-palette-module-name {
font-style: italic; font-style: italic;
color: #aaa; color: #aaa;
} }
.palette-module-version { .red-ui-palette-module-version {
color: #aaa; color: #aaa;
} }
.palette-module-errors .fa-warning { .red-ui-palette-module-errors .fa-warning {
opacity: 0.5; opacity: 0.5;
} }
ul.palette-module-error-list li { ul.red-ui-palette-module-error-list li {
color: #aaa; color: #aaa;
} }
@ -67,65 +67,65 @@
} }
} }
.palette-editor-tab { .red-ui-palette-editor-tab {
position:absolute; position:absolute;
top:35px; top:35px;
left:0; left:0;
right:0; right:0;
bottom:0 bottom:0
} }
.palette-editor-toolbar { .red-ui-palette-editor-toolbar {
background: #f3f3f3; background: #f3f3f3;
box-sizing: border-box; box-sizing: border-box;
padding: 8px 10px; padding: 8px 10px;
border-bottom: 1px solid $primary-border-color; border-bottom: 1px solid $primary-border-color;
text-align: right; text-align: right;
} }
.palette-module-shade-status { .red-ui-palette-module-shade-status {
color: #666; color: #666;
} }
.palette-module-updated { .red-ui-palette-module-updated {
margin-left: 10px; margin-left: 10px;
} }
.palette-module-link { .red-ui-palette-module-link {
margin-left: 5px; margin-left: 5px;
} }
.palette-module-description { .red-ui-palette-module-description {
margin-left: 20px; margin-left: 20px;
font-size: 0.9em; font-size: 0.9em;
color: #999; 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; border-radius: 4px;
background: #eee; background: #eee;
padding: 2px 8px; padding: 2px 8px;
font-size: 12px; font-size: 12px;
} }
.palette-module-content { .red-ui-palette-module-content {
display: none; display: none;
padding: 10px 3px; padding: 10px 3px;
} }
i.fa.palette-module-node-chevron { i.fa.red-ui-palette-module-node-chevron {
width: 8px; width: 8px;
margin-right: 0; margin-right: 0;
transform: rotate(0deg); transform: rotate(0deg);
transition: transform 0.2s ease-in-out; transition: transform 0.2s ease-in-out;
} }
.expanded { .expanded {
i.fa.palette-module-node-chevron { i.fa.red-ui-palette-module-node-chevron {
transform: rotate(90deg); transform: rotate(90deg);
} }
.palette-module-set-button { .red-ui-palette-module-set-button {
background:#f3f3f3 !important; background:#f3f3f3 !important;
} }
} }
.palette-module-set { .red-ui-palette-module-set {
border:1px solid $secondary-border-color; border:1px solid $secondary-border-color;
border-radius: 0; border-radius: 0;
padding: 5px; padding: 5px;
@ -143,13 +143,13 @@
} }
} }
.palette-module-type { .red-ui-palette-module-type {
color: #666; color: #666;
padding-left: 5px; padding-left: 5px;
font-size: 0.9em; font-size: 0.9em;
@include enable-selection; @include enable-selection;
} }
.palette-module-type-swatch { .red-ui-palette-module-type-swatch {
display: inline-block; display: inline-block;
width: 12px; width: 12px;
height: 12px; height: 12px;
@ -159,19 +159,19 @@
background: #fff; background: #fff;
border: 1px solid #fff; border: 1px solid #fff;
} }
.palette-module-set-button-group { .red-ui-palette-module-set-button-group {
position: absolute; position: absolute;
right: 4px; right: 4px;
top: 4px; top: 4px;
} }
.palette-module-set-disabled { .red-ui-palette-module-set-disabled {
background: #eee; background: #eee;
.palette-module-type { .red-ui-palette-module-type {
color: #999; color: #999;
} }
} }
.palette-module-more { .red-ui-palette-module-more {
padding: 0 !important; padding: 0 !important;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
@ -190,7 +190,7 @@
} }
} }
.palette-module-meta { .red-ui-palette-module-meta {
color: #666; color: #666;
position: relative; position: relative;
&.disabled { &.disabled {
@ -203,23 +203,23 @@
margin-right: 5px; margin-right: 5px;
} }
} }
.palette-module-name { .red-ui-palette-module-name {
white-space: nowrap; white-space: nowrap;
@include enable-selection; @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-style:italic;
font-size: 0.8em; font-size: 0.8em;
@include enable-selection; @include enable-selection;
} }
.palette-module-section { .red-ui-palette-module-section {
padding:0 !important; padding:0 !important;
background: #f9f9f9 !important; background: #f9f9f9 !important;
font-size: 0.9em; font-size: 0.9em;
color: #666; color: #666;
} }
.palette-module-button-group { .red-ui-palette-module-button-group {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0; bottom: 0;
@ -227,10 +227,10 @@
margin-left: 5px; margin-left: 5px;
} }
} }
.palette-module-meta .fa-warning { .red-ui-palette-module-meta .fa-warning {
color: #AD1625; color: #AD1625;
} }
ul.palette-module-error-list { ul.red-ui-palette-module-error-list {
display: inline-block; display: inline-block;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
@ -241,11 +241,11 @@ ul.palette-module-error-list {
} }
} }
.palette-module-shade { .red-ui-palette-module-shade {
@include shade; @include shade;
text-align: center; text-align: center;
padding-top: 20px; padding-top: 20px;
} }
#palette-module-install-shade { #red-ui-palette-module-install-shade {
padding-top: 80px; padding-top: 80px;
} }

View File

@ -284,7 +284,7 @@
overflow: hidden; overflow: hidden;
.red-ui-palette-category { .red-ui-palette-category {
&:not(.palette-category-expanded) button { &:not(.expanded) button {
display: none; display: none;
} }
} }
@ -300,23 +300,23 @@
.red-ui-editableList-item-content { .red-ui-editableList-item-content {
padding: 0px 6px; padding: 0px 6px;
} }
.palette-module-header { .red-ui-palette-module-header {
padding: 6px 4px; padding: 6px 4px;
} }
.palette-module-button { .red-ui-palette-module-button {
float: right; float: right;
} }
.palette-module-unused { .red-ui-palette-module-unused {
& > * { & > * {
color: #bbb; color: #bbb;
} }
// border: 1px dashed #bbb; // border: 1px dashed #bbb;
} }
.palette-module-unknown { .red-ui-palette-module-unknown {
border: 1px dashed #aaa; border: 1px dashed #aaa;
background: #fafafa; background: #fafafa;
} }
.palette-module-not-installed { .red-ui-palette-module-not-installed {
border: 1px dashed #b07575; border: 1px dashed #b07575;
background: #fee; background: #fee;
i.fa-warning { i.fa-warning {

View File

@ -23,7 +23,7 @@
overflow-y: scroll; overflow-y: scroll;
.red-ui-palette-category { .red-ui-palette-category {
&:not(.palette-category-expanded) button { &:not(.expanded) button {
display: none; display: none;
} }
} }
@ -31,12 +31,12 @@
.red-ui-sidebar-context-property { .red-ui-sidebar-context-property {
position: relative; position: relative;
.debug-message-tools { .red-ui-debug-msg-tools {
right: 0px; right: 0px;
margin-right: 5px; margin-right: 5px;
display: none; display: none;
} }
&:hover .debug-message-tools { &:hover .red-ui-debug-msg-tools {
display: inline-block; display: inline-block;
} }
} }

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
**/ **/
#user-settings-tabs-container { .red-ui-settings-tabs-container {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -22,7 +22,7 @@
width: 120px; width: 120px;
background: #f3f3f3; background: #f3f3f3;
} }
#user-settings-tabs-content { .red-ui-settings-tabs-content {
position: absolute; position: absolute;
top: 0; top: 0;
left: 120px; left: 120px;
@ -60,7 +60,7 @@
} }
} }
#user-settings-tab-view { #red-ui-settings-tab-view {
position: absolute; position: absolute;
top:0; top:0;
right: 0; right: 0;
@ -69,10 +69,10 @@
padding: 8px 20px 20px; padding: 8px 20px 20px;
overflow-y: scroll; overflow-y: scroll;
} }
.user-settings-row { .red-ui-settings-row {
padding: 5px 10px 2px; padding: 5px 10px 2px;
} }
.user-settings-section { .red-ui-settings-section {
position: relative; position: relative;
&:after { &:after {
content: ""; content: "";

View File

@ -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> ' + '<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>'); '</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]; 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">'+ var filterDialog = $('<div class="red-ui-debug-filter-box hide">'+
'<div class="debug-filter-row">'+ '<div class="red-ui-debug-filter-row">'+
'<span class="button-group">'+ '<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 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>'+ '<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>'+
'</div>').appendTo(toolbar);//content); '</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); // $('<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 flowCheckboxes = {};
var debugNodeListHeader = $('<div><span data-i18n="node-red:debug.sidebar.debugNodes"></span><span></span></div>'); 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(); var headerCheckbox = $('<input type="checkbox">').appendTo(debugNodeListHeader.find("span")[1]).checkboxSet();
@ -118,7 +118,7 @@ RED.debug = (function() {
parent: flowCheckboxes[node.z] parent: flowCheckboxes[node.z]
}).on("change", function(e) { }).on("change", function(e) {
filteredNodes[node.id] = !$(this).prop('checked'); 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) { if (!node.active || RED.nodes.workspace(node.z).disabled) {
container.addClass('disabled'); container.addClass('disabled');
@ -282,11 +282,11 @@ RED.debug = (function() {
activeWorkspace = _activeWorkspace.replace(/\./g,"_"); activeWorkspace = _activeWorkspace.replace(/\./g,"_");
} }
if (filterType === "filterAll") { if (filterType === "filterAll") {
$(".debug-message").removeClass("hide"); $(".red-ui-debug-msg").removeClass("hide");
} else { } else {
$(".debug-message").each(function() { $(".red-ui-debug-msg").each(function() {
if (filterType === 'filterCurrent') { 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') { } else if (filterType === 'filterSelected') {
var id = $(this).data('source'); var id = $(this).data('source');
if (id) { if (id) {
@ -320,7 +320,7 @@ RED.debug = (function() {
var msg = m.el; var msg = m.el;
var sourceNode = m.source; var sourceNode = m.source;
if (sourceNode) { 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); wrapper.append(msg);
} }
}); });
@ -336,16 +336,16 @@ RED.debug = (function() {
function showMessageMenu(button,dbgMessage,sourceId) { function showMessageMenu(button,dbgMessage,sourceId) {
activeMenuMessage = dbgMessage; activeMenuMessage = dbgMessage;
if (!menuOptionMenu) { if (!menuOptionMenu) {
menuOptionMenu = RED.menu.init({id:"debug-message-option-menu", menuOptionMenu = RED.menu.init({id:"red-ui-debug-msg-option-menu",
options: [ 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(); 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(); activeMenuMessage.clearPinned();
}}, }},
null, 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'}); var candidateNodes = RED.nodes.filterNodes({type:'debug'});
candidateNodes.forEach(function(n) { candidateNodes.forEach(function(n) {
filteredNodes[n.id] = true; filteredNodes[n.id] = true;
@ -354,7 +354,7 @@ RED.debug = (function() {
$("#debug-tab-filterSelected").trigger("click"); $("#debug-tab-filterSelected").trigger("click");
refreshMessageList(); 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"); $("#debug-tab-filterAll").trigger("click");
refreshMessageList(); refreshMessageList();
}} }}
@ -373,8 +373,8 @@ RED.debug = (function() {
if (sourceNode && sourceNode.type !== 'debug') { if (sourceNode && sourceNode.type !== 'debug') {
filterOptionDisabled = true; filterOptionDisabled = true;
} }
RED.menu.setDisabled('debug-message-menu-item-filter',filterOptionDisabled); RED.menu.setDisabled('red-ui-debug-msg-menu-item-filter',filterOptionDisabled);
RED.menu.setDisabled('debug-message-menu-item-clear-filter',filterOptionDisabled); RED.menu.setDisabled('red-ui-debug-msg-menu-item-clear-filter',filterOptionDisabled);
var elementPos = button.offset(); var elementPos = button.offset();
menuOptionMenu.css({ menuOptionMenu.css({
@ -404,7 +404,7 @@ RED.debug = (function() {
var sourceNode = o._source; var sourceNode = o._source;
msg.onmouseenter = function() { msg.onmouseenter = function() {
$(msg).addClass('debug-message-hover'); $(msg).addClass('red-ui-debug-msg-hover');
if (o._source) { if (o._source) {
config.messageMouseEnter(o._source.id); config.messageMouseEnter(o._source.id);
if (o._source._alias) { if (o._source._alias) {
@ -414,7 +414,7 @@ RED.debug = (function() {
}; };
msg.onmouseleave = function() { msg.onmouseleave = function() {
$(msg).removeClass('debug-message-hover'); $(msg).removeClass('red-ui-debug-msg-hover');
if (o._source) { if (o._source) {
config.messageMouseLeave(o._source.id); config.messageMouseLeave(o._source.id);
if (o._source._alias) { if (o._source._alias) {
@ -427,10 +427,10 @@ RED.debug = (function() {
var property = sanitize(o.property?o.property:''); var property = sanitize(o.property?o.property:'');
var payload = o.msg; var payload = o.msg;
var format = sanitize((o.format||"").toString()); 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?( (sourceNode?(
" debug-message-node-"+sourceNode.id.replace(/\./g,"_")+ " red-ui-debug-msg-node-"+sourceNode.id.replace(/\./g,"_")+
(sourceNode.z?" debug-message-flow-"+sourceNode.z.replace(/\./g,"_"):"") (sourceNode.z?" red-ui-debug-msg-flow-"+sourceNode.z.replace(/\./g,"_"):"")
):""); ):"");
if (sourceNode) { if (sourceNode) {
@ -446,22 +446,22 @@ RED.debug = (function() {
} }
} }
var metaRow = $('<div class="debug-message-meta"></div>').appendTo(msg); var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg);
$('<span class="debug-message-date">'+ getTimestamp()+'</span>').appendTo(metaRow); $('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
if (sourceNode) { 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) .appendTo(metaRow)
.on("click", function(evt) { .on("click", function(evt) {
evt.preventDefault(); evt.preventDefault();
config.messageSourceClick(sourceNode.id); config.messageSourceClick(sourceNode.id);
}); });
} else if (name) { } 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); 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 path = o.property||'';
var debugMessage = RED.utils.createObjectElement(payload, { var debugMessage = RED.utils.createObjectElement(payload, {
key: /*true*/null, key: /*true*/null,
@ -481,17 +481,17 @@ RED.debug = (function() {
errorLvl = 30; errorLvl = 30;
errorLvlType = 'warn'; errorLvlType = 'warn';
} }
$(msg).addClass('debug-message-level-' + errorLvl); $(msg).addClass('red-ui-debug-msg-level-' + errorLvl);
$('<span class="debug-message-topic">function : (' + errorLvlType + ')</span>').appendTo(metaRow); $('<span class="red-ui-debug-msg-topic">function : (' + errorLvlType + ')</span>').appendTo(metaRow);
} else { } 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); var filterMessage = $('<button class="editor-button editor-button-small"><i class="fa fa-caret-down"></i></button>').appendTo(tools);
filterMessage.on("click", function(e) { filterMessage.on("click", function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id); showMessageMenu(filterMessage,debugMessage,sourceNode&&sourceNode.id);
}); });
$('<span class="debug-message-topic">'+ $('<span class="red-ui-debug-msg-topic">'+
(o.topic?topic+' : ':'')+ (o.topic?topic+' : ':'')+
(o.property?'msg.'+property:'msg')+" : "+format+ (o.property?'msg.'+property:'msg')+" : "+format+
'</span>').appendTo(metaRow); '</span>').appendTo(metaRow);
@ -510,9 +510,9 @@ RED.debug = (function() {
messageList.append(msg); messageList.append(msg);
} else { } else {
if (sourceNode) { 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 ) { 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.empty();
wrapper.append(msg); wrapper.append(msg);
@ -531,7 +531,7 @@ RED.debug = (function() {
} }
function clearMessageList(clearFilter) { function clearMessageList(clearFilter) {
$(".debug-message").remove(); $(".red-ui-debug-msg").remove();
config.clear(); config.clear();
if (!!clearFilter) { if (!!clearFilter) {
clearFilterSettings(); clearFilterSettings();

View File

@ -17,7 +17,7 @@ $(function() {
var uiComponents = RED.debug.init(options); var uiComponents = RED.debug.init(options);
$(".debug-window").append(uiComponents.content); $(".red-ui-debug-window").append(uiComponents.content);
window.addEventListener('message',function(evt) { window.addEventListener('message',function(evt) {
if (evt.data.event === "message") { if (evt.data.event === "message") {

View File

@ -1,11 +1,10 @@
<html> <html>
<head> <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="../../red/style.min.css">
<link rel="stylesheet" href="../../vendor/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" href="../../vendor/font-awesome/css/font-awesome.min.css">
<title>Node-RED Debug Tools</title> <title>Node-RED Debug Tools</title>
</head> </head>
<body class="debug-window"> <body class="red-ui-debug-window">
</body> </body>
<script src="../../vendor/vendor.js"></script> <script src="../../vendor/vendor.js"></script>
<script src="../../red/red.min.js"></script> <script src="../../red/red.min.js"></script>