mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-20 10:28:12 +00:00
chore(js/css): update generated files
This commit is contained in:
1 parent
5300bb71b7
commit
84038033ba
14 files changed
+14
-14
No files matched your search
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function l(t){var e;"function"!=typeof t.then?(this.init(t),this.name&&!this.id?(e=l.$$resource.create("createFolder",this.name),this.$unwrap(e),this.acls={objectEditor:1,objectCreator:1,objectEraser:1}):this.id&&(this.$acl=new l.$$Acl("Contacts/"+this.id))):this.$unwrap(t)}l.$factory=["$q","$timeout","$log","sgSettings","sgAddressBook_PRELOAD","Resource","Card","Acl","Preferences",function(t,e,i,r,s,n,o,a,d){return angular.extend(l,{$q:t,$timeout:e,$log:i,PRELOAD:s,$$resource:new n(r.activeUser("folderURL")+"Contacts",r.activeUser()),$Card:o,$$Acl:a,$Preferences:d,$query:{value:"",sort:"c_cn",asc:1},activeUser:r.activeUser(),$addressbooks:[],$subscriptions:[],$remotes:[],selectedFolder:null,$refreshTimeout:null}),d.settings.Contact.SortingState&&(l.$query.sort=d.settings.Contact.SortingState[0],l.$query.asc=parseInt(d.settings.Contact.SortingState[1])),l}];try{angular.module("SOGo.ContactsUI")}catch(t){angular.module("SOGo.ContactsUI",["SOGo.Common","SOGo.PreferencesUI"])}angular.module("SOGo.ContactsUI").constant("sgAddressBook_PRELOAD",{LOOKAHEAD:50,SIZE:100}).factory("AddressBook",l.$factory),l.$filterAll=function(n,o,t,a){var e={search:n};return n?(angular.isUndefined(o)&&(o=[]),angular.extend(e,t),l.$$resource.fetch(null,"allContactSearch",e).then(function(t){for(var e,i=function(t){return this.id==t.id},r=a?_.filter(t.contacts,function(t){return _.isUndefined(_.find(a,_.bind(i,t)))}):t.contacts,s=o.length-1;0<=s;s--)e=o[s],_.isUndefined(_.find(r,_.bind(i,e)))&&o.splice(s,1);return _.forEach(r,function(t,e){_.isUndefined(_.find(o,_.bind(i,t)))&&(t=new l.$Card(_.mapKeys(t,function(t,e){return e.toLowerCase()}),n),o.splice(e,0,t))}),l.$log.debug(o),o})):l.$q.when(o=[])},l.$add=function(e){var t=e.isSubscription?this.$subscriptions:this.$addressbooks,i=_.find(t,function(t){return"personal"==e.id||"personal"!=t.id&&1===t.name.localeCompare(e.name)}),i=i?_.indexOf(_.map(t,"id"),i.id):1;t.splice(i,0,e)},l.$findAll=function(t){var i=this;if(t&&t.length)this.$addressbooks.splice(0,this.$addressbooks.length),this.$subscriptions.splice(0,this.$subscriptions.length),this.$remotes.splice(0,this.$remotes.length),angular.forEach(t,function(t,e){t=new l(t);(t.isRemote?i.$remotes:t.isSubscription?i.$subscriptions:i.$addressbooks).push(t)});else if(angular.isArray(t))return l.$$resource.fetch("addressbooksList").then(function(t){return l.$findAll(t.addressbooks)});return _.union(this.$addressbooks,this.$subscriptions,this.$remotes)},l.$subscribe=function(t,e){var i=this;return l.$$resource.userResource(t).fetch(e,"subscribe").then(function(e){var t=new l(e);return _.isUndefined(_.find(i.$subscriptions,function(t){return t.id==e.id}))&&l.$add(t),t})},l.$reloadAll=function(){var i=this;return l.$$resource.fetch("addressbooksList").then(function(t){_.forEach(t.addressbooks,function(e){var t=e.isRemote?i.$remotes:e.owner!=l.activeUser.login?i.$subscriptions:i.$addressbooks,t=_.find(t,function(t){return t.id==e.id});t&&t.init(e)})})},l.prototype.init=function(t,e){var i=this;this.$$cards||(this.$$cards=[]),this.idsMap={},this.$cards=[],angular.forEach(t,function(t,e){"headers"!=e&&"cards"!=e&&(i[e]=t)}),this.isOwned=l.activeUser.isSuperUser||this.owner==l.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=l.activeUser.login},l.prototype.$id=function(){return this.id?l.$q.when(this.id):this.$futureAddressBookData.then(function(t){return t?t.id:l.$q.reject()})},l.prototype.getLength=function(){return this.$cards.length},l.prototype.getItemAtIndex=function(t){var e;return!this.$isLoading&&0<=t&&t<this.$cards.length&&(e=this.$cards[t],this.$lastVisibleIndex=Math.max(0,t-3),this.$loadCard(e))?e:null},l.prototype.$loadCard=function(t){var e,i,r,s=t.id,n=this.idsMap[s],o=this.$cards.length,s=!1;if(angular.isUndefined(this.ids)&&t.id)s=!0;else if(angular.isDefined(n)&&n<this.$cards.length&&(t.$loaded!=l.$Card.STATUS.NOT_LOADED&&(s=!0),e=Math.min(n+l.PRELOAD.LOOKAHEAD,o-1),this.$cards[e].$loaded!=l.$Card.STATUS.NOT_LOADED?(r=Math.max(n-l.PRELOAD.LOOKAHEAD,0),this.$cards[r].$loaded!=l.$Card.STATUS.LOADED&&(e=n,n=Math.max(n-l.PRELOAD.SIZE,0))):e=Math.min(n+l.PRELOAD.SIZE,o-1),this.$cards[n].$loaded==l.$Card.STATUS.NOT_LOADED||this.$cards[e].$loaded==l.$Card.STATUS.NOT_LOADED)){for(i=[];n<e&&n<o;n++)this.$cards[n].$loaded!=l.$Card.STATUS.NOT_LOADED?e++:(i.push(this.$cards[n].id),this.$cards[n].$loaded=l.$Card.STATUS.LOADING);l.$log.debug("Loading Ids "+i.join(" ")+" ("+i.length+" cards)"),0<i.length&&(r=l.$$resource.post(this.id,"headers",{ids:i}),this.$unwrapHeaders(r))}return s},l.prototype.hasSelectedCard=function(){return angular.isDefined(this.selectedCard)},l.prototype.isSelectedCard=function(t){return this.hasSelectedCard()&&this.selectedCard==t},l.prototype.$selectedCard=function(){var e=this;return _.find(this.$cards,function(t){return t.id==e.selectedCard})},l.prototype.$selectedCardIndex=function(){return _.indexOf(_.map(this.$cards,"id"),this.selectedCard)},l.prototype.$selectedCardsLine truncated
|
||||
!function(){"use strict";function l(t){var e;"function"!=typeof t.then?(this.init(t),this.name&&!this.id?(e=l.$$resource.create("createFolder",this.name),this.$unwrap(e),this.acls={objectEditor:1,objectCreator:1,objectEraser:1}):this.id&&(this.$acl=new l.$$Acl("Contacts/"+this.id))):this.$unwrap(t)}l.$factory=["$q","$timeout","$log","sgSettings","sgAddressBook_PRELOAD","Resource","Card","Acl","Preferences",function(t,e,i,r,s,n,o,a,d){return angular.extend(l,{$q:t,$timeout:e,$log:i,PRELOAD:s,$$resource:new n(r.activeUser("folderURL")+"Contacts",r.activeUser()),$Card:o,$$Acl:a,$Preferences:d,$query:{value:"",sort:"c_cn",asc:1},activeUser:r.activeUser(),$addressbooks:[],$subscriptions:[],$remotes:[],selectedFolder:null,$refreshTimeout:null}),d.settings.Contact.SortingState&&(l.$query.sort=d.settings.Contact.SortingState[0],l.$query.asc=parseInt(d.settings.Contact.SortingState[1])),l}];try{angular.module("SOGo.ContactsUI")}catch(t){angular.module("SOGo.ContactsUI",["SOGo.Common","SOGo.PreferencesUI"])}angular.module("SOGo.ContactsUI").constant("sgAddressBook_PRELOAD",{LOOKAHEAD:50,SIZE:100}).factory("AddressBook",l.$factory),l.$filterAll=function(n,o,t,a){var e={search:n};return n?(angular.isUndefined(o)&&(o=[]),angular.extend(e,t),l.$$resource.fetch(null,"allContactSearch",e).then(function(t){for(var e,i=function(t){return this.id==t.id},r=a?_.filter(t.contacts,function(t){return _.isUndefined(_.find(a,_.bind(i,t)))}):t.contacts,s=o.length-1;0<=s;s--)e=o[s],_.isUndefined(_.find(r,_.bind(i,e)))&&o.splice(s,1);return _.forEach(r,function(t,e){_.isUndefined(_.find(o,_.bind(i,t)))&&(t=new l.$Card(_.mapKeys(t,function(t,e){return e.toLowerCase()}),n),o.splice(e,0,t))}),l.$log.debug(o),o})):(o=[],l.$q.when(o))},l.$add=function(e){var t=e.isSubscription?this.$subscriptions:this.$addressbooks,i=_.find(t,function(t){return"personal"==e.id||"personal"!=t.id&&1===t.name.localeCompare(e.name)}),i=i?_.indexOf(_.map(t,"id"),i.id):1;t.splice(i,0,e)},l.$findAll=function(t){var i=this;if(t&&t.length)this.$addressbooks.splice(0,this.$addressbooks.length),this.$subscriptions.splice(0,this.$subscriptions.length),this.$remotes.splice(0,this.$remotes.length),angular.forEach(t,function(t,e){t=new l(t);(t.isRemote?i.$remotes:t.isSubscription?i.$subscriptions:i.$addressbooks).push(t)});else if(angular.isArray(t))return l.$$resource.fetch("addressbooksList").then(function(t){return l.$findAll(t.addressbooks)});return _.union(this.$addressbooks,this.$subscriptions,this.$remotes)},l.$subscribe=function(t,e){var i=this;return l.$$resource.userResource(t).fetch(e,"subscribe").then(function(e){var t=new l(e);return _.isUndefined(_.find(i.$subscriptions,function(t){return t.id==e.id}))&&l.$add(t),t})},l.$reloadAll=function(){var i=this;return l.$$resource.fetch("addressbooksList").then(function(t){_.forEach(t.addressbooks,function(e){var t=e.isRemote?i.$remotes:e.owner!=l.activeUser.login?i.$subscriptions:i.$addressbooks,t=_.find(t,function(t){return t.id==e.id});t&&t.init(e)})})},l.prototype.init=function(t,e){var i=this;this.$$cards||(this.$$cards=[]),this.idsMap={},this.$cards=[],angular.forEach(t,function(t,e){"headers"!=e&&"cards"!=e&&(i[e]=t)}),this.isOwned=l.activeUser.isSuperUser||this.owner==l.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=l.activeUser.login},l.prototype.$id=function(){return this.id?l.$q.when(this.id):this.$futureAddressBookData.then(function(t){return t?t.id:l.$q.reject()})},l.prototype.getLength=function(){return this.$cards.length},l.prototype.getItemAtIndex=function(t){var e;return!this.$isLoading&&0<=t&&t<this.$cards.length&&(e=this.$cards[t],this.$lastVisibleIndex=Math.max(0,t-3),this.$loadCard(e))?e:null},l.prototype.$loadCard=function(t){var e,i,r,s=t.id,n=this.idsMap[s],o=this.$cards.length,s=!1;if(angular.isUndefined(this.ids)&&t.id)s=!0;else if(angular.isDefined(n)&&n<this.$cards.length&&(t.$loaded!=l.$Card.STATUS.NOT_LOADED&&(s=!0),e=Math.min(n+l.PRELOAD.LOOKAHEAD,o-1),this.$cards[e].$loaded!=l.$Card.STATUS.NOT_LOADED?(r=Math.max(n-l.PRELOAD.LOOKAHEAD,0),this.$cards[r].$loaded!=l.$Card.STATUS.LOADED&&(e=n,n=Math.max(n-l.PRELOAD.SIZE,0))):e=Math.min(n+l.PRELOAD.SIZE,o-1),this.$cards[n].$loaded==l.$Card.STATUS.NOT_LOADED||this.$cards[e].$loaded==l.$Card.STATUS.NOT_LOADED)){for(i=[];n<e&&n<o;n++)this.$cards[n].$loaded!=l.$Card.STATUS.NOT_LOADED?e++:(i.push(this.$cards[n].id),this.$cards[n].$loaded=l.$Card.STATUS.LOADING);l.$log.debug("Loading Ids "+i.join(" ")+" ("+i.length+" cards)"),0<i.length&&(r=l.$$resource.post(this.id,"headers",{ids:i}),this.$unwrapHeaders(r))}return s},l.prototype.hasSelectedCard=function(){return angular.isDefined(this.selectedCard)},l.prototype.isSelectedCard=function(t){return this.hasSelectedCard()&&this.selectedCard==t},l.prototype.$selectedCard=function(){var e=this;return _.find(this.$cards,function(t){return t.id==e.selectedCard})},l.prototype.$selectedCardIndex=function(){return _.indexOf(_.map(this.$cards,"id"),this.selectedCard)},l.prototype.$selectedCLine truncated
|
||||
//# sourceMappingURL=Contacts.services.js.map
|
||||
Reference in new issue
Block a user