Namespace context/config sidebar css

This commit is contained in:
Nick O'Leary
2019-04-30 23:28:35 +01:00
parent 9dac679b72
commit 5866dad79a
4 changed files with 31 additions and 31 deletions

View File

@@ -47,19 +47,19 @@ RED.sidebar.config = (function() {
var container = $('<div class="red-ui-palette-category workspace-config-node-category" id="workspace-config-node-category-'+name+'"></div>').appendTo(parent);
var header = $('<div class="workspace-config-node-tray-header red-ui-palette-header"><i class="fa fa-angle-down expanded"></i></div>').appendTo(container);
if (label) {
$('<span class="config-node-label"/>').text(label).appendTo(header);
$('<span class="red-ui-palette-node-config-label"/>').text(label).appendTo(header);
} else {
$('<span class="config-node-label" data-i18n="sidebar.config.'+name+'">').appendTo(header);
$('<span class="red-ui-palette-node-config-label" data-i18n="sidebar.config.'+name+'">').appendTo(header);
}
$('<span class="config-node-filter-info"></span>').appendTo(header);
category = $('<ul class="red-ui-palette-content config-node-list"></ul>').appendTo(container);
$('<span class="red-ui-sidebar-node-config-filter-info"></span>').appendTo(header);
category = $('<ul class="red-ui-palette-content red-ui-sidebar-node-config-list"></ul>').appendTo(container);
container.i18n();
var icon = header.find("i");
var result = {
label: label,
list: category,
size: function() {
return result.list.find("li:not(.config_node_none)").length
return result.list.find("li:not(.red-ui-palette-node-config-none)").length
},
open: function(snap) {
if (!icon.hasClass("expanded")) {
@@ -96,7 +96,7 @@ RED.sidebar.config = (function() {
categories[name] = result;
} else {
if (categories[name].label !== label) {
categories[name].list.parent().find('.config-node-label').text(label);
categories[name].list.parent().find('.red-ui-palette-node-config-label').text(label);
categories[name].label = label;
}
}
@@ -119,27 +119,27 @@ RED.sidebar.config = (function() {
})
hiddenCount = hiddenCount - nodes.length;
if (hiddenCount > 0) {
list.parent().find('.config-node-filter-info').text(RED._('sidebar.config.filtered',{count:hiddenCount})).show();
list.parent().find('.red-ui-sidebar-node-config-filter-info').text(RED._('sidebar.config.filtered',{count:hiddenCount})).show();
} else {
list.parent().find('.config-node-filter-info').hide();
list.parent().find('.red-ui-sidebar-node-config-filter-info').hide();
}
} else {
list.parent().find('.config-node-filter-info').hide();
list.parent().find('.red-ui-sidebar-node-config-filter-info').hide();
}
list.empty();
if (nodes.length === 0) {
$('<li class="config_node_none" data-i18n="sidebar.config.none">NONE</li>').i18n().appendTo(list);
$('<li class="red-ui-palette-node-config-none" data-i18n="sidebar.config.none">NONE</li>').i18n().appendTo(list);
category.close(true);
} else {
var currentType = "";
nodes.forEach(function(node) {
var label = RED.utils.getNodeLabel(node,node.id);
if (node.type != currentType) {
$('<li class="config_node_type">'+node.type+'</li>').appendTo(list);
$('<li class="red-ui-palette-node-config-type">'+node.type+'</li>').appendTo(list);
currentType = node.type;
}
var entry = $('<li class="red-ui-palette-node config_node red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
var entry = $('<li class="red-ui-palette-node red-ui-palette-node-config red-ui-palette-node_id_'+node.id.replace(/\./g,"-")+'"></li>').appendTo(list);
entry.data('node',node.id);
$('<div class="red-ui-palette-label"></div>').text(label).appendTo(entry);
if (node._def.hasUsers !== false) {
@@ -155,7 +155,7 @@ RED.sidebar.config = (function() {
}
RED.popover.tooltip(iconContainer,RED._('editor.nodesUse',{count:node.users.length}));
if (node.users.length === 0) {
entry.addClass("config_node_unused");
entry.addClass("red-ui-palette-node-config-unused");
}
}
entry.on('click',function(e) {

View File

@@ -32,13 +32,13 @@ RED.sidebar.context = (function() {
function init() {
content = $("<div>").css({"position":"relative","height":"100%"});
content.className = "sidebar-context"
content.className = "red-ui-sidebar-context"
var footerToolbar = $('<div></div>');
var stackContainer = $("<div>",{class:"sidebar-context-stack"}).appendTo(content);
var stackContainer = $("<div>",{class:"red-ui-sidebar-context-stack"}).appendTo(content);
sections = RED.stack.create({
container: stackContainer
});
@@ -52,7 +52,7 @@ RED.sidebar.context = (function() {
});
nodeSection.expand();
nodeSection.content.css({height:"100%"});
nodeSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(nodeSection.content);
nodeSection.timestamp = $('<div class="red-ui-sidebar-context-updated">&nbsp;</div>').appendTo(nodeSection.content);
var table = $('<table class="node-info"></table>').appendTo(nodeSection.content);
nodeSection.table = $('<tbody>').appendTo(table);
var bg = $('<div style="float: right"></div>').appendTo(nodeSection.header);
@@ -86,7 +86,7 @@ RED.sidebar.context = (function() {
});
flowSection.expand();
flowSection.content.css({height:"100%"});
flowSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(flowSection.content);
flowSection.timestamp = $('<div class="red-ui-sidebar-context-updated">&nbsp;</div>').appendTo(flowSection.content);
var table = $('<table class="node-info"></table>').appendTo(flowSection.content);
flowSection.table = $('<tbody>').appendTo(table);
bg = $('<div style="float: right"></div>').appendTo(flowSection.header);
@@ -104,7 +104,7 @@ RED.sidebar.context = (function() {
});
globalSection.expand();
globalSection.content.css({height:"100%"});
globalSection.timestamp = $('<div class="sidebar-context-updated">&nbsp;</div>').appendTo(globalSection.content);
globalSection.timestamp = $('<div class="red-ui-sidebar-context-updated">&nbsp;</div>').appendTo(globalSection.content);
var table = $('<table class="node-info"></table>').appendTo(globalSection.content);
globalSection.table = $('<tbody>').appendTo(table);
@@ -230,7 +230,7 @@ RED.sidebar.context = (function() {
sortedData[keys[i]].forEach(function(v) {
var k = keys[i];
var l2 = sortedData[k].length;
var propRow = $('<tr class="node-info-node-row"><td class="sidebar-context-property"></td><td></td></tr>').appendTo(container);
var propRow = $('<tr class="node-info-node-row"><td class="red-ui-sidebar-context-property"></td><td></td></tr>').appendTo(container);
var obj = $(propRow.children()[0]);
obj.text(k);
var tools = $('<span class="button-group"></span>');
@@ -312,7 +312,7 @@ RED.sidebar.context = (function() {
tools: tools
}).appendTo(propRow.children()[1]);
if (contextStores.length > 1) {
$("<span>",{class:"sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0]))
$("<span>",{class:"red-ui-sidebar-context-property-storename"}).text(v.store).appendTo($(propRow.children()[0]))
}
});
}