0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-24 18:17:56 +01:00

Open Settings window after settings are loaded

This commit is contained in:
peteruithoven 2013-10-28 11:16:00 +01:00
parent f783726c47
commit cfff8b498f

View File

@ -151,13 +151,11 @@ function SettingsWindow() {
}
this.showSettings = function() {
console.log("f:showSettings()");
this.loadSettings(); // reload settings
// this.window.css("display","table");
this.loadSettings(function() { // reload settings
$("#contentOverlay").fadeIn(375, function() {
document.body.removeEventListener('touchmove',prevent,false);
});
});
}
this.hideSettings = function(complete) {
$("#contentOverlay").fadeOut(375, function() {
@ -167,7 +165,7 @@ function SettingsWindow() {
});
}
this.loadSettings = function() {
this.loadSettings = function(complete) {
if (!communicateWithWifibox) {
console.log(" communicateWithWifibox is false: settings aren't being loaded from wifibox...")
return;
@ -184,6 +182,7 @@ function SettingsWindow() {
console.log(" settings: ",settings);
self.fillForm();
$(document).trigger(SettingsWindow.SETTINGS_LOADED);
if(complete) complete();
}
}).fail(function() {
console.log("Settings:loadSettings: failed");