sogo/UI/WebServerResources/js/Main.js
2015-08-12 09:43:55 -04:00

2 lines
890 B
JavaScript

!function(){"use strict";function LoginController($scope,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}angular.module("SOGo.MainUI",["SOGo.Common","SOGo.Authentication"]),LoginController.$inject=["$scope","Dialog","$mdDialog","Authentication"],angular.module("SOGo.MainUI").controller("LoginController",LoginController)}();
//# sourceMappingURL=Main.js.map