diff --git a/src/login.html b/src/login.html
index bbf27586..bf792ba9 100644
--- a/src/login.html
+++ b/src/login.html
@@ -44,8 +44,10 @@ if(process.platform != 'darwin') {
Create Local Account
-
-
+
@@ -59,7 +61,10 @@ if(process.platform != 'darwin') {
@@ -78,7 +83,10 @@ if(process.platform != 'darwin') {
@@ -138,6 +146,9 @@ $(function() {
var $email = $("#email");
var $host = $('#host');
+ var $body = $('body');
+
+
$("#loginBtn").click(function(e) {
e.preventDefault();
var email = $email.val();
@@ -161,7 +172,7 @@ $(function() {
showMsg(getMsg('Invalid host'), 'host');
return;
}
- $('#loadingLogo').addClass('loading');
+ $body.addClass('loading');
hideMsg();
// TODO show loading
// console.log(33);
@@ -172,7 +183,7 @@ $(function() {
UserService.login(email, pwd, function(ret) {
if (ret) {
setTimeout(function(){
- $('#loadingLogo').removeClass('loading');
+ $body.removeClass('loading');
goToMainPage();
gui.getCurrentWindow().close();
}, 2000);
@@ -181,12 +192,12 @@ $(function() {
ApiService.auth(email, pwd, host, function(ret) {
if(ret.Ok) {
setTimeout(function(){
- $('#loadingLogo').removeClass('loading');
+ $body.removeClass('loading');
goToMainPage();
gui.getCurrentWindow().close();
}, 2000);
} else {
- $('#loadingLogo').removeClass('loading');
+ $body.removeClass('loading');
showMsg(getMsg("Email or Password Error"));
}
});
@@ -214,7 +225,7 @@ $(function() {
return;
}
}
- $('#loadingLogo').addClass('loading');
+ $body.addClass('loading');
hideMsg();
var user = {};
user.Username = username;
@@ -225,13 +236,13 @@ $(function() {
dbuser.UserId = dbuser._id;
UserService.saveCurUser(dbuser, function() {
setTimeout(function(){
- $('#loadingLogo').removeClass('loading');
+ $body.removeClass('loading');
goToMainPage();
gui.getCurrentWindow().close();
}, 2000);
})
} else {
- $('#loadingLogo').removeClass('loading');
+ $body.removeClass('loading');
showMsg(getMsg(dbuser));
}
});
@@ -269,9 +280,6 @@ $(function() {
checkDisabled();
});
});
-
- var $body = $('body');
-
$('#customServer').click(function() {
$body.addClass('custom-server');
$host.focus();
@@ -290,12 +298,6 @@ $(function() {
$email.focus();
hideMsg();
});
-
- // setTimeout(function () {
- // var s = $('