mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Ensure sidebar panes are hidden, not removed on change
This commit is contained in:
		@@ -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");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user