(js/css) Update generated files

This commit is contained in:
InverseBot committed 2018-05-08 02:12:38 -04:00
1 parent 12b2ecca72
commit 4bb407ad8d
8 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -1,2 +1,2 @@
!function(){"use strict";angular.module("SOGo.ContactsUI",["ngCookies","ui.router","angularFileUpload","ck","SOGo.Common","SOGo.PreferencesUI","SOGo.MailerUI"]).config(e).run(a),e.$inject=["$stateProvider","$urlRouterProvider"];function e(e,a){e.state("app",{url:"/addressbooks",abstract:!0,views:{addressbooks:{templateUrl:"UIxContactFoldersView",controller:"AddressBooksController",controllerAs:"app"}},resolve:{stateAddressbooks:t}}).state("app.addressbook",{url:"/:addressbookId",views:{addressbook:{templateUrl:"addressbook",controller:"AddressBookController",controllerAs:"addressbook"}},resolve:{stateAddressbook:o}}).state("app.addressbook.new",{url:"/{contactType:(?:card|list)}/new",params:{refs:{array:!0}},views:{card:{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}},resolve:{stateCard:r}}).state("app.addressbook.card",{url:"/:cardId",abstract:!0,views:{card:{template:"<ui-view/>"}},resolve:{stateCard:s},onEnter:d,onExit:n}).state("app.addressbook.card.view",{url:"/view",views:{"card@app.addressbook":{templateUrl:"UIxContactViewTemplate",controller:"CardController",controllerAs:"editor"}}}).state("app.addressbook.card.editor",{url:"/edit",views:{"card@app.addressbook":{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}}}),a.otherwise("/addressbooks/personal")}t.$inject=["AddressBook"];function t(e){return e.$findAll(window.contactFolders)}o.$inject=["$q","$state","$stateParams","AddressBook"];function o(e,t,o,r){var s=_.find(r.$findAll(),function(e){return e.id==o.addressbookId});return s?(delete s.selectedCard,s.$reload(),s):e.reject("Addressbook "+o.addressbookId+" not found")}r.$inject=["$stateParams","stateAddressbook","Card"];function r(e,t,o){var r="v"+e.contactType,s=new o({pid:e.addressbookId,c_component:r,refs:e.refs});return t.selectedCard=!0,s}s.$inject=["$state","$stateParams","stateAddressbook"];function s(e,t,o){return o.$futureAddressBookData.then(function(){var r=_.find(o.$cards,function(e){return e.id==t.cardId});if(r)return r.$reload();e.go("app.addressbook")})}d.$inject=["$stateParams","stateAddressbook"];function d(e,t){t.selectedCard=e.cardId}n.$inject=["stateAddressbook"];function n(e){delete o.selectedCard}a.$inject=["$rootScope","$log","$state"];function a(e,t,o){e.$on("$stateChangeError",function(e,r,s,d,n,a){t.error(a),o.go("app.addressbook",{addressbookId:"personal"})}),e.$on("$routeChangeError",function(e,o,r,s){t.error(e,o,r,s)})}}(),function(){"use strict";e.$inject=["$scope","$q","$window","$state","$timeout","$mdDialog","$mdToast","Account","Card","AddressBook","sgFocus","Dialog","sgSettings","sgHotkeys","stateAddressbooks","stateAddressbook"];function e(e,t,o,r,s,d,n,a,c,i,u,f,h,p,m,g){var $=this,k=[];this.$onInit=function(){i.selectedFolder=g,this.service=i,this.selectedFolder=g,this.mode={search:!1,multiple:0},(t=k).push(p.createHotkey({key:l("hotkey_search"),description:l("Search"),callback:angular.bind($,$.searchMode)})),t.push(p.createHotkey({key:l("key_create_card"),description:l("Create a new address book card"),callback:angular.bind($,$.newComponent,"card")})),t.push(p.createHotkey({key:l("key_create_list"),description:l("Create a new list"),callback:angular.bind($,$.newComponent,"list")})),t.push(p.createHotkey({key:"space",description:l("Toggle item"),callback:angular.bind($,$.toggleCardSelection)})),t.push(p.createHotkey({key:"shift+space",description:l("Toggle range of items"),callback:angular.bind($,$.toggleCardSelection)})),t.push(p.createHotkey({key:"up",description:l("View next item"),callback:b})),t.push(p.createHotkey({key:"down",description:l("View previous item"),callback:C})),t.push(p.createHotkey({key:"shift+up",description:l("Add next item to selection"),callback:v})),t.push(p.createHotkey({key:"shift+down",description:l("Add previous item to selection"),callback:w})),_.forEach(["backspace","delete"],function(e){t.push(p.createHotkey({key:e,description:l("Delete selected card or address book"),callback:angular.bind($,$.confirmDeleteSelectedCards)}))}),_.forEach(t,function(e){p.registerHotkey(e)});var t;e.$on("$destroy",function(){_.forEach(k,function(e){p.deregisterHotkey(e)})})};this.centerIsClose=function(e){return this.selectedFolder.hasSelectedCard()&&!!e},this.selectCard=function(e){r.go("app.addressbook.card.view",{cardId:e.id})},this.toggleCardSelection=function(e,t){var o,r,s,d=this.selectedFolder;if(t||(t=d.$selectedCard()),t.selected=!t.selected,this.mode.multiple+=t.selected?1:-1,e.shiftKey&&d.$selectedCount()>1){for(r=(o=d.idsMap[t.id])-2;r>=0&&!d.$cards[r].selected;)r--;if(r<0)for(r=o+2;r<d.getLength()&&!d.$cards[r].selected;)r++;if(r>=0&&r<d.getLength())for(s=Math.min(o,r);s<=Math.max(o,r);s++)d.$cards[s].selected=!0}e.preventDefault(),e.stopPropagation()},this.newComponent=function(e){r.go("app.addressbook.new",{contactType:e})},this.unselectCards=function(){_.forEach(this.selectedFolder.$cards,function(e){e.selected=!1}),this.mode.multiple=0};function b(Line truncated
!function(){"use strict";angular.module("SOGo.ContactsUI",["ngCookies","ui.router","angularFileUpload","ck","SOGo.Common","SOGo.PreferencesUI","SOGo.MailerUI"]).config(e).run(a),e.$inject=["$stateProvider","$urlRouterProvider"];function e(e,a){e.state("app",{url:"/addressbooks",abstract:!0,views:{addressbooks:{templateUrl:"UIxContactFoldersView",controller:"AddressBooksController",controllerAs:"app"}},resolve:{stateAddressbooks:t}}).state("app.addressbook",{url:"/:addressbookId",views:{addressbook:{templateUrl:"addressbook",controller:"AddressBookController",controllerAs:"addressbook"}},resolve:{stateAddressbook:o}}).state("app.addressbook.new",{url:"/{contactType:(?:card|list)}/new",params:{refs:{array:!0}},views:{card:{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}},resolve:{stateCard:r}}).state("app.addressbook.card",{url:"/:cardId",abstract:!0,views:{card:{template:"<ui-view/>"}},resolve:{stateCard:s},onEnter:d,onExit:n}).state("app.addressbook.card.view",{url:"/view",views:{"card@app.addressbook":{templateUrl:"UIxContactViewTemplate",controller:"CardController",controllerAs:"editor"}}}).state("app.addressbook.card.editor",{url:"/edit",views:{"card@app.addressbook":{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}}}),a.otherwise("/addressbooks/personal")}t.$inject=["AddressBook"];function t(e){return e.$findAll(window.contactFolders)}o.$inject=["$q","$state","$stateParams","AddressBook"];function o(e,t,o,r){var s=_.find(r.$findAll(),function(e){return e.id==o.addressbookId});return s?(delete s.selectedCard,s.$reload(),s):e.reject("Addressbook "+o.addressbookId+" not found")}r.$inject=["$stateParams","stateAddressbook","Card"];function r(e,t,o){var r="v"+e.contactType,s=new o({pid:e.addressbookId,c_component:r,refs:e.refs});return t.selectedCard=!0,s}s.$inject=["$state","$stateParams","stateAddressbook"];function s(e,t,o){return o.$futureAddressBookData.then(function(){var r=_.find(o.$cards,function(e){return e.id==t.cardId});if(r)return r.$reload();e.go("app.addressbook")})}d.$inject=["$stateParams","stateAddressbook"];function d(e,t){t.selectedCard=e.cardId}n.$inject=["stateAddressbook"];function n(e){delete o.selectedCard}a.$inject=["$rootScope","$log","$state"];function a(e,t,o){e.$on("$stateChangeError",function(e,r,s,d,n,a){t.error(a),o.go("app.addressbook",{addressbookId:"personal"})}),e.$on("$routeChangeError",function(e,o,r,s){t.error(e,o,r,s)})}}(),function(){"use strict";e.$inject=["$scope","$q","$window","$state","$timeout","$mdDialog","$mdToast","Account","Card","AddressBook","sgFocus","Dialog","sgSettings","sgHotkeys","stateAddressbooks","stateAddressbook"];function e(e,t,o,r,s,d,n,a,c,i,u,f,h,p,m,g){var $,k=this,b=[];$={c_cn:"Name",c_sn:"Lastname",c_givenname:"Firstname",c_mail:"Email",c_screenname:"Screen Name",c_o:"Organization",c_telephonenumber:"Preferred Phone"},this.$onInit=function(){i.selectedFolder=g,this.service=i,this.selectedFolder=g,this.mode={search:!1,multiple:0},(t=b).push(p.createHotkey({key:l("hotkey_search"),description:l("Search"),callback:angular.bind(k,k.searchMode)})),t.push(p.createHotkey({key:l("key_create_card"),description:l("Create a new address book card"),callback:angular.bind(k,k.newComponent,"card")})),t.push(p.createHotkey({key:l("key_create_list"),description:l("Create a new list"),callback:angular.bind(k,k.newComponent,"list")})),t.push(p.createHotkey({key:"space",description:l("Toggle item"),callback:angular.bind(k,k.toggleCardSelection)})),t.push(p.createHotkey({key:"shift+space",description:l("Toggle range of items"),callback:angular.bind(k,k.toggleCardSelection)})),t.push(p.createHotkey({key:"up",description:l("View next item"),callback:C})),t.push(p.createHotkey({key:"down",description:l("View previous item"),callback:v})),t.push(p.createHotkey({key:"shift+up",description:l("Add next item to selection"),callback:w})),t.push(p.createHotkey({key:"shift+down",description:l("Add previous item to selection"),callback:y})),_.forEach(["backspace","delete"],function(e){t.push(p.createHotkey({key:e,description:l("Delete selected card or address book"),callback:angular.bind(k,k.confirmDeleteSelectedCards)}))}),_.forEach(t,function(e){p.registerHotkey(e)});var t;e.$on("$destroy",function(){_.forEach(b,function(e){p.deregisterHotkey(e)})})};this.centerIsClose=function(e){return this.selectedFolder.hasSelectedCard()&&!!e},this.selectCard=function(e){r.go("app.addressbook.card.view",{cardId:e.id})},this.toggleCardSelection=function(e,t){var o,r,s,d=this.selectedFolder;if(t||(t=d.$selectedCard()),t.selected=!t.selected,this.mode.multiple+=t.selected?1:-1,e.shiftKey&&d.$selectedCount()>1){for(r=(o=d.idsMap[t.id])-2;r>=0&&!d.$cards[r].selected;)r--;if(r<0)for(r=o+2;r<d.getLength()&&!d.$cards[r].selected;)r++;if(r>=0&&r<d.getLength())for(s=Math.min(o,r);s<=Math.max(o,r);s++)d.$cards[s].selected=!0}e.preventDefault(),e.stopPropagation()},this.newComponent=function(e){r.go("app.addressbLine truncated
//# sourceMappingURL=Contacts.js.map
+1 -1
View File
@@ -1 +1 @@
{"version":3,"sources":["Contacts/Contacts.app.js","Contacts/AddressBookController.js","Contacts/AddressBooksController.js","Contacts/CardController.js","Contacts/sgAddress.directive.js"],"names":["angular","module","config","configure","run","runBlock","$inject","$stateProvider","$urlRouterProvider","state","url","abstract","views","addressbooks","templateUrl","controller","controllerAs","resolve","stateAddressbooks","addressbook","stateAddressbook","params","refs","array","card","stateCard","stateNewCard","template","onEnter","onEnterCard","onExit","onExitCard","card@app.addressbook","otherwise","AddressBook","$findAll","window","contactFolders","$q","$state","$stateParams","_","find","id","addressbookId","selectedCard","$reload","reject","Card","tag","contactType","pid","c_component","$futureAddressBookData","then","$cards","cardObject","cardId","go","stateMailbox","$rootScope","$log","$on","event","toState","toParams","fromState","fromParams","error","current","previous","rejection","AddressBookController","$scope","$window","$timeout","$mdDialog","$mdToast","Account","focus","Dialog","Settings","sgHotkeys","vm","this","hotkeys","$onInit","selectedFolder","service","mode","search","multiple","keys","push","createHotkey","key","l","description","callback","bind","searchMode","newComponent","toggleCardSelection","_nextCard","_previousCard","_addNextCardToSelection","_addPreviousCardToSelection","forEach","hotkey","confirmDeleteSelectedCards","registerHotkey","deregisterHotkey","centerIsClose","navController_centerIsClose","hasSelectedCard","selectCard","$event","selectedIndex","nextSelectedIndex","i","folder","$selectedCard","selected","shiftKey","$selectedCount","idsMap","getLength","Math","min","max","preventDefault","stopPropagation","type","unselectCards","index","$selectedCardIndex","isDefined","$topIndex","length","selectedCards","$selectedCards","size","confirm","ok","$deleteCards","_selectedCardsOperation","operation","dstId","srcFolder","allCards","cards","ids","clearCardView","promise","success","filter","$isCard","show","simple","content","position","hideDelay","$copyCards","$moveCards","map","indexOf","copySelectedCards","moveSelectedCards","selectAll","sort","field","$filter","sortedBy","$query","cancelSearch","newMessage","recipients","recipientsField","accounts","account","o","$getMailboxes","mailboxes","$newMessage","message","editable","parent","element","document","body","targetEvent","clickOutsideToClose","escapeToClose","locals","stateAccount","stateMessage","newMessageWithRecipient","recipient","fn","newMessageWithSelectedCards","promises","$isList","expandable","ref","email","$shortFormat","c_mail","all","uniq","newListWithSelectedCards","$$email","uniqBy","reference","AddressBooksController","$mdMedia","$mdSidenav","FileUploader","sgConstant","User","activeUser","select","editMode","value","close","newAddressbook","prompt","name","isEditable","isRemote","owner","UserLogin","$add","edit","originalAddressbook","$omit","revertEditing","save","$rename","data","status","alert","confirmDelete","importCards","CardsImportDialogController","scope","uploader","ApplicationBaseURL","join","autoUpload","queueLimit","filters","filterByExtension","onSuccessItem","item","response","headers","msg","hide","imported","onErrorItem","isTextFile","test","showLinks","urls","when","$reloadAll","LinksDialogController","showProperties","PropertiesDialogController","srcAddressBook","catch","saveProperties","$save","init","cancel","share","$acl","$users","usersWithACL","users","subscribeToFolder","addressbookData","console","debug","$subscribe","isDroppableFolder","dstFolder","isOwned","acls","objectCreator","dragSelectedCards","isSubscription","$delete","statusText","CardController","sgSettings","currentFolder","allEmailTypes","$EMAIL_TYPES","allTelTypes","$TEL_TYPES","allUrlTypes","$URL_TYPES","allAddressTypes","$ADDRESS_TYPES","categories","userFilterResults","transformCategory","input","isString","removeAttribute","form","attribute","$setDirty","addOrg","$addOrg","addBirthday","birthday","Date","addScreenName","$addScreenName","addEmail","$addEmail","addPhone","$addPhone","addUrl","$addUrl","addAddress","$addAddress","canAddCustomField","customFields","addCustomField","availableKeys","pullAll","deleteCustomField","userFilter","excludedCards","minimumSearchLength","dry","excludeLists","$valid","copy","reset","$reset","$setPristine","isNew","toggleRawSource","showRawSource","rawSource","$$resource","post","hasCertificate","$certificate","crt","certificate","$fullname","directive","restrict","addressLines","lines","locality_region","street","street2","locality","region","country","postalcode"],"mappings":"CAGA,WACE,aAEAA,QAAQC,OAAO,mBAAoB,YAAa,YAAa,oBAAqB,KAAM,cAAe,qBAAsB,kBAC1HC,OAAOC,GACPC,IAAIC,GAKPF,EAAUG,SAAW,iBAAkB,sBACvC,SAASH,EAAUI,EAAgBC,GACjCD,EACGE,MAAM,OACLC,IAAK,gBACLC,UAAU,EACVC,OACEC,cACEC,YAAa,wBACbC,WAAY,yBACZC,aAAc,QAGlBC,SACEC,kBAAmBA,KAGtBT,MAAM,mBACLC,IAAK,kBACLE,OACEO,aACEL,YAAa,cACbC,WLine truncated
{"version":3,"sources":["Contacts/Contacts.app.js","Contacts/AddressBookController.js","Contacts/AddressBooksController.js","Contacts/CardController.js","Contacts/sgAddress.directive.js"],"names":["angular","module","config","configure","run","runBlock","$inject","$stateProvider","$urlRouterProvider","state","url","abstract","views","addressbooks","templateUrl","controller","controllerAs","resolve","stateAddressbooks","addressbook","stateAddressbook","params","refs","array","card","stateCard","stateNewCard","template","onEnter","onEnterCard","onExit","onExitCard","card@app.addressbook","otherwise","AddressBook","$findAll","window","contactFolders","$q","$state","$stateParams","_","find","id","addressbookId","selectedCard","$reload","reject","Card","tag","contactType","pid","c_component","$futureAddressBookData","then","$cards","cardObject","cardId","go","stateMailbox","$rootScope","$log","$on","event","toState","toParams","fromState","fromParams","error","current","previous","rejection","AddressBookController","$scope","$window","$timeout","$mdDialog","$mdToast","Account","focus","Dialog","Settings","sgHotkeys","sortLabels","vm","this","hotkeys","c_cn","c_sn","c_givenname","c_mail","c_screenname","c_o","c_telephonenumber","$onInit","selectedFolder","service","mode","search","multiple","keys","push","createHotkey","key","l","description","callback","bind","searchMode","newComponent","toggleCardSelection","_nextCard","_previousCard","_addNextCardToSelection","_addPreviousCardToSelection","forEach","hotkey","confirmDeleteSelectedCards","registerHotkey","deregisterHotkey","centerIsClose","navController_centerIsClose","hasSelectedCard","selectCard","$event","selectedIndex","nextSelectedIndex","i","folder","$selectedCard","selected","shiftKey","$selectedCount","idsMap","getLength","Math","min","max","preventDefault","stopPropagation","type","unselectCards","index","$selectedCardIndex","isDefined","$topIndex","length","selectedCards","$selectedCards","size","confirm","ok","$deleteCards","_selectedCardsOperation","operation","dstId","srcFolder","allCards","cards","ids","clearCardView","promise","success","filter","$isCard","show","simple","content","position","hideDelay","$copyCards","$moveCards","map","indexOf","copySelectedCards","moveSelectedCards","selectAll","sort","field","$query","$filter","sortedBy","ascending","asc","cancelSearch","newMessage","recipients","recipientsField","accounts","account","o","$getMailboxes","mailboxes","$newMessage","message","editable","parent","element","document","body","targetEvent","clickOutsideToClose","escapeToClose","locals","stateAccount","stateMessage","newMessageWithRecipient","recipient","fn","newMessageWithSelectedCards","promises","$isList","expandable","ref","email","$shortFormat","all","uniq","newListWithSelectedCards","$$email","uniqBy","reference","AddressBooksController","$mdMedia","$mdSidenav","FileUploader","sgConstant","User","activeUser","select","editMode","value","close","newAddressbook","prompt","name","isEditable","isRemote","owner","UserLogin","$add","edit","originalAddressbook","$omit","revertEditing","save","$rename","data","status","alert","confirmDelete","importCards","CardsImportDialogController","scope","uploader","ApplicationBaseURL","join","autoUpload","queueLimit","filters","filterByExtension","onSuccessItem","item","response","headers","msg","hide","imported","onErrorItem","isTextFile","test","showLinks","urls","when","$reloadAll","LinksDialogController","showProperties","PropertiesDialogController","srcAddressBook","catch","saveProperties","$save","init","cancel","share","$acl","$users","usersWithACL","users","subscribeToFolder","addressbookData","console","debug","$subscribe","isDroppableFolder","dstFolder","isOwned","acls","objectCreator","dragSelectedCards","isSubscription","$delete","statusText","CardController","sgSettings","currentFolder","allEmailTypes","$EMAIL_TYPES","allTelTypes","$TEL_TYPES","allUrlTypes","$URL_TYPES","allAddressTypes","$ADDRESS_TYPES","categories","userFilterResults","transformCategory","input","isString","removeAttribute","form","attribute","$setDirty","addOrg","$addOrg","addBirthday","birthday","Date","addScreenName","$addScreenName","addEmail","$addEmail","addPhone","$addPhone","addUrl","$addUrl","addAddress","$addAddress","canAddCustomField","customFields","addCustomField","availableKeys","pullAll","deleteCustomField","userFilter","excludedCards","minimumSearchLength","dry","excludeLists","$valid","copy","reset","$reset","$setPristine","isNew","toggleRawSource","showRawSource","rawSource","$$resource","post","hasCertificate","$certificate","crt","certificate","$fullname","directive","restrict","addressLines","lines","locality_region","street","street2","locality","region","country","postalcode"],"mappings":"CAGA,WACE,aAEAA,QAAQC,OAAO,mBAAoB,YAAa,YAAa,oBAAqB,KAAM,cAAe,qBAAsB,kBAC1HC,OAAOC,GACPC,IAAIC,GAKPF,EAAUG,SAAW,iBAAkB,sBACvC,SAASH,EAAUI,EAAgBC,GACjCD,EACGE,MAAM,OACLC,IAAK,gBACLC,UAAU,EACVC,OACEC,cACEC,YAAa,Line truncated
+1 -1
View File
@@ -1,2 +1,2 @@
!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 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
//# sourceMappingURL=Mailer.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","forEach","identities","identity","fullName","full","email","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","fetch","o","collection","i","id","$accounts","prototype","getLength","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","_this","$mailboxes","reload","$find","$expanded","expandedFolders","_visit","mailboxes","indexOf","children","settings","Mail","ExpandedFolders","isString","fromJson","warn","when","allMailboxes","push","all","$$flattenMailboxes","saveState","account","reduce","mailbox","post","$getMailboxByType","type","_find","find","$getMailboxByPath","path","$newMailbox","name","toString","$certificate","security","hasCertificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","defaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","map","delegates","resolve","users","status","promise","$removeDelegate","splice","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","quotas","split","component","asCSSIdentifier","join","isUndefined","uidsMap","headers","$isLoading","$messages","$id","$acl","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","$omit","selectFolder","$lastVisibleIndex","max","$loadMessage","$selectedMessages","filter","selected","$selectedCount","isSelectedMessage","messageId","selectedMessage","$selectedMessage","$selectedMessageIndex","hasSelectedMessage","isDefined","$filter","sortingAttributes","filters","unseenCount","cancel","searchInput","secondFilter","match","searchBy","copy","refreshViewCheck","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","isNoSelect","getClassName","base","$rename","findParent","parent","parentMailbox","$save","sibling","oldPath","localeCompare","pathRE","RegExp","_updateChildren","child","replace","$compact","$canFolderAs","$setFolderAs","$emptyTrash","$markAsRead","isread","$flagMessages","messages","operation","msgUIDs","saveSelectedMessages","selectedMessages","selectedUIDs","filename","download","exportFolder","$delete","$_deleteMessages","unseen","firstIndex","forEachRight","selectedIndex","findIndex","$deleteMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","value","key","save","response","error","$futureMailboxData","$topIndex","invokeMap","threaded","msgs","msg","msgObject","zipObject","isError","j","messageHeaders","$updateSubscribe","action","subscribed","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","$formatFullAddresses","Message_STATUS","STATUS","$avatar","avatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","filterTags","query","excludedTags","re","results","keys","tag","pair","search","includes","color","buildPath","nocache","draftId","withResourcePath","$setUID","oldUID","attr","constructor","shortname","first","last","image","$shortRecipients","result","count","total","$shortAddress","address","allowReplyAll","recipientsCount","isDraft","loadUnsafeContent","$parts","$content","parts","part","msgclass","content","alternatePart","preferredPart","contentType","isArray","signed","valid","certificate","certificates","encrypted","mixedPart","safeContent","html","unsafeContent","document","createElement","innerHTML","suffix","element","elements","querySelectorAll","removeAttr","compile","$editableContent","from","toLowerCase","text","$plainContent","addTag","$addOrRemoveTag","removeTag"Line truncated
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/sgImageGallery.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgAccountSection.directive.js","Mailer/sgIMIP.directive.js","Mailer/sgMailboxListItem.directive.js","Mailer/sgMessageListItem.directive.js","Mailer/sgMessageListItemMain.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","forEach","identities","identity","fullName","full","email","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","fetch","o","collection","i","id","$accounts","prototype","getLength","$flattenMailboxes","length","getItemAtIndex","index","expandedMailboxes","$getMailboxes","options","_this","$mailboxes","reload","$find","$expanded","expandedFolders","_visit","mailboxes","indexOf","children","settings","Mail","ExpandedFolders","isString","fromJson","warn","when","allMailboxes","push","all","$$flattenMailboxes","saveState","account","reduce","mailbox","post","$getMailboxByType","type","_find","find","$getMailboxByPath","path","$newMailbox","name","toString","$certificate","security","hasCertificate","$$certificate","reject","$removeCertificate","updateQuota","percent","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","accountId","mailboxPath","message","$absolutePath","asDraft","accountDefaults","defaults","AuxiliaryMailAccounts","alwaysSign","sign","alwaysEncrypt","encrypt","editable","isNew","mailto","isObject","$parseMailto","$addDelegate","user","deferred","defer","param","uid","map","delegates","resolve","users","status","promise","$removeDelegate","splice","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","$virtualPath","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","quotas","split","component","asCSSIdentifier","join","isUndefined","uidsMap","headers","$isLoading","$messages","$id","$acl","$displayName","$isEditable","isEditable","$isSpecial","$icon","$isNoInferiors","isNoInferiors","$shadowData","$omit","selectFolder","$lastVisibleIndex","max","$loadMessage","$selectedMessages","filter","selected","$selectedCount","isSelectedMessage","messageId","selectedMessage","$selectedMessage","$selectedMessageIndex","hasSelectedMessage","isDefined","$filter","sortingAttributes","filters","unseenCount","cancel","searchInput","secondFilter","match","searchBy","copy","refreshViewCheck","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","isNoSelect","getClassName","base","$rename","findParent","parent","parentMailbox","$save","sibling","oldPath","localeCompare","pathRE","RegExp","_updateChildren","child","replace","$compact","$canFolderAs","$setFolderAs","$emptyTrash","$markAsRead","isread","$flagMessages","messages","operation","msgUIDs","saveSelectedMessages","selectedMessages","selectedUIDs","filename","download","exportFolder","$delete","$_deleteMessages","unseen","firstIndex","forEachRight","selectedIndex","findIndex","$deleteMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","value","key","save","response","error","$futureMailboxData","$topIndex","invokeMap","threaded","msgs","msg","msgObject","zipObject","isError","j","messageHeaders","$updateSubscribe","action","subscribed","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","$formatFullAddresses","Message_STATUS","STATUS","$avatar","avatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","filterTags","query","excludedTags","re","results","keys","tag","pair","search","includes","color","buildPath","nocache","draftId","withResourcePath","$setUID","oldUID","attr","constructor","shortname","first","last","image","$shortRecipients","result","count","total","$shortAddress","address","allowReplyAll","recipientsCount","isDraft","loadUnsafeContent","$parts","$content","parts","part","msgclass","content","alternatePart","preferredPart","contentType","isArray","signed","valid","certificate","certificates","encrypted","mixedPart","safeContent","html","unsafeContent","document","createElement","innerHTML","suffix","element","elements","querySelectorAll","removeAttr","compile","$editableContent","from","toLowerCase","text","$plainContent","addTag","$addOrRemoveTag","removeTag"Line truncated
@@ -1,2 +1,2 @@
!function(){"use strict";function e(t){if(this.init(t),this.name&&!this.id){var n=e.$$resource.create("createFolder",this.name);this.$unwrap(n)}}e.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Component","Acl",function(t,n,a,o,i,r,s,c){return angular.extend(e,{$q:t,$timeout:n,$log:a,$$resource:new i(o.activeUser("folderURL")+"Calendar",o.activeUser()),$Preferences:r,$Component:s,$$Acl:c,activeUser:o.activeUser(),$view:null}),e}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").value("CalendarSettings",{EventDragDayLength:96,EventDragHorizontalOffset:3,ConflictHTTPErrorCode:409}).factory("Calendar",e.$factory),e.$defaultCalendar=function(){var t;return"first"==e.$Preferences.defaults.SOGoDefaultCalendar&&(t=_.find(e.$findAll(null,!0),function(e){return e.active}))?t.id:"personal"},e.$add=function(t){var n,a;n=t.isWebCalendar?this.$webcalendars:t.isSubscription?this.$subscriptions:this.$calendars,(a=_.findIndex(n,function(e,n){return"personal"==t.id||"personal"!=e.id&&e.name.localeCompare(t.name)>0}))<0?n.push(t):n.splice(a,0,t),e.$Preferences.settings.Calendar.FoldersOrder&&e.saveFoldersOrder(_.flatMap(e.$findAll(),"id")),e.$reloadAll()},e.$findAll=function(t,n){var a=this;if(t)this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],angular.forEach(t,function(t,n){var o=new e(t);o.isWebCalendar?a.$webcalendars.push(o):o.isSubscription?a.$subscriptions.push(o):a.$calendars.push(o)});else if(angular.isUndefined(this.$calendars))return this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],e.$$resource.fetch("calendarslist").then(function(t){return e.$findAll(t.calendars,n)});return n?_.union(this.$calendars,_.filter(this.$subscriptions,function(e){return e.isOwned||e.acls.objectCreator})):_.union(this.$calendars,this.$subscriptions,this.$webcalendars)},e.$reloadAll=function(){var t=this;e.$$resource.fetch("calendarslist").then(function(n){_.forEach(n.calendars,function(n){var a,o;a=n.isWebCalendar?t.$webcalendars:n.owner!=e.activeUser.login?t.$subscriptions:t.$calendars,(o=_.find(a,function(e){return e.id==n.id}))&&o.init(n)})})},e.$get=function(t){var n;return(n=_.find(e.$calendars,function(e){return e.id==t}))||(n=_.find(e.$subscriptions,function(e){return e.id==t})),n||(n=_.find(e.$webcalendars,function(e){return e.id==t})),n},e.$getIndex=function(t){var n;return(n=_.indexOf(_.map(e.$calendars,"id"),t))<0&&(n=_.indexOf(_.map(e.$subscriptions,"id"),t)),n<0&&(n=_.indexOf(_.map(e.$webcalendars,"id"),t)),n},e.$subscribe=function(t,n){var a=this;return e.$$resource.userResource(t).fetch(n,"subscribe").then(function(t){var n=new e(angular.extend({active:1},t));return _.find(a.$subscriptions,function(e){return e.id==t.id})||e.$add(n),n})},e.$addWebCalendar=function(t){var n=e.$q.defer();return _.find(this.$webcalendars,function(e){return e.urls.webCalendarURL==t})?n.reject():e.$$resource.post(null,"addWebCalendar",{url:t}).then(function(a){angular.extend(a,{isWebCalendar:!0,isEditable:!0,isRemote:!1,owner:e.activeUser.login,urls:{webCalendarURL:t}});var o=new e(a);e.$$resource.fetch(o.id,"reload").then(function(t){e.$log.debug(JSON.stringify(t,void 0,2)),e.$add(o),n.resolve()},function(e){401==e.status?n.resolve(o):n.reject()})},n.reject),n.promise},e.reloadWebCalendars=function(){var t=[];return _.forEach(this.$webcalendars,function(n){var a=e.$$resource.fetch(n.id,"reload");a.then(function(e){n.$error=!1},function(e){n.$error=l(e.statusText)}),t.push(a)}),e.$q.all(t)},e.$deleteComponents=function(t){var n={},a=[];return _.forEach(t,function(e){angular.isDefined(n[e.pid])||(n[e.pid]=[]),n[e.pid].push(e.id)}),_.forEach(n,function(t,n){a.push(e.$$resource.post(n,"batchDelete",{uids:t}))}),e.$q.all(a)},e.saveFoldersActivation=function(t){var n={};return _.forEach(t,function(t){var a=e.$get(t);n[a.id]=a.active}),e.$$resource.post(null,"saveFoldersActivation",n)},e.saveFoldersOrder=function(t){return this.$$resource.post(null,"saveFoldersOrder",{folders:t}).then(function(){if(e.$Preferences.settings.Calendar.FoldersOrder=t,!t)return e.$$resource.fetch("calendarslist").then(function(t){return e.$findAll(t.calendars)})})},e.prototype.init=function(t){this.color=this.color||"#AAAAAA",this.active=1,angular.extend(this,t),this.id&&(this.$acl=new e.$$Acl("Calendar/"+this.id)),this.isOwned=e.activeUser.isSuperUser||this.owner==e.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=e.activeUser.login,angular.isUndefined(this.$shadowData)&&(this.$shadowData=this.$omit())},e.prototype.$id=function(){return this.id?e.$q.when(this.id):this.$futureCalendarData.then(function(e){return e.id})},e.prototype.getClassName=function(e){return angular.isUndefined(e)&&(e="fg"),e+"-folder"+this.id},e.prototype.$rename=function(){var t,n,a=this;return this.name==this.$shadowData.name?e.$q.when():(n=this.isWebCalendar?e.$webcalendars:this.isSubscription?e.$subscriptions:e.$calendars,(t=_.indexOf(_.map(n,"Line truncated
!function(){"use strict";function e(t){if(this.init(t),this.name&&!this.id){var n=e.$$resource.create("createFolder",this.name);this.$unwrap(n)}}e.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Component","Acl",function(t,n,a,o,i,r,s,c){return angular.extend(e,{$q:t,$timeout:n,$log:a,$$resource:new i(o.activeUser("folderURL")+"Calendar",o.activeUser()),$Preferences:r,$Component:s,$$Acl:c,activeUser:o.activeUser(),$view:null}),e}];try{angular.module("SOGo.SchedulerUI")}catch(e){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").value("CalendarSettings",{EventDragDayLength:96,EventDragHorizontalOffset:3,ConflictHTTPErrorCode:409}).factory("Calendar",e.$factory),e.$defaultCalendar=function(){var t;return"first"==e.$Preferences.defaults.SOGoDefaultCalendar&&(t=_.find(e.$findAll(null,!0),function(e){return e.active}))?t.id:"personal"},e.$add=function(t){var n,a;n=t.isWebCalendar?this.$webcalendars:t.isSubscription?this.$subscriptions:this.$calendars,(a=_.findIndex(n,function(e,n){return"personal"==t.id||"personal"!=e.id&&e.name.localeCompare(t.name)>0}))<0?n.push(t):n.splice(a,0,t),e.$Preferences.settings.Calendar.FoldersOrder&&e.saveFoldersOrder(_.flatMap(e.$findAll(),"id")),e.$reloadAll()},e.$findAll=function(t,n){var a=this;if(t)this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],angular.forEach(t,function(t,n){var o=new e(t);o.isWebCalendar?a.$webcalendars.push(o):o.isSubscription?a.$subscriptions.push(o):a.$calendars.push(o)});else if(angular.isUndefined(this.$calendars))return this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],e.$$resource.fetch("calendarslist").then(function(t){return e.$findAll(t.calendars,n)});return n?_.union(this.$calendars,_.filter(this.$subscriptions,function(e){return e.isOwned||e.acls.objectCreator})):_.union(this.$calendars,this.$subscriptions,this.$webcalendars)},e.$reloadAll=function(){var t=this;e.$$resource.fetch("calendarslist").then(function(n){_.forEach(n.calendars,function(n){var a,o;a=n.isWebCalendar?t.$webcalendars:n.owner!=e.activeUser.login?t.$subscriptions:t.$calendars,(o=_.find(a,function(e){return e.id==n.id}))&&o.init(n)})})},e.$get=function(t){var n;return(n=_.find(e.$calendars,function(e){return e.id==t}))||(n=_.find(e.$subscriptions,function(e){return e.id==t})),n||(n=_.find(e.$webcalendars,function(e){return e.id==t})),n},e.$getIndex=function(t){var n;return(n=_.indexOf(_.map(e.$calendars,"id"),t))<0&&(n=_.indexOf(_.map(e.$subscriptions,"id"),t)),n<0&&(n=_.indexOf(_.map(e.$webcalendars,"id"),t)),n},e.$subscribe=function(t,n){var a=this;return e.$$resource.userResource(t).fetch(n,"subscribe").then(function(t){var n=new e(angular.extend({active:1},t));return _.find(a.$subscriptions,function(e){return e.id==t.id})||e.$add(n),n})},e.$addWebCalendar=function(t){var n=e.$q.defer();return _.find(this.$webcalendars,function(e){return e.urls.webCalendarURL==t})?n.reject():e.$$resource.post(null,"addWebCalendar",{url:t}).then(function(a){angular.extend(a,{isWebCalendar:!0,isEditable:!0,isRemote:!1,owner:e.activeUser.login,urls:{webCalendarURL:t}});var o=new e(a);e.$$resource.fetch(o.id,"reload").then(function(t){e.$log.debug(JSON.stringify(t,void 0,2)),e.$add(o),n.resolve()},function(e){401==e.status?n.resolve(o):n.reject()})},n.reject),n.promise},e.reloadWebCalendars=function(){var t=[];return _.forEach(this.$webcalendars,function(n){var a=e.$$resource.fetch(n.id,"reload");a.then(function(e){n.$error=!1},function(e){n.$error=l(e.statusText)}),t.push(a)}),e.$q.all(t)},e.$deleteComponents=function(t){var n={},a=[];return _.forEach(t,function(e){angular.isDefined(n[e.pid])||(n[e.pid]=[]),n[e.pid].push(e.id)}),_.forEach(n,function(t,n){a.push(e.$$resource.post(n,"batchDelete",{uids:t}))}),e.$q.all(a)},e.saveFoldersActivation=function(t){var n={};return _.forEach(t,function(t){var a=e.$get(t);n[a.id]=a.active}),e.$$resource.post(null,"saveFoldersActivation",n)},e.saveFoldersOrder=function(t){return this.$$resource.post(null,"saveFoldersOrder",{folders:t}).then(function(){if(e.$Preferences.settings.Calendar.FoldersOrder=t,!t)return e.$$resource.fetch("calendarslist").then(function(t){return e.$findAll(t.calendars)})})},e.prototype.init=function(t){this.color=this.color||"#AAAAAA",this.active=1,angular.extend(this,t),this.id&&(this.$acl=new e.$$Acl("Calendar/"+this.id)),this.isOwned=e.activeUser.isSuperUser||this.owner==e.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=e.activeUser.login,angular.isUndefined(this.$shadowData)&&(this.$shadowData=this.$omit())},e.prototype.$id=function(){return this.id?e.$q.when(this.id):this.$futureCalendarData.then(function(e){return e.id})},e.prototype.getClassName=function(e){return angular.isUndefined(e)&&(e="fg"),e+"-folder"+this.id},e.prototype.$rename=function(){var t,n,a=this;return this.name==this.$shadowData.name?e.$q.when():(n=this.isWebCalendar?e.$webcalendars:this.isSubscription?e.$subscriptions:e.$calendars,(t=_.indexOf(_.map(n,"Line truncated
//# sourceMappingURL=Scheduler.services.js.map
@@ -1 +1 @@
{"version":3,"sources":["Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarListEvent.directive.js","Scheduler/sgCalendarListItem.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgCategoryStylesheet.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js","Scheduler/sgNowLine.directive.js"],"names":["Calendar","futureCalendarData","this","init","name","id","newCalendarData","$$resource","create","$unwrap","$factory","$q","$timeout","$log","Settings","Resource","Preferences","Component","Acl","angular","extend","activeUser","$Preferences","$Component","$$Acl","$view","module","e","value","EventDragDayLength","EventDragHorizontalOffset","ConflictHTTPErrorCode","factory","$defaultCalendar","calendar","defaults","SOGoDefaultCalendar","_","find","$findAll","active","$add","list","sibling","isWebCalendar","$webcalendars","isSubscription","$subscriptions","$calendars","findIndex","o","i","localeCompare","push","splice","settings","FoldersOrder","saveFoldersOrder","flatMap","$reloadAll","data","writable","_this","forEach","isUndefined","fetch","then","calendars","union","filter","isOwned","acls","objectCreator","calendarData","group","owner","login","$get","$getIndex","indexOf","map","$subscribe","uid","path","userResource","$addWebCalendar","url","d","defer","urls","webCalendarURL","reject","post","isEditable","isRemote","debug","JSON","stringify","undefined","resolve","response","status","promise","reloadWebCalendars","promises","$error","l","statusText","all","$deleteComponents","components","component","isDefined","pid","uids","saveFoldersActivation","ids","request","folders","prototype","color","$acl","isSuperUser","$shadowData","$omit","$id","when","$futureCalendarData","getClassName","base","$rename","$save","$delete","remove","$reset","key","save","error","setCredentials","username","password","export","options","type","filename","download","$setActivation","$getComponent","componentId","recurrenceId","$find","isError","isObject","futureComponentData","newComponentData","newguid","isNew","$rootScope","Component_STATUS","User","Card","Gravatar","STATUS","$settings","$User","$Card","$gravatar","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","EventsFilterState","TasksFilterState","EventsSortingState","parseInt","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","constant","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","$selectedCount","count","$events","event","selected","length","$tasks","task","$startRefreshTimeout","cancel","refreshViewCheck","SOGoRefreshViewCheck","f","bind","$emit","timeInterval","$isLoading","$loaded","$filter","otherType","now","Date","day","getDate","month","getMonth","year","getFullYear","queryKey","capitalize","params","dirty","keys","$unwrapCollection","calendarId","occurrenceId","encodeURIComponent","join","filterCategories","query","re","RegExp","category","saveSelectedList","componentType","$eventsBlocksForView","view","date","firstDayOfWeek","viewAction","startDate","endDate","SOGoFirstDayOfWeek","beginOfWeek","setTime","getTime","addDays","setDate","setMonth","endOfWeek","$eventsBlocks","j","dayDates","dayNumbers","deferred","toLowerCase","sd","getDayString","ed","views","reduceComponent","associateComponent","objects","eventData","componentData","zipObject","eventsFields","start","c_startdate","hour","getHourString","blocks","block","nbr","isFirst","$views","viewIndex","viewData","allDayBlocks","reduce","events","flatten","days","dayIndex","dayNumber","calendarName","fields","invokeMap","monthData","dayData","$resetGhost","pointerHandler","startHour","endHour","$parseDate","dateString","time","substring","split","no_time","categories","repeat","alarm","action","quantity","unit","reference","relation","delta","isString","setMinutes","Math","round","getMinutes","end","minutesTo","setDelta","dueDate","due","completedDate","completed","c_category","$isRecurrent","byDayMask","occurrence","frequency","byday","toString","dates","rdate","rdates","interval","monthdays","months","until","$hasCustomRepeat","hasCustomRepeat","classification","match","exec","SOGoCalendarDefaultReminder","$hasAlarm","M","H","D","W","sendAppointmentNotifications","SOGoAppointmentSendEMailNotifications","destinationCalendar","attendees","attendee","image","email","updateFreeBusy","initOrganizer","results","organizer","cn","c_email","updateFreeBusyAttendee","isReadOnly","isEditableOccurrence","isInvitationLine truncated
{"version":3,"sources":["Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarListEvent.directive.js","Scheduler/sgCalendarListItem.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgCategoryStylesheet.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js","Scheduler/sgNowLine.directive.js"],"names":["Calendar","futureCalendarData","this","init","name","id","newCalendarData","$$resource","create","$unwrap","$factory","$q","$timeout","$log","Settings","Resource","Preferences","Component","Acl","angular","extend","activeUser","$Preferences","$Component","$$Acl","$view","module","e","value","EventDragDayLength","EventDragHorizontalOffset","ConflictHTTPErrorCode","factory","$defaultCalendar","calendar","defaults","SOGoDefaultCalendar","_","find","$findAll","active","$add","list","sibling","isWebCalendar","$webcalendars","isSubscription","$subscriptions","$calendars","findIndex","o","i","localeCompare","push","splice","settings","FoldersOrder","saveFoldersOrder","flatMap","$reloadAll","data","writable","_this","forEach","isUndefined","fetch","then","calendars","union","filter","isOwned","acls","objectCreator","calendarData","group","owner","login","$get","$getIndex","indexOf","map","$subscribe","uid","path","userResource","$addWebCalendar","url","d","defer","urls","webCalendarURL","reject","post","isEditable","isRemote","debug","JSON","stringify","undefined","resolve","response","status","promise","reloadWebCalendars","promises","$error","l","statusText","all","$deleteComponents","components","component","isDefined","pid","uids","saveFoldersActivation","ids","request","folders","prototype","color","$acl","isSuperUser","$shadowData","$omit","$id","when","$futureCalendarData","getClassName","base","$rename","$save","$delete","remove","$reset","key","save","error","setCredentials","username","password","export","options","type","filename","download","$setActivation","$getComponent","componentId","recurrenceId","$find","isError","isObject","futureComponentData","newComponentData","newguid","isNew","$rootScope","Component_STATUS","User","Card","Gravatar","STATUS","$settings","$User","$Card","$gravatar","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","EventsFilterState","TasksFilterState","EventsSortingState","parseInt","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","constant","NOT_LOADED","DELAYED_LOADING","LOADING","LOADED","DELAYED_MS","$selectedCount","count","$events","event","selected","length","$tasks","task","$startRefreshTimeout","cancel","refreshViewCheck","SOGoRefreshViewCheck","f","bind","$emit","timeInterval","$isLoading","$loaded","$filter","otherType","now","Date","day","getDate","month","getMonth","year","getFullYear","queryKey","capitalize","params","dirty","keys","$unwrapCollection","calendarId","occurrenceId","encodeURIComponent","join","filterCategories","query","re","RegExp","category","saveSelectedList","componentType","$eventsBlocksForView","view","date","firstDayOfWeek","viewAction","startDate","endDate","SOGoFirstDayOfWeek","beginOfWeek","setTime","getTime","addDays","setDate","setMonth","endOfWeek","$eventsBlocks","j","dayDates","dayNumbers","deferred","toLowerCase","sd","getDayString","ed","views","reduceComponent","associateComponent","objects","eventData","componentData","zipObject","eventsFields","start","c_startdate","hour","getHourString","blocks","block","nbr","isFirst","$views","viewIndex","viewData","allDayBlocks","reduce","events","flatten","days","dayIndex","dayNumber","calendarName","fields","invokeMap","monthData","dayData","$resetGhost","pointerHandler","startHour","endHour","$parseDate","dateString","time","substring","split","no_time","categories","repeat","alarm","action","quantity","unit","reference","relation","delta","isString","setMinutes","Math","round","getMinutes","end","minutesTo","setDelta","dueDate","due","completedDate","completed","c_category","$isRecurrent","byDayMask","occurrence","frequency","byday","toString","dates","rdate","rdates","interval","monthdays","months","until","$hasCustomRepeat","hasCustomRepeat","classification","match","exec","SOGoCalendarDefaultReminder","$hasAlarm","M","H","D","W","sendAppointmentNotifications","SOGoAppointmentSendEMailNotifications","destinationCalendar","attendees","attendee","image","email","updateFreeBusy","initOrganizer","results","organizer","cn","c_email","updateFreeBusyAttendee","isReadOnly","isEditableOccurrence","isInvitationLine truncated