diff --git a/editor/js/ui/tab-config.js b/editor/js/ui/tab-config.js
index cac9cd614..279b5b491 100644
--- a/editor/js/ui/tab-config.js
+++ b/editor/js/ui/tab-config.js
@@ -45,14 +45,16 @@ RED.sidebar.config = (function() {
var container = $('
').appendTo(parent);
var header = $('').appendTo(container);
if (label) {
- $('').text(label).appendTo(header);
+ $('').text(label).appendTo(header);
} else {
- $('').appendTo(header);
+ $('').appendTo(header);
}
+ $('').appendTo(header);
category = $('').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
@@ -90,6 +92,11 @@ 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].label = label;
+ }
}
return categories[name];
}
@@ -104,9 +111,18 @@ RED.sidebar.config = (function() {
return 0;
});
if (showUnusedOnly) {
+ var hiddenCount = nodes.length;
nodes = nodes.filter(function(n) {
return n.users.length === 0;
})
+ hiddenCount = hiddenCount - nodes.length;
+ if (hiddenCount > 0) {
+ list.parent().find('.config-node-filter-info').text(RED._('sidebar.config.filtered',{count:hiddenCount})).show();
+ } else {
+ list.parent().find('.config-node-filter-info').hide();
+ }
+ } else {
+ list.parent().find('.config-node-filter-info').hide();
}
list.empty();
if (nodes.length === 0) {
diff --git a/editor/js/ui/workspaces.js b/editor/js/ui/workspaces.js
index e4af50d0c..acb9d17ce 100644
--- a/editor/js/ui/workspaces.js
+++ b/editor/js/ui/workspaces.js
@@ -140,8 +140,8 @@ RED.workspaces = (function() {
if (workspace.label != label) {
workspace_tabs.renameTab(workspace.id,label);
RED.nodes.dirty(true);
+ RED.sidebar.config.refresh();
$("#menu-item-workspace-menu-"+workspace.id.replace(".","-")).text(label);
- // TODO: update entry in menu
}
$( this ).dialog( "close" );
}
diff --git a/editor/sass/palette.scss b/editor/sass/palette.scss
index 4f7939a02..07958edf3 100644
--- a/editor/sass/palette.scss
+++ b/editor/sass/palette.scss
@@ -114,11 +114,16 @@
}
.palette-header {
+ position: relative;
background: $palette-header-background;
cursor: pointer;
text-align: left;
padding: 9px;
font-weight: bold;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+
}
.palette-header i {
margin: 3px 10px 3px 3px;
diff --git a/editor/sass/tab-config.scss b/editor/sass/tab-config.scss
index 824e41ec1..91edaf760 100644
--- a/editor/sass/tab-config.scss
+++ b/editor/sass/tab-config.scss
@@ -67,3 +67,15 @@
border-style: dashed;
color: #aaa;
}
+.config-node-filter-info {
+ position: absolute;
+ top: 0;
+ right:0;
+ height: 38px;
+ line-height: 38px;
+ padding: 0 8px;
+ background: $palette-header-background;
+ font-size: 0.8em;
+ color: #999;
+ font-weight: normal;
+}
diff --git a/red/api/locales/en-US/editor.json b/red/api/locales/en-US/editor.json
index 0321378c1..beb30e668 100644
--- a/red/api/locales/en-US/editor.json
+++ b/red/api/locales/en-US/editor.json
@@ -207,7 +207,8 @@
"subflows": "subflows",
"flows": "flows",
"filterUnused":"unused",
- "filterAll":"all"
+ "filterAll":"all",
+ "filtered": "__count__ hidden"
}
},
"typedInput": {