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-scroll").removeClass("hide");
|
||||
$("#red-ui-palette-search").removeClass("hide");
|
||||
loadFlows(function() {
|
||||
if (RED.settings.theme("projects.enabled",false)) {
|
||||
RED.projects.refresh(function(activeProject) {
|
||||
loadFlows(function() {
|
||||
RED.sidebar.info.refresh()
|
||||
if (!activeProject) {
|
||||
// Projects enabled but no active project
|
||||
@ -140,12 +140,14 @@ var RED = (function() {
|
||||
}
|
||||
completeLoad();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
loadFlows(function() {
|
||||
// Projects disabled by the user
|
||||
RED.sidebar.info.refresh()
|
||||
completeLoad();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
var config = configs.shift();
|
||||
appendNodeConfig(config,stepConfig);
|
||||
|
@ -2312,6 +2312,7 @@ RED.projects = (function() {
|
||||
if (data.active) {
|
||||
$.getJSON("projects/"+data.active, function(project) {
|
||||
activeProject = project;
|
||||
RED.events.emit("projects:load",activeProject);
|
||||
RED.sidebar.versionControl.refresh(true);
|
||||
if (done) {
|
||||
done(activeProject);
|
||||
|
Loading…
Reference in New Issue
Block a user