fix app.js

This commit is contained in:
yuri
2015-02-12 16:08:15 +02:00
parent f2e1ba3780
commit 5fc7f2509d
+11 -3
View File
@@ -376,6 +376,9 @@ _.extend(Espo.App.prototype, {
}
var process = function () {
if (!userIsLoaded) {
return;
}
this.dateTime.setLanguage(this.language);
var userData = options.user || null;
@@ -400,11 +403,16 @@ _.extend(Espo.App.prototype, {
}
}.bind(this);
var handleProcess = function () {
if (langIsLoaded && userIsLoaded) {
process();
}
};
if (this.auth !== null) {
this.language.load(function () {
langIsLoaded = true;
process();
handleProcess();
}.bind(this));
@@ -414,7 +422,7 @@ _.extend(Espo.App.prototype, {
}).done(function (data) {
userIsLoaded = true;
options = data;
process();
handleProcess();
});
}
}