Improve JavaScript coding style

To comitted code now passes the Airbnb pattern using jscs
This commit is contained in:
Francis Lachapelle
2014-09-24 16:06:12 -04:00
parent 61539892c0
commit 33179bbfb9
7 changed files with 844 additions and 831 deletions

View File

@@ -1,23 +1,23 @@
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* JavaScript for SOGoRootPage */
(function() {
'use strict';
'use strict';
angular.module('SOGo.MainUI', ['SOGo.Authentication'])
angular.module('SOGo.MainUI', ['SOGo.Authentication'])
.controller('loginController', ['$scope', 'Authentication', function($scope, Authentication) {
$scope.warning = false;
$scope.creds = { username: null, password: null };
$scope.login = function(creds) {
$scope.warning = false;
$scope.creds = { 'username': null, 'password': null };
$scope.login = function(creds) {
$scope.warning = false;
Authentication.login(creds)
.then(function(url) {
window.location.href = url;
}, function(msg) {
$scope.warning = msg.error;
});
return false;
};
Authentication.login(creds)
.then(function(url) {
window.location.href = url;
}, function(msg) {
$scope.warning = msg.error;
});
return false;
};
}]);
})();