0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2025-06-11 09:23:17 +02: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

@ -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 {