sogo/UI/WebServerResources/js/Main.js
2016-07-16 01:28:33 -04:00

2 lines
869 B
JavaScript

!function(){"use strict";function a(a,b,c,d,e){function f(){return h.loginState="authenticating",e.login(h.creds).then(function(a){h.loginState="logged",b(function(){window.location.href===a?window.location.reload(!0):window.location.href=a},1e3)},function(a){h.loginState="error",h.errorMessage=a.error}),!1}function g(a){function b(a){this.closeDialog=function(){a.hide()}}d.show({targetEvent:a,templateUrl:"aboutBox.html",controller:b,controllerAs:"about"}),b.$inject=["$mdDialog"]}var h=this;h.creds={username:cookieUsername,password:null},h.login=f,h.loginState=!1,h.showAbout=g,h.showLogin=!1,b(function(){h.showLogin=!0},100)}angular.module("SOGo.MainUI",["SOGo.Common","SOGo.Authentication"]),a.$inject=["$scope","$timeout","Dialog","$mdDialog","Authentication"],angular.module("SOGo.MainUI").controller("LoginController",a)}();
//# sourceMappingURL=Main.js.map