mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Reorder inital load so projects:load event emits before any nodes:add
This commit is contained in:
parent
efb9dce92f
commit
f78be9050a
@ -124,9 +124,9 @@ var RED = (function() {
|
|||||||
$("#red-ui-palette > .red-ui-palette-spinner").hide();
|
$("#red-ui-palette > .red-ui-palette-spinner").hide();
|
||||||
$(".red-ui-palette-scroll").removeClass("hide");
|
$(".red-ui-palette-scroll").removeClass("hide");
|
||||||
$("#red-ui-palette-search").removeClass("hide");
|
$("#red-ui-palette-search").removeClass("hide");
|
||||||
loadFlows(function() {
|
if (RED.settings.theme("projects.enabled",false)) {
|
||||||
if (RED.settings.theme("projects.enabled",false)) {
|
RED.projects.refresh(function(activeProject) {
|
||||||
RED.projects.refresh(function(activeProject) {
|
loadFlows(function() {
|
||||||
RED.sidebar.info.refresh()
|
RED.sidebar.info.refresh()
|
||||||
if (!activeProject) {
|
if (!activeProject) {
|
||||||
// Projects enabled but no active project
|
// Projects enabled but no active project
|
||||||
@ -140,12 +140,14 @@ var RED = (function() {
|
|||||||
}
|
}
|
||||||
completeLoad();
|
completeLoad();
|
||||||
});
|
});
|
||||||
} else {
|
});
|
||||||
|
} else {
|
||||||
|
loadFlows(function() {
|
||||||
// Projects disabled by the user
|
// Projects disabled by the user
|
||||||
RED.sidebar.info.refresh()
|
RED.sidebar.info.refresh()
|
||||||
completeLoad();
|
completeLoad();
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
} else {
|
} else {
|
||||||
var config = configs.shift();
|
var config = configs.shift();
|
||||||
appendNodeConfig(config,stepConfig);
|
appendNodeConfig(config,stepConfig);
|
||||||
|
@ -2312,6 +2312,7 @@ RED.projects = (function() {
|
|||||||
if (data.active) {
|
if (data.active) {
|
||||||
$.getJSON("projects/"+data.active, function(project) {
|
$.getJSON("projects/"+data.active, function(project) {
|
||||||
activeProject = project;
|
activeProject = project;
|
||||||
|
RED.events.emit("projects:load",activeProject);
|
||||||
RED.sidebar.versionControl.refresh(true);
|
RED.sidebar.versionControl.refresh(true);
|
||||||
if (done) {
|
if (done) {
|
||||||
done(activeProject);
|
done(activeProject);
|
||||||
|
Loading…
Reference in New Issue
Block a user