2017-05-13 07:24:30 +02:00
|
|
|
!function(){"use strict";function o(o,n,e,t,i,r){function l(){return c.loginState="authenticating",r.login(c.creds).then(function(o){c.loginState="logged",c.cn=o.cn,e(function(){n.location.href===o.url?n.location.reload(!0):n.location.href=o.url},1e3)},function(o){c.loginState="error",c.errorMessage=o.error}),!1}function a(o){function n(o){this.closeDialog=function(){o.hide()}}i.show({targetEvent:o,templateUrl:"aboutBox.html",controller:n,controllerAs:"about"}),n.$inject=["$mdDialog"]}var c=this;c.creds={username:n.cookieUsername,password:null,rememberLogin:angular.isDefined(n.cookieUsername)&&n.cookieUsername.length>0},c.login=l,c.loginState=!1,c.showAbout=a,c.showLogin=!1,e(function(){c.showLogin=!0},100)}angular.module("SOGo.MainUI",["SOGo.Common","SOGo.Authentication"]),o.$inject=["$scope","$window","$timeout","Dialog","$mdDialog","Authentication"],angular.module("SOGo.MainUI").controller("LoginController",o)}();
|