mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 07:14:21 +00:00
(js/css) Update generated files
This commit is contained in:
1 parent
e3ba7c8cab
commit
df2926e872
34 files changed
+40
-34
No files matched your search
@@ -1,2 +1,4 @@
|
||||
!function(){"use strict";function e(t){"function"!=typeof t.then&&(angular.extend(this,t),_.forEach(this.identities,function(e){e.fullName?e.full=e.fullName+" <"+e.email+">":e.full="<"+e.email+">"}),e.$log.debug("Account: "+JSON.stringify(t,void 0,2)))}e.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(t,n,s,i,o,a,r,l){return angular.extend(e,{$q:t,$timeout:n,$log:s,$$resource:new o(i.activeUser("folderURL")+"Mail",i.activeUser()),$Preferences:a,$Mailbox:r,$Message:l}),e}];try{angular.module("SOGo.MailerUI")}catch(e){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",e.$factory),e.$findAll=function(t){return t?e.$unwrapCollection(t):e.$$resource.fetch("","mailAccounts").then(function(t){return e.$unwrapCollection(t)})},e.$unwrapCollection=function(t){var n=[];return angular.forEach(t,function(t,s){t.id=s,n[s]=new e(t)}),e.$accounts=n,n},e.prototype.getLength=function(){return this.$flattenMailboxes().length},e.prototype.getItemAtIndex=function(e){var t;return t=this.$flattenMailboxes(),e>=0&&e<t.length?t[e]:null},e.prototype.$getMailboxes=function(t){var n=this;return!this.$mailboxes||t&&t.reload?e.$Mailbox.$find(this,t).then(function(t){n.$mailboxes=t,n.$expanded=!1;var s,i=function(e){_.forEach(e,function(e){e.$expanded=s.indexOf("/"+e.id)>=0,e.children&&e.children.length>0&&i(e.children)})};if(e.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(e.$Preferences.settings.Mail.ExpandedFolders))try{s=angular.fromJson(e.$Preferences.settings.Mail.ExpandedFolders)}catch(t){e.$log.warn("Can't parse list of expanded folders. String was: "+e.$Preferences.settings.Mail.ExpandedFolders),s=[]}else s=e.$Preferences.settings.Mail.ExpandedFolders;n.$expanded=s.indexOf("/"+n.id)>=0,s.length>0&&i(n.$mailboxes)}return e.$accounts&&(n.$expanded|=1==e.$accounts.length),n.$flattenMailboxes({reload:!0}),n.$mailboxes}):e.$q.when(this.$mailboxes)},e.prototype.$flattenMailboxes=function(t){var n=[],s=[],i=function(e){_.forEach(e,function(e){n.push(e),(t&&t.all||e.$expanded)&&e.children&&e.children.length>0&&i(e.children)})};return!this.$$flattenMailboxes||t&&(t.reload||t.all)?(i(this.$mailboxes),t&&t.all||(this.$$flattenMailboxes=n,t&&t.saveState&&(_.forEach(e.$accounts,function(e){e.$expanded&&s.push("/"+e.id),_.reduce(e.$$flattenMailboxes,function(e,t){return t.$expanded&&e.push("/"+t.id),e},s)}),e.$$resource.post(null,"saveFoldersState",s)))):n=this.$$flattenMailboxes,n},e.prototype.$getMailboxByType=function(e){var t=function(n){var s=_.find(n,function(t){return t.type==e});return s||angular.forEach(n,function(e){!s&&e.children&&e.children.length>0&&(s=t(e.children))}),s};return t(this.$mailboxes)},e.prototype.$getMailboxByPath=function(e){var t=function(n){var s=_.find(n,function(t){return t.path==e});return s||angular.forEach(n,function(e){!s&&e.children&&e.children.length>0&&(s=t(e.children))}),s};return t(this.$mailboxes)},e.prototype.$newMailbox=function(t,n){var s=this;return e.$$resource.post(t.toString(),"createFolder",{name:n}).then(function(){s.$getMailboxes({reload:!0})})},e.prototype.$certificate=function(){var t=this;return this.security&&this.security.hasCertificate?this.$$certificate?e.$q.when(this.$$certificate):e.$$resource.fetch(this.id.toString(),"certificate").then(function(e){return t.$$certificate=e,e}):e.$q.reject()},e.prototype.$removeCertificate=function(){var t=this;return e.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){t.security.hasCertificate=!1})},e.prototype.updateQuota=function(e){var t,n;t=Math.round(1e4*e.usedSpace/e.maxQuota)/100,n=l("quotasFormat").formatted(t,Math.round(e.maxQuota/10.24)/100),this.$quota={percent:t,description:n}},e.prototype.$newMessage=function(t){var n=this;return e.$$resource.fetch(this.id.toString(),"compose").then(function(t){e.$log.debug("New message (compose): "+JSON.stringify(t,void 0,2));return new e.$Message(t.accountId,n.$getMailboxByPath(t.mailboxPath),t)}).then(function(s){return e.$$resource.fetch(s.$absolutePath({asDraft:!0}),"edit").then(function(i){var o=e.$Preferences.defaults.AuxiliaryMailAccounts[n.id];return o.security&&(o.security.alwaysSign&&(i.sign=!0),o.security.alwaysEncrypt&&(i.encrypt=!0)),e.$log.debug("New message (edit): "+JSON.stringify(i,void 0,2)),angular.extend(s.editable,i),s.isNew=!0,t&&t.mailto&&(angular.isObject(t.mailto)?angular.extend(s.editable,t.mailto):s.$parseMailto(t.mailto)),s})})},e.prototype.$addDelegate=function(t){var n=this,s=e.$q.defer(),i={uid:t.uid};return!t.uid||_.indexOf(_.map(this.delegates,"uid"),t.uid)>-1?s.resolve():e.$$resource.fetch(this.id.toString(),"addDelegate",i).then(function(){n.delegates.push(t),s.resolve(n.users)},function(e,t){s.reject(l("An error occured please try again."))}),s.promise},e.prototype.$removeDelegate=function(t){var n=this,s={uid:t};return e.$$resource.fetch(this.id.toString(),"removeDelegate",s).then(function(){var e=_.indexOf(_.map(n.delegates,"uLine truncated
|
||||
!function(){"use strict";function a(b){"function"!=typeof b.then&&(angular.extend(this,b),_.forEach(this.identities,function(a){a.fullName?a.full=a.fullName+" <"+a.email+">":a.full="<"+a.email+">"}),a.$log.debug("Account: "+JSON.stringify(b,void 0,2)))}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Mail",e.activeUser()),$Preferences:g,$Mailbox:h,$Message:i}),a}];try{angular.module("SOGo.MailerUI")}catch(a){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",a.$factory),a.$findAll=function(b){return b?a.$unwrapCollection(b):a.$$resource.fetch("","mailAccounts").then(function(b){return a.$unwrapCollection(b)})},a.$unwrapCollection=function(b){var c=[];return angular.forEach(b,function(b,d){b.id=d,c[d]=new a(b)}),a.$accounts=c,c},a.prototype.getLength=function(){return this.$flattenMailboxes().length},a.prototype.getItemAtIndex=function(a){var b;return b=this.$flattenMailboxes(),a>=0&&a<b.length?b[a]:null},a.prototype.$getMailboxes=function(b){var c=this;return!this.$mailboxes||b&&b.reload?a.$Mailbox.$find(this,b).then(function(b){c.$mailboxes=b,c.$expanded=!1;var d,e=function(a){_.forEach(a,function(a){a.$expanded=d.indexOf("/"+a.id)>=0,a.children&&a.children.length>0&&e(a.children)})};if(a.$Preferences.settings.Mail.ExpandedFolders){if(angular.isString(a.$Preferences.settings.Mail.ExpandedFolders))try{d=angular.fromJson(a.$Preferences.settings.Mail.ExpandedFolders)}catch(b){a.$log.warn("Can't parse list of expanded folders. String was: "+a.$Preferences.settings.Mail.ExpandedFolders),d=[]}else d=a.$Preferences.settings.Mail.ExpandedFolders;c.$expanded=d.indexOf("/"+c.id)>=0,d.length>0&&e(c.$mailboxes)}return a.$accounts&&(c.$expanded|=1==a.$accounts.length),c.$flattenMailboxes({reload:!0}),c.$mailboxes}):a.$q.when(this.$mailboxes)},a.prototype.$flattenMailboxes=function(b){var c=this,d=[],e=[],f=function(a){_.forEach(a,function(a){d.push(a),(b&&b.all||a.$expanded)&&a.children&&a.children.length>0&&f(a.children)})};return!this.$$flattenMailboxes||b&&(b.reload||b.all)?(f(this.$mailboxes),b&&b.all||(c.$$flattenMailboxes=d,b&&b.saveState&&(_.forEach(a.$accounts,function(a){a.$expanded&&e.push("/"+a.id),_.reduce(a.$$flattenMailboxes,function(a,b){return b.$expanded&&a.push("/"+b.id),a},e)}),a.$$resource.post(null,"saveFoldersState",e)))):d=this.$$flattenMailboxes,d},a.prototype.$getMailboxByType=function(a){var b,c=function(b){var d=_.find(b,function(b){return b.type==a});return d||angular.forEach(b,function(a){!d&&a.children&&a.children.length>0&&(d=c(a.children))}),d};return b=c(this.$mailboxes)},a.prototype.$getMailboxByPath=function(a){var b=null,c=function(b){var d=_.find(b,function(b){return b.path==a});return d||angular.forEach(b,function(a){!d&&a.children&&a.children.length>0&&(d=c(a.children))}),d};return b=c(this.$mailboxes)},a.prototype.$newMailbox=function(b,c){var d=this;return a.$$resource.post(b.toString(),"createFolder",{name:c}).then(function(){d.$getMailboxes({reload:!0})})},a.prototype.$certificate=function(){var b=this;return this.security&&this.security.hasCertificate?this.$$certificate?a.$q.when(this.$$certificate):a.$$resource.fetch(this.id.toString(),"certificate").then(function(a){return b.$$certificate=a,a}):a.$q.reject()},a.prototype.$removeCertificate=function(){var b=this;return a.$$resource.fetch(this.id.toString(),"removeCertificate").then(function(){b.security.hasCertificate=!1})},a.prototype.updateQuota=function(a){var b,c,d;b=Math.round(1e4*a.usedSpace/a.maxQuota)/100,c=l("quotasFormat"),d=c.formatted(b,Math.round(a.maxQuota/10.24)/100),this.$quota={percent:b,description:d}},a.prototype.$newMessage=function(b){var c=this;return a.$$resource.fetch(this.id.toString(),"compose").then(function(b){a.$log.debug("New message (compose): "+JSON.stringify(b,void 0,2));var d=new a.$Message(b.accountId,c.$getMailboxByPath(b.mailboxPath),b);return d}).then(function(d){return a.$$resource.fetch(d.$absolutePath({asDraft:!0}),"edit").then(function(e){var f=a.$Preferences.defaults.AuxiliaryMailAccounts[c.id];return f.security&&(f.security.alwaysSign&&(e.sign=!0),f.security.alwaysEncrypt&&(e.encrypt=!0)),a.$log.debug("New message (edit): "+JSON.stringify(e,void 0,2)),angular.extend(d.editable,e),d.isNew=!0,b&&b.mailto&&(angular.isObject(b.mailto)?angular.extend(d.editable,b.mailto):d.$parseMailto(b.mailto)),d})})},a.prototype.$addDelegate=function(b){var c=this,d=a.$q.defer(),e={uid:b.uid};return!b.uid||_.indexOf(_.map(this.delegates,"uid"),b.uid)>-1?d.resolve():a.$$resource.fetch(this.id.toString(),"addDelegate",e).then(function(){c.delegates.push(b),d.resolve(c.users)},function(a,b){d.reject(l("An error occured please try again."))}),d.promise},a.prototype.$removeDelegate=function(b){var c=this,d={uid:b};return a.$$resource.fetch(this.id.toString(),"removeDelegate",d).then(function(){var aLine truncated
|
||||
delete a.selectedMessage})},a.prototype.hasSelectedMessage=function(){return angular.isDefined(_.find(this.$mailboxes,function(a){return angular.isDefined(a.selectedMessage)}))},a.prototype.isSelectedMessage=function(a,b){return angular.isDefined(_.find(this.$mailboxes,function(c){return c.path==b&&c.selectedMessage==a}))},a.prototype.getLength=function(){var a=0;return angular.isDefined(this.$mailboxes)?(_.forEach(this.$mailboxes,function(b){a+=b.$messages.length}),a):a},a.prototype.getItemAtIndex=function(a){var b,c,d,e,f;if(angular.isDefined(this.$mailboxes)&&a>=0)for(b=0,c=0;c<this.$mailboxes.length;c++)for(e=this.$mailboxes[c],d=0;d<e.$messages.length;b++,d++)if(f=e.$messages[d],b==a&&e.$loadMessage(f.uid))return f;return null},a.prototype.$id=function(){return a.$absolutePath(this.$account.id)},a.prototype.$selectedMessages=function(){return _.transform(this.$mailboxes,function(a,b){a[b.id]=b.$selectedMessages()},{})},a.prototype.$selectedCount=function(){return _.sum(_.invokeMap(this.$mailboxes,"$selectedCount"))},a.prototype.$flagMessages=function(b,c,d){var e={flags:c,operation:d},f=[],g=[];return _.forEach(b,function(b,c){if(b.length>0){var d=_.map(b,"uid");f.push(b);var h=a.$$resource.post(c,"addOrRemoveLabel",_.assign(e,{msgUIDs:d}));g.push(h)}}),a.$q.all(g).then(function(){return _.flatten(f)})},a.prototype.$deleteMessages=function(b){var c=[];return _.forEach(b,function(a,b){if(a.length>0){var d=a[0].$mailbox,e=d.$deleteMessages(a);c.push(e)}}),a.$q.all(c)},a.prototype.$markOrUnMarkMessagesAsJunk=function(b){var c=[];return _.forEach(b,function(a,b){if(a.length>0){var d=a[0].$mailbox,e=d.$markOrUnMarkMessagesAsJunk(a);c.push(e)}}),a.$q.all(c)},a.prototype.$copyMessages=function(b,c){var d=[];return _.forEach(b,function(a,b){if(a.length>0){var e=a[0].$mailbox,f=e.$copyMessages(a,c);d.push(f)}}),a.$q.all(d)},a.prototype.$moveMessages=function(b,c){var d=[];return _.forEach(b,function(a,b){if(a.length>0){var e=a[0].$mailbox,f=e.$moveMessages(a,c);d.push(f)}}),a.$q.all(d)}}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n,o,p,q,r,s){function t(a){a.push(k.createHotkey({key:l("hotkey_search"),description:l("Search"),callback:C.searchMode})),a.push(k.createHotkey({key:l("hotkey_compose"),description:l("Write a new message"),callback:function(a){null===C.messageDialog&&C.newMessage(a)}})),a.push(k.createHotkey({key:l("hotkey_junk"),description:l("Mark the selected messages as junk"),callback:C.markOrUnMarkMessagesAsJunk})),a.push(k.createHotkey({key:"space",description:l("Toggle item"),callback:C.toggleMessageSelection})),a.push(k.createHotkey({key:"shift+space",description:l("Toggle range of items"),callback:C.toggleMessageSelection})),a.push(k.createHotkey({key:"up",description:l("View next item"),callback:w,preventInClass:["sg-mail-part"]})),a.push(k.createHotkey({key:"down",description:l("View previous item"),callback:x,preventInClass:["sg-mail-part"]})),a.push(k.createHotkey({key:"shift+up",description:l("Add next item to selection"),callback:y,preventInClass:["sg-mail-part"]})),a.push(k.createHotkey({key:"shift+down",description:l("Add previous item to selection"),callback:z,preventInClass:["sg-mail-part"]})),_.forEach(["backspace","delete"],function(b){a.push(k.createHotkey({key:b,description:l("Delete selected message or folder"),callback:C.confirmDeleteSelectedMessages}))}),_.forEach(a,function(a){k.registerHotkey(a)})}function u(a){return C.selectedFolder.$compact()}function v(){var b=[n.baseURL(),"UIxMailPopupView#!/Mail",C.account.id,m(m(C.selectedFolder.path)),"new"].join("/"),c=C.selectedFolder.$id()+"/"+Math.random(0,1e3);console.debug(b),a.open(b,c,["width=680","height=520","resizable=1","scrollbars=1","toolbar=0","location=0","directories=0","status=0","menubar=0","copyhistory=0"].join(","))}function w(a){var b=C.selectedFolder.$selectedMessageIndex();return angular.isDefined(b)?(b--,C.selectedFolder.$topIndex>0&&C.selectedFolder.$topIndex--):(b=C.selectedFolder.getLength()-1,C.selectedFolder.$topIndex=C.selectedFolder.getLength()),b>-1&&C.selectMessage(C.selectedFolder.$messages[b]),a.preventDefault(),b}function x(a){var b=C.selectedFolder.$selectedMessageIndex();return angular.isDefined(b)?(b++,C.selectedFolder.$topIndex<C.selectedFolder.getLength()&&C.selectedFolder.$topIndex++):b=0,b<C.selectedFolder.getLength()?C.selectMessage(C.selectedFolder.$messages[b]):b=-1,a.preventDefault(),b}function y(a){var b;C.selectedFolder.hasSelectedMessage()&&(b=w(a),b>=0&&C.toggleMessageSelection(a,C.selectedFolder.$messages[b]))}function z(a){var b;C.selectedFolder.hasSelectedMessage()&&(b=x(a),b>=0&&C.toggleMessageSelection(a,C.selectedFolder.$messages[b]))}function A(){return s.$virtualMode?C.selectedFolder.$mailboxes:[C.selectedFolder]}function B(a,b){var d,f,g=b;C.mode.multiple=C.selectedFolder.$selectedCount(),a?(b>0&&(g-=1,d=C.selectedFolder.$messages[g]),b<C.selectedFolder.$messages.length&&(f=C.selectedFolder.$messages[b]),d?d.isread&&f&&!f.isread&&(g=b,d=f):f&&(g=b,d=f),dLine truncated
|
||||
this.inputElement=b.find("input")[0],this.moreOptionsButton=_.last(b.find("md-icon")),null!==j.selectedFolder&&j.selectedFolder.id==this.mailbox.id&&this.accountController.selectFolder(this)},this.childLevel=function(){return"sg-child-level-"+this.mailbox.level},this.selectFolder=function(a){this.editMode||this.mailbox==j.selectedFolder||this.mailbox.isNoSelect()||(j.$virtualPath=!1,j.$virtualMode=!1,this.accountController.selectFolder(this),a&&(c.go("mail.account.mailbox",{accountId:this.mailbox.$account.id,mailboxId:k(this.mailbox.path)}),a.stopPropagation(),a.preventDefault()))},this.unselectFolder=function(){b[0].classList.remove("md-bg")},this.editFolder=function(a){this.editMode=!0,this.inputElement.value=this.mailbox.name,this.clickableElement.classList.add("ng-hide"),this.inputContainer.classList.remove("ng-hide"),this.inputElement.focus(),this.inputElement.select(),a&&(a.stopPropagation(),a.preventDefault())},this.saveFolder=function(a){this.inputElement.disabled||(this.mailbox.name=this.inputElement.value,this.inputElement.disabled=!0,this.mailbox.$rename().then(function(a){m.editMode=!1,m.inputContainer.classList.add("ng-hide"),m.clickableElement.classList.remove("ng-hide")}).finally(function(){m.inputElement.disabled=!1}))},this.revertEditing=function(){this.editMode=!1,this.clickableElement.classList.remove("ng-hide"),this.inputContainer.classList.add("ng-hide"),this.inputElement.value=this.mailbox.name},this.confirmDelete=function(){i.confirm(l("Warning"),l("Do you really want to move this folder into the trash ?"),{ok:l("Delete")}).then(function(){m.mailbox.$delete().then(function(){c.go("mail.account.inbox")},function(a){i.confirm(l("Warning"),l("The mailbox could not be moved to the trash folder. Would you like to delete it immediately?"),{ok:l("Delete")}).then(function(){m.mailbox.$delete({withoutTrash:!0}).then(function(){c.go("mail.account.inbox")},function(a){i.alert(l('An error occured while deleting the mailbox "%{0}".',m.mailbox.name),l(a.error))})})})})},this.showMenu=function(a){function b(a,b,c,e){var k=this;this.markFolderRead=function(){this.folder.$markAsRead()},this.newFolder=function(){i.prompt(l("New Folder..."),l("Enter the new name of your folder")).then(function(a){k.folder.$newMailbox(k.folder.id,a).then(function(){},function(b,c){i.alert(l('An error occured while creating the mailbox "%{0}".',a),l(b.error))})})},this.editFolder=function(){this.itemCtrl.editFolder()},this.compactFolder=function(){this.folder.$compact().then(function(){d.show(d.simple().content(l("Folder compacted")).position("top right").hideDelay(3e3))})},this.emptyTrashFolder=function(){this.folder.$emptyTrash().then(function(){d.show(d.simple().content(l("Trash emptied")).position("top right").hideDelay(3e3))})},this.showAdvancedSearch=function(){j.$virtualPath=this.folder.path,f(h["gt-md"])||g("left").close()},this.share=function(){this.folder.$acl.$users().then(function(){c.show({templateUrl:k.folder.id+"/UIxAclEditor",controller:"AclController",controllerAs:"acl",clickOutsideToClose:!0,escapeToClose:!0,locals:{usersWithACL:k.folder.$acl.users,User:e,folder:k.folder}})})},this.setFolderAs=function(a){this.folder.$setFolderAs(a).then(function(){k.folder.$account.$getMailboxes({reload:!0})})}}var c=e.newPanelPosition().relativeTo(this.moreOptionsButton).addPanelPosition(e.xPosition.ALIGN_START,e.yPosition.ALIGN_TOPS),k=e.newPanelAnimation().openFrom(this.moreOptionsButton).duration(100).withAnimation(e.animation.FADE),m={attachTo:angular.element(document.body),locals:{itemCtrl:this,folder:this.mailbox,confirmDelete:this.confirmDelete},bindToController:!0,controller:b,controllerAs:"$menuCtrl",position:c,animation:k,targetEvent:a,templateUrl:"UIxMailFolderMenu",trapFocus:!0,clickOutsideToClose:!0,escapeToClose:!0,focusOnOpen:!0};e.open(m).then(function(a){a.panelEl.one("click",function(){a.close()})}),b.$inject=["mdPanelRef","$state","$mdDialog","User"]}}b.$inject=["$scope","$element","$state","$mdToast","$mdPanel","$mdMedia","$mdSidenav","sgConstant","Dialog","Mailbox","encodeUriFilter"],angular.module("SOGo.MailerUI").controller("sgMailboxListItemController",b).directive("sgMailboxListItem",a)}(),function(){function a(){return{restrict:"C",scope:{},bindToController:{message:"=sgMessage"},controller:"sgMessageListItemController"}}function b(a,b,c){var d=this;this.$onInit=function(){var b=["uid","isread","isflagged","flags","subject"];this.MailboxService=c,"draft"==c.selectedFolder.type&&b.push("subject"),a.$watch(function(){return d.message?[_.pick(d.message,b)]:null},function(a,b){d.message&&d.onUpdate()},!0)},this.onUpdate=function(){this.message.isread?b.removeClass("unread"):b.addClass("unread"),c.selectedFolder.isSelectedMessage(this.message.uid,this.message.$mailbox.path)?b.addClass("md-default-theme md-accent md-bg md-hue-2"):b.removeClass("md-default-theme md-accent md-bg md-hue-2")},this.setVisibility=function(a,b){b?a.classList.remove("ng-hide"):a.classList.add("ng-hide")}}b.$inject=["$scopeLine truncated
|
||||
//# sourceMappingURL=Mailer.services.js.map
|
||||
Reference in new issue
Block a user