0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-06-26 13:11:21 +02:00

Restored signing after settings submit

This commit is contained in:
peteruithoven 2014-02-07 12:32:35 +01:00
parent 652192d42d
commit fd8520698e
2 changed files with 7 additions and 8 deletions

View File

@ -108,15 +108,15 @@ function NetworkAPI() {
this.signin = function() { this.signin = function() {
$.ajax({ $.ajax({
url: self.wifiboxCGIBinURL + "/network/signin", url: _wifiboxCGIBinURL + "/network/signin",
type: "GET", type: "GET",
dataType: 'json', dataType: 'json',
timeout: self.timeoutTime, timeout: _timeoutTime,
success: function(response){ success: function(response){
console.log("Settings:signin response: ",response); console.log("NetworkAPI:signin response: ",response);
} }
}).fail(function() { }).fail(function() {
console.log("Settings:signin: failed"); console.log("NetworkAPI:signin: failed");
}); });
}; };
} }

View File

@ -40,6 +40,7 @@ function SettingsWindow() {
this.updatePanel = new UpdatePanel(); this.updatePanel = new UpdatePanel();
this.printerPanel = new PrinterPanel(); this.printerPanel = new PrinterPanel();
var _networkPanel = new NetworkPanel(); var _networkPanel = new NetworkPanel();
var _networkAPI = new NetworkAPI();
var self = this; var self = this;
@ -96,7 +97,7 @@ function SettingsWindow() {
self.printerPanel.init(wifiboxURL,wifiboxCGIBinURL,$printerPanelElement); self.printerPanel.init(wifiboxURL,wifiboxCGIBinURL,$printerPanelElement);
self.printerPanel.fillForm = self.fillForm; self.printerPanel.fillForm = self.fillForm;
_networkAPI.init(wifiboxURL,wifiboxCGIBinURL);
} }
}).fail(function() { }).fail(function() {
console.log("FATAL ERROR: Settings:printer/listall failed"); console.log("FATAL ERROR: Settings:printer/listall failed");
@ -323,9 +324,7 @@ function SettingsWindow() {
}; };
this.signin = function() { this.signin = function() {
_networkAPI.signin();
// TODO use api.network
}; };
this.downloadlogs = function() { this.downloadlogs = function() {