mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure sidebar panes are hidden, not removed on change
This commit is contained in:
parent
6359b90352
commit
8782bc5896
@ -26,7 +26,7 @@ RED.sidebar = (function() {
|
|||||||
$(tab.content).show();
|
$(tab.content).show();
|
||||||
},
|
},
|
||||||
onremove: function(tab) {
|
onremove: function(tab) {
|
||||||
$(tab.content).remove();
|
$(tab.content).hide();
|
||||||
if (tab.onremove) {
|
if (tab.onremove) {
|
||||||
tab.onremove.call(tab);
|
tab.onremove.call(tab);
|
||||||
}
|
}
|
||||||
@ -76,9 +76,9 @@ RED.sidebar = (function() {
|
|||||||
|
|
||||||
function removeTab(id) {
|
function removeTab(id) {
|
||||||
sidebar_tabs.removeTab(id);
|
sidebar_tabs.removeTab(id);
|
||||||
|
$(knownTabs[id].content).remove();
|
||||||
delete knownTabs[id];
|
delete knownTabs[id];
|
||||||
RED.menu.removeItem("menu-item-sidebar-menu-"+id);
|
RED.menu.removeItem("menu-item-sidebar-menu-"+id);
|
||||||
//TODO: remove menu item
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var sidebarSeparator = {};
|
var sidebarSeparator = {};
|
||||||
|
@ -145,7 +145,7 @@ RED.sidebar.info = (function() {
|
|||||||
//table += '<div class="node-help">'+(typeof info === "function" ? info.call(node) : info)+'</div>';
|
//table += '<div class="node-help">'+(typeof info === "function" ? info.call(node) : info)+'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#tab-info").html(table);
|
$(content).html(table);
|
||||||
|
|
||||||
$(".node-info-property-header").click(function(e) {
|
$(".node-info-property-header").click(function(e) {
|
||||||
var icon = $(this).find("i");
|
var icon = $(this).find("i");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user