mirror of https://github.com/node-red/node-red.git
Support for disabled categories in sidebar config
parent
71f8de94b0
commit
5d1fa49045
|
@ -52,6 +52,7 @@ RED.sidebar.config = (function() {
|
|||
if (label) {
|
||||
lockIcon = $('<span style="margin-right: 5px"><i class="fa fa-lock"/></span>').appendTo(header)
|
||||
lockIcon.toggle(!!isLocked)
|
||||
$('<span class="red-ui-sidebar-config-category-disabled-icon" style="margin-right: 5px"><i class="fa fa-ban"/></span>').appendTo(header)
|
||||
$('<span class="red-ui-palette-node-config-label"/>').text(label).appendTo(header);
|
||||
} else {
|
||||
$('<span class="red-ui-palette-node-config-label" data-i18n="sidebar.config.'+name+'">').appendTo(header);
|
||||
|
@ -251,6 +252,8 @@ RED.sidebar.config = (function() {
|
|||
if (!validList[id]) {
|
||||
$(this).remove();
|
||||
delete categories[id];
|
||||
} else if (RED.nodes.workspace(id)) {
|
||||
$(this).toggleClass("red-ui-sidebar-config-category-disabled", RED.nodes.workspace(id).disabled);
|
||||
}
|
||||
})
|
||||
var globalConfigNodes = [];
|
||||
|
|
|
@ -14,6 +14,25 @@
|
|||
* limitations under the License.
|
||||
**/
|
||||
|
||||
.red-ui-sidebar-config-category-disabled-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.red-ui-sidebar-config-category-disabled {
|
||||
.red-ui-sidebar-config-tray-header {
|
||||
font-style: italic;
|
||||
color: var(--red-ui-tab-text-color-disabled-inactive) !important;
|
||||
.red-ui-sidebar-config-category-disabled-icon {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
.red-ui-sidebar-node-config-list {
|
||||
.red-ui-palette-node-config {
|
||||
@extend .red-ui-palette-node-config-disabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.red-ui-sidebar-node-config {
|
||||
position: relative;
|
||||
background: var(--red-ui-secondary-background);
|
||||
|
|
Loading…
Reference in New Issue