2016-01-04 21:59:01 +01:00
|
|
|
!function(){"use strict";function a(a,h){a.state("mail",{url:"/Mail","abstract":!0,views:{message:{template:"<ui-view/>"}},resolve:{stateAccounts:b}}).state("mail.account",{url:"/:accountId","abstract":!0,template:'<ui-view id="account"/>',resolve:{stateAccount:c}}).state("mail.account.mailbox",{url:"/:mailboxId","abstract":!0,template:'<ui-view id="mailbox"/>',resolve:{stateMailbox:d}}).state("mail.account.mailbox.newMessage",{url:"/new",views:{"message@":{template:"<ui-view/>",controller:"MessageEditorControllerPopup"}},resolve:{stateMessage:e}}).state("mail.account.mailbox.message",{url:"/:messageId",views:{"message@":{templateUrl:"UIxMailViewTemplate",controller:"MessageController",controllerAs:"viewer"}},resolve:{stateMessage:f}}).state("mail.account.mailbox.message.edit",{url:"/edit",views:{"message@":{templateUrl:"UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor"}},resolve:{stateContent:g}}).state("mail.account.mailbox.message.action",{url:"/{actionName:(?:reply|replyall|forward)}",views:{message:{templateUrl:"UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor"}}}),h.otherwise("/Mail/0/folderINBOX/new")}function b(a,b){var c=b.$findAll();return c.then(function(b){var c=[];return angular.forEach(b,function(a,b){var d=a.$getMailboxes();c.push(d.then(function(b){return a}))}),a.all(c)})}function c(a,b){return _.find(b,function(b){return b.id==a.accountId})}function d(a,b,c){var d,e=c(a.mailboxId);return(d=function(a){var b=_.find(a,function(a){return a.path==e});return b||angular.forEach(a,function(a){!b&&a.children&&a.children.length>0&&(b=d(a.children))}),b})(b.$mailboxes)}function e(a){return a.$newMessage()}function f(a,b,c,d,e){var f={uid:b.messageId.toString()},g=new e(d.$account.id,d,f);return g.$reload()}function g(a){return a.$editableContent()}function h(a){a.$on("$routeChangeError",function(a,b,c,d){console.error(a,b,c,d)})}function i(a,b,c,d){b.show({hasBackdrop:!1,disableParentScroll:!1,clickOutsideToClose:!1,escapeToClose:!1,templateUrl:"UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor",locals:{stateAccounts:c,stateMessage:d,stateRecipients:[]}})["finally"](function(){a.opener&&a.close()})}angular.module("SOGo.MailerUI",["ui.router","ck","angularFileUpload","SOGo.Common","SOGo.ContactsUI","ngAnimate","SOGo.PreferencesUI"]).config(a).run(h).controller("MessageEditorControllerPopup",i),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["$q","Account"],c.$inject=["$stateParams","stateAccounts"],d.$inject=["$stateParams","stateAccount","decodeUriFilter"],e.$inject=["stateAccount"],f.$inject=["encodeUriFilter","$stateParams","$state","stateMailbox","Message"],g.$inject=["stateMessage"],h.$inject=["$rootScope"],i.$inject=["$window","$mdDialog","stateAccounts","stateMessage"]}();
|