summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-09-30 18:30:01 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-09-30 18:30:01 +0200
commitbb2636b3f3c669d1f6dcbc891c7770bb12fa26f1 (patch)
tree5a1c2b0ef6b4739de7f0d89c6c4143ced17ffb58
parent0da1117cfc28688633be7b8382aa60435bf740eb (diff)
Fix indentation in login.js
-rw-r--r--js/codeq/login.js58
1 files changed, 29 insertions, 29 deletions
diff --git a/js/codeq/login.js b/js/codeq/login.js
index 7844dc4..6f9a7e7 100644
--- a/js/codeq/login.js
+++ b/js/codeq/login.js
@@ -4,36 +4,36 @@
(function(){
var loginFun = function(){
- $('#disabled').css('display', '');
- $('#disabled').css('cursor', 'wait');
- codeq.comms.connect()
- .then(function () {
- return codeq.comms.login($('#username').val(), $('#password').val());
- })
- .then(function (data) {
- $('#disabled').css('display', 'none');
- $('#disabled').css('cursor', '');
- if (data.code !== 0) throw new Error('Login failed, code: ' + data.code + ', message: ' + data.message);
+ $('#disabled').css('display', '');
+ $('#disabled').css('cursor', 'wait');
+ codeq.comms.connect()
+ .then(function () {
+ return codeq.comms.login($('#username').val(), $('#password').val());
+ })
+ .then(function (data) {
+ $('#disabled').css('display', 'none');
+ $('#disabled').css('cursor', '');
+ if (data.code !== 0) throw new Error('Login failed, code: ' + data.code + ', message: ' + data.message);
- //merge these settings into the already existing default settings
- var sett = data.settings;
- $.merge(true, codeq.settings, sett);
- if('lan' in sett && sett['lan'] in codeq.supportedLangs){
- codeq.setLang(sett['lan']);
- }
+ //merge these settings into the already existing default settings
+ var sett = data.settings;
+ $.merge(true, codeq.settings, sett);
+ if('lan' in sett && sett['lan'] in codeq.supportedLangs){
+ codeq.setLang(sett['lan']);
+ }
- codeq.globalStateMachine.transition('language');
- //codeq.activateState('language');
- })
- .fail(function (reason) {
- $('#disabled').css('display', 'none');
- $('#disabled').css('cursor', '');
- codeq.log.error('Login failed: ' + reason, reason);
- alert('Login request failed: ' + reason);
- $('#disabled').css('display', 'none');
- })
- .done();
- };
+ codeq.globalStateMachine.transition('language');
+ //codeq.activateState('language');
+ })
+ .fail(function (reason) {
+ $('#disabled').css('display', 'none');
+ $('#disabled').css('cursor', '');
+ codeq.log.error('Login failed: ' + reason, reason);
+ alert('Login request failed: ' + reason);
+ $('#disabled').css('display', 'none');
+ })
+ .done();
+ };
codeq.globalStateMachine.register('login',{
'enter': function(){
$('#signed-in-title').html('');
@@ -50,4 +50,4 @@
$("#password").val('');
}
});
-})(); \ No newline at end of file
+})();