0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-22 09:17:56 +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; var self = this;
this.progressbarBGImg.onload = function() { this.progressbarBGImg.onload = function() {
console.log("progressbarBGImg img loaded"); //console.log("progressbarBGImg img loaded");
// self.isInitted = true; // self.isInitted = true;
// self.update(self.currentTemperature, self.targetTemperature); // self.update(self.currentTemperature, self.targetTemperature);

View File

@ -23,9 +23,9 @@ function NetworkAPI() {
var _self = this; var _self = this;
this.init = function(wifiboxURL,wifiboxCGIBinURL) { this.init = function(wifiboxURL,wifiboxCGIBinURL) {
console.log("NetworkAPI:init"); //console.log("NetworkAPI:init");
console.log(" wifiboxURL: ",wifiboxURL); //console.log(" wifiboxURL: ",wifiboxURL);
console.log(" wifiboxCGIBinURL: ",wifiboxCGIBinURL); //console.log(" wifiboxCGIBinURL: ",wifiboxCGIBinURL);
_wifiboxURL = wifiboxURL; _wifiboxURL = wifiboxURL;
_wifiboxCGIBinURL = wifiboxCGIBinURL; _wifiboxCGIBinURL = wifiboxCGIBinURL;
} }
@ -73,7 +73,7 @@ function NetworkAPI() {
}; };
this.associate = function(ssid,phrase,recreate) { this.associate = function(ssid,phrase,recreate) {
console.log("NetworkAPI:associate"); //console.log("NetworkAPI:associate");
var postData = { var postData = {
ssid:ssid, ssid:ssid,
phrase:phrase, phrase:phrase,
@ -94,7 +94,7 @@ function NetworkAPI() {
}; };
this.openAP = function() { this.openAP = function() {
console.log("NetworkAPI:openAP"); //console.log("NetworkAPI:openAP");
$.ajax({ $.ajax({
url: _wifiboxCGIBinURL + "/network/openap", url: _wifiboxCGIBinURL + "/network/openap",
type: "POST", type: "POST",
@ -115,10 +115,10 @@ function NetworkAPI() {
dataType: 'json', dataType: 'json',
timeout: _timeoutTime, timeout: _timeoutTime,
success: function(response){ success: function(response){
console.log("NetworkAPI:signin response: ",response); //console.log("NetworkAPI:signin response: ",response);
} }
}).fail(function() { }).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) { FormPanel.prototype.fill = function(settings,form) {
//console.log("FormPanel:fillForm");
if(!form) form = _element; // if no form specified, fill whole panel form if(!form) form = _element; // if no form specified, fill whole panel form
//console.log(" form: ",form);
//fill form with loaded settings //fill form with loaded settings
var selects = form.find("select"); var selects = form.find("select");

View File

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

View File

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