0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-21 17:07:55 +01:00

Less logging

This commit is contained in:
peteruithoven 2014-02-10 14:46:23 +01:00
parent 16078d3478
commit cc814bc827
5 changed files with 20 additions and 19 deletions

View File

@ -45,7 +45,7 @@ function Progressbar() {
var self = this;
this.progressbarBGImg.onload = function() {
console.log("progressbarBGImg img loaded");
//console.log("progressbarBGImg img loaded");
// self.isInitted = true;
// self.update(self.currentTemperature, self.targetTemperature);

View File

@ -23,9 +23,9 @@ function NetworkAPI() {
var _self = this;
this.init = function(wifiboxURL,wifiboxCGIBinURL) {
console.log("NetworkAPI:init");
console.log(" wifiboxURL: ",wifiboxURL);
console.log(" wifiboxCGIBinURL: ",wifiboxCGIBinURL);
//console.log("NetworkAPI:init");
//console.log(" wifiboxURL: ",wifiboxURL);
//console.log(" wifiboxCGIBinURL: ",wifiboxCGIBinURL);
_wifiboxURL = wifiboxURL;
_wifiboxCGIBinURL = wifiboxCGIBinURL;
}
@ -73,7 +73,7 @@ function NetworkAPI() {
};
this.associate = function(ssid,phrase,recreate) {
console.log("NetworkAPI:associate");
//console.log("NetworkAPI:associate");
var postData = {
ssid:ssid,
phrase:phrase,
@ -94,7 +94,7 @@ function NetworkAPI() {
};
this.openAP = function() {
console.log("NetworkAPI:openAP");
//console.log("NetworkAPI:openAP");
$.ajax({
url: _wifiboxCGIBinURL + "/network/openap",
type: "POST",
@ -115,10 +115,10 @@ function NetworkAPI() {
dataType: 'json',
timeout: _timeoutTime,
success: function(response){
console.log("NetworkAPI:signin response: ",response);
//console.log("NetworkAPI:signin response: ",response);
}
}).fail(function() {
console.log("NetworkAPI:signin: failed");
//console.log("NetworkAPI:signin: failed");
});
};
}

View File

@ -70,7 +70,9 @@ function FormPanel() {
};
FormPanel.prototype.fill = function(settings,form) {
//console.log("FormPanel:fillForm");
if(!form) form = _element; // if no form specified, fill whole panel form
//console.log(" form: ",form);
//fill form with loaded settings
var selects = form.find("select");

View File

@ -105,7 +105,7 @@ function NetworkPanel() {
};
this.update = function() {
console.log("NetworkPanel:update");
//console.log("NetworkPanel:update");
_self.refreshNetworks();
_self.retrieveNetworkStatus(false);
}
@ -143,7 +143,7 @@ function NetworkPanel() {
if(typeof data.status === 'string') {
data.status = parseInt(data.status);
}
console.log("NetworkPanel:retrievedStatus status: ",data.status,data.statusMessage);
//console.log("NetworkPanel:retrievedStatus status: ",data.status,data.statusMessage);
// if status changed
if(data.status != _currentNetworkStatus) {
@ -199,7 +199,7 @@ function NetworkPanel() {
}
_currentNetworkStatus = data.status;
}, function() {
console.log("NetworkPanel:retrieveStatus failed");
//console.log("NetworkPanel:retrieveStatus failed");
clearTimeout(_retryRetrieveStatusDelay);
_retryRetrieveStatusDelay = setTimeout(function() { _self.retrieveNetworkStatus(connecting); }, _retryRetrieveStatusDelayTime); // retry after delay
});

View File

@ -55,8 +55,7 @@ function UpdatePanel() {
this.checkStatus(false);
}
this.retainChanged = function(e) {
console.log("UpdatePanel:retainChanged");
//console.log("UpdatePanel:retainChanged");
self.setState(self.state,true);
}
this.update = function() {
@ -96,7 +95,7 @@ function UpdatePanel() {
console.log("UpdatePanel:installUpdate response: ",response);
}
}).fail(function() {
console.log("UpdatePanel:installUpdate: no respons (there shouldn't be)");
//console.log("UpdatePanel:installUpdate: no respons (there shouldn't be)");
});
self.setState(UpdatePanel.INSTALLING);
@ -171,26 +170,26 @@ function UpdatePanel() {
}
}
this.setState = function(newState,refresh) {
console.log("UpdatePanel:setState");
//console.log("UpdatePanel:setState");
if(!refresh && this.state == newState) return;
console.log("UpdatePanel:setState: ",this.state," > ",newState,"(",this.stateText,") (in Access Point Mode: ",_inAccessPointMode,") (newestVersion: ",self.newestVersion,") (refresh: ",refresh,")");
this.state = newState;
// should personal sketches and settings be retained over update?
var retain = self.retainCheckbox.prop('checked');
console.log(" retain", retain);
//console.log(" retain", retain);
// download button
// if there isn't newestVersion data something went wrong,
// probably accessing the internet
console.log(" self.newestVersion: ",self.newestVersion);
//console.log(" self.newestVersion: ",self.newestVersion);
if(self.newestVersion != undefined) {
console.log(" this.state: ",this.state);
//console.log(" this.state: ",this.state);
switch(this.state){
case UpdatePanel.NONE:
case UpdatePanel.DOWNLOAD_FAILED:
case UpdatePanel.INSTALL_FAILED:
console.log(" self.canUpdate: ",self.canUpdate);
//console.log(" self.canUpdate: ",self.canUpdate);
if(self.canUpdate || !retain) {
self.btnUpdate.removeAttr("disabled");
} else {