1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Fixed sidebar id issue

This commit is contained in:
Allen Boone 2015-06-08 15:35:23 -04:00 committed by Nick O'Leary
parent a6974371b0
commit 5fbaca75b4

View File

@ -30,7 +30,8 @@ RED.sidebar = (function() {
function addTab(title,content,closeable) { function addTab(title,content,closeable) {
$("#sidebar-content").append(content); $("#sidebar-content").append(content);
$(content).hide(); $(content).hide();
sidebar_tabs.addTab({id:"tab-"+title,label:title,closeable:closeable}); var id = content.id || "tab-"+title.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, "\\$1" );
sidebar_tabs.addTab({id:id,label:title,closeable:closeable});
//content.style.position = "absolute"; //content.style.position = "absolute";
//$('#sidebar').tabs("refresh"); //$('#sidebar').tabs("refresh");
} }