mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add add-tab button to tab bar
This commit is contained in:
parent
a8f5d6b9ee
commit
12d8d45f83
@ -122,6 +122,7 @@
|
|||||||
|
|
||||||
<div id="workspace">
|
<div id="workspace">
|
||||||
<ul id="workspace-tabs"></ul>
|
<ul id="workspace-tabs"></ul>
|
||||||
|
<div id="workspace-add-tab"><a id="btn-workspace-add-tab" href="#"><i class="icon-plus"></i></a></div>
|
||||||
<div id="chart"></div>
|
<div id="chart"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -89,7 +89,8 @@ RED.view = function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var workspaceIndex = 0;
|
var workspaceIndex = 0;
|
||||||
$('#btn-workspace-add').on("click",function() {
|
|
||||||
|
function addWorkspace() {
|
||||||
var tabId = RED.nodes.id();
|
var tabId = RED.nodes.id();
|
||||||
do {
|
do {
|
||||||
workspaceIndex += 1;
|
workspaceIndex += 1;
|
||||||
@ -102,7 +103,9 @@ RED.view = function() {
|
|||||||
|
|
||||||
RED.history.push({t:'add',workspaces:[ws],dirty:dirty});
|
RED.history.push({t:'add',workspaces:[ws],dirty:dirty});
|
||||||
RED.view.dirty(true);
|
RED.view.dirty(true);
|
||||||
});
|
}
|
||||||
|
$('#btn-workspace-add-tab').on("click",addWorkspace);
|
||||||
|
$('#btn-workspace-add').on("click",addWorkspace);
|
||||||
$('#btn-workspace-edit').on("click",function() {
|
$('#btn-workspace-edit').on("click",function() {
|
||||||
showRenameWorkspaceDialog(activeWorkspace);
|
showRenameWorkspaceDialog(activeWorkspace);
|
||||||
});
|
});
|
||||||
|
@ -569,6 +569,28 @@ div.node-info {
|
|||||||
border-radius:5px;
|
border-radius:5px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
#workspace-tabs {
|
||||||
|
margin-right: 28px;
|
||||||
|
}
|
||||||
|
#workspace-add-tab {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 29px;
|
||||||
|
width: 28px;
|
||||||
|
border-bottom: 1px solid #999;
|
||||||
|
}
|
||||||
|
#btn-workspace-add-tab {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
background: #e3e3e3;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 28px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#btn-workspace-add-tab:hover {
|
||||||
|
background: #efefef;
|
||||||
|
}
|
||||||
|
|
||||||
ul.red-ui-tabs {
|
ul.red-ui-tabs {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
Loading…
Reference in New Issue
Block a user