mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Ensure full deploy is visually selected by default
This commit is contained in:
parent
e206d2919e
commit
87f8fd34b8
@ -48,7 +48,7 @@ RED.deploy = (function() {
|
|||||||
'</span></li>').prependTo(".header-toolbar");
|
'</span></li>').prependTo(".header-toolbar");
|
||||||
RED.menu.init({id:"btn-deploy-options",
|
RED.menu.init({id:"btn-deploy-options",
|
||||||
options: [
|
options: [
|
||||||
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:"Full",sublabel:"Deploys everything in the workspace",onselect:function(s) { if(s){changeDeploymentType("full")}}},
|
{id:"deploymenu-item-full",toggle:"deploy-type",icon:"red/images/deploy-full.png",label:"Full",sublabel:"Deploys everything in the workspace",selected: true, onselect:function(s) { if(s){changeDeploymentType("full")}}},
|
||||||
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:"Modified Flows",sublabel:"Only deploys flows that contain changed nodes", onselect:function(s) {if(s){changeDeploymentType("flows")}}},
|
{id:"deploymenu-item-flow",toggle:"deploy-type",icon:"red/images/deploy-flows.png",label:"Modified Flows",sublabel:"Only deploys flows that contain changed nodes", onselect:function(s) {if(s){changeDeploymentType("flows")}}},
|
||||||
{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:"Modified Nodes",sublabel:"Only deploys nodes that have changed",onselect:function(s) { if(s){changeDeploymentType("nodes")}}}
|
{id:"deploymenu-item-node",toggle:"deploy-type",icon:"red/images/deploy-nodes.png",label:"Modified Nodes",sublabel:"Only deploys nodes that have changed",onselect:function(s) { if(s){changeDeploymentType("nodes")}}}
|
||||||
]
|
]
|
||||||
|
@ -30,7 +30,7 @@ RED.menu = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setState() {
|
function setInitialState() {
|
||||||
var savedStateActive = isSavedStateActive(opt.id);
|
var savedStateActive = isSavedStateActive(opt.id);
|
||||||
if (savedStateActive) {
|
if (savedStateActive) {
|
||||||
link.addClass("active");
|
link.addClass("active");
|
||||||
@ -106,7 +106,7 @@ RED.menu = (function() {
|
|||||||
opt.onselect.call(opt);
|
opt.onselect.call(opt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setState();
|
setInitialState();
|
||||||
} else if (opt.href) {
|
} else if (opt.href) {
|
||||||
link.attr("target","_blank").attr("href",opt.href);
|
link.attr("target","_blank").attr("href",opt.href);
|
||||||
} else if (!opt.options) {
|
} else if (!opt.options) {
|
||||||
|
Loading…
Reference in New Issue
Block a user