sogo/UI/WebServerResources/js/Main.js
2016-09-01 01:27:35 -04:00

2 lines
887 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",h.cn=a.cn,b(function(){window.location.href===a.url?window.location.reload(!0):window.location.href=a.url},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