sogo/UI/WebServerResources/js/Main.js
2015-09-15 12:05:37 -04:00

2 lines
968 B
JavaScript

!function(){"use strict";function LoginController($scope,$timeout,Dialog,$mdDialog,Authentication){function login(){return Authentication.login(vm.creds).then(function(url){window.location.href=url},function(msg){Dialog.alert(l("Authentication Failed"),msg.error)}),!1}function showAbout($event){function AboutDialogController($mdDialog){this.closeDialog=function(){$mdDialog.hide()}}$mdDialog.show({targetEvent:$event,templateUrl:"aboutBox.html",controller:AboutDialogController,controllerAs:"about"}),AboutDialogController.$inject=["$mdDialog"]}var vm=this;vm.creds={username:cookieUsername,password:null},vm.login=login,vm.showAbout=showAbout,vm.showLogin=!1,$timeout(function(){vm.showLogin=!0},100)}angular.module("SOGo.MainUI",["SOGo.Common","SOGo.Authentication"]),LoginController.$inject=["$scope","$timeout","Dialog","$mdDialog","Authentication"],angular.module("SOGo.MainUI").controller("LoginController",LoginController)}();
//# sourceMappingURL=Main.js.map