Permalink
Browse files

Using of the lightweightNotification.

  • Loading branch information...
1 parent 0a8526a commit bec0b53c7d8155b592beb8c2f5e637e1830942e7 @Tpt committed Nov 11, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 assets/www/js/login.js
  2. +2 −2 assets/www/js/upload.js
View
@@ -59,7 +59,7 @@ var login = {
var username = $('#loginUsername').val();
var password = $('#loginPassword').val();
if(username == '' || password == '') {
- alert('You must set your username and password');
+ lightweightNotification('You must set your username and password');
return false;
}
if(!hasNetworkConnection()) {
@@ -84,7 +84,7 @@ var login = {
success: function(data) {
if(data.login && data.login.result == "Success") {
progress.hide();
- alert('The login succeded as ' + data.login.lgusername + ' !');
+ lightweightNotification('The login succeded as ' + data.login.lgusername + ' !');
login.logged = true;
login.setUsername(username); //save the login for next login.
login.form.hide();
View
@@ -143,7 +143,7 @@ var upload = {
onSuccess: function(r) {
var data = JSON.parse(r.response);
if(data.upload && data.upload.result == 'Success') {
- alert('The upload of the file ' + data.upload.filename + ' is done !');
+ lightweightNotification('The upload of the file ' + data.upload.filename + ' is done !');
} else {
if(data.error) {
alert('The upload fail ! Error: ' + data.error.info);
@@ -163,7 +163,7 @@ var upload = {
alert('The upload fail because of a connecction error !');
} else {
alert('The upload fail !');
- alert("An error has occurred: Code = " + error.code);
+ console.log("An error has occurred: Code = " + error.code);
}
progress.hide();
upload.ui.hide();

0 comments on commit bec0b53

Please sign in to comment.