(js/css) Update generated files

This commit is contained in:
Francis Lachapelle committed 2016-01-14 16:10:37 -05:00
1 parent f5432525ec
commit 27bf8459c2
26 files changed
+115 -116

No files matched your search

@@ -1,2 +1,2 @@
(function(){"use strict";function AddressBook(futureAddressBookData){if(typeof futureAddressBookData.then!=="function"){this.init(futureAddressBookData);if(this.name&&!this.id){var newAddressBookData=AddressBook.$$resource.create("createFolder",this.name);this.$unwrap(newAddressBookData)}else if(this.id){this.$acl=new AddressBook.$$Acl("Contacts/"+this.id)}}else{this.$unwrap(futureAddressBookData)}}AddressBook.$factory=["$q","$timeout","$log","sgSettings","Resource","Card","Acl","Preferences",function($q,$timeout,$log,Settings,Resource,Card,Acl,Preferences){angular.extend(AddressBook,{$q:$q,$timeout:$timeout,$log:$log,$$resource:new Resource(Settings.activeUser("folderURL")+"Contacts",Settings.activeUser()),$Card:Card,$$Acl:Acl,$Preferences:Preferences,$query:{search:"name_or_address",value:"",sort:"c_cn",asc:1},activeUser:Settings.activeUser(),selectedFolder:null,$refreshTimeout:null});Preferences.ready().then(function(){if(Preferences.settings.Contact.SortingState){AddressBook.$query.sort=Preferences.settings.Contact.SortingState[0];AddressBook.$query.asc=parseInt(Preferences.settings.Contact.SortingState[1])}});return AddressBook}];try{angular.module("SOGo.ContactsUI")}catch(e){angular.module("SOGo.ContactsUI",["SOGo.Common","SOGo.PreferencesUI"])}angular.module("SOGo.ContactsUI").factory("AddressBook",AddressBook.$factory);AddressBook.$filterAll=function(search,options,excludedCards){var params={search:search};if(!search){AddressBook.$cards=[];return AddressBook.$q.when(AddressBook.$cards)}if(angular.isUndefined(AddressBook.$cards)){AddressBook.$cards=[]}else if(AddressBook.$query.value==search){return AddressBook.$q.when(AddressBook.$cards)}AddressBook.$query.value=search;angular.extend(params,options);return AddressBook.$$resource.fetch(null,"allContactSearch",params).then(function(response){var results,card,index,compareIds=function(data){return this.id==data.id};if(excludedCards){results=_.filter(response.contacts,function(data){return _.isUndefined(_.find(excludedCards,compareIds,data))})}else{results=response.contacts}for(index=AddressBook.$cards.length-1;index>=0;index--){card=AddressBook.$cards[index];if(_.isUndefined(_.find(results,compareIds,card))){AddressBook.$cards.splice(index,1)}}_.each(results,function(data,index){if(_.isUndefined(_.find(AddressBook.$cards,compareIds,data))){var card=new AddressBook.$Card(data,search);AddressBook.$cards.splice(index,0,card)}});AddressBook.$log.debug(AddressBook.$cards);return AddressBook.$cards})};AddressBook.$add=function(addressbook){var list,sibling,i;list=addressbook.isSubscription?this.$subscriptions:this.$addressbooks;sibling=_.find(list,function(o){return addressbook.id=="personal"||o.id!="personal"&&o.name.localeCompare(addressbook.name)===1});i=sibling?_.indexOf(_.pluck(list,"id"),sibling.id):1;list.splice(i,0,addressbook)};AddressBook.$findAll=function(data){var _this=this;if(data){this.$addressbooks=[];this.$subscriptions=[];this.$remotes=[];angular.forEach(data,function(o,i){var addressbook=new AddressBook(o);if(addressbook.isRemote)_this.$remotes.push(addressbook);else if(addressbook.isSubscription)_this.$subscriptions.push(addressbook);else _this.$addressbooks.push(addressbook)})}return _.union(this.$addressbooks,this.$subscriptions,this.$remotes)};AddressBook.$find=function(addressbookId){var futureAddressBookData=AddressBook.$Preferences.ready().then(function(){return AddressBook.$$resource.fetch(addressbookId,"view",AddressBook.$query)});return new AddressBook(futureAddressBookData)};AddressBook.$subscribe=function(uid,path){var _this=this;return AddressBook.$$resource.userResource(uid).fetch(path,"subscribe").then(function(addressbookData){var addressbook=new AddressBook(addressbookData);if(_.isUndefined(_.find(_this.$subscriptions,function(o){return o.id==addressbookData.id}))){AddressBook.$add(addressbook)}return addressbook})};AddressBook.prototype.init=function(data,options){if(!this.$cards){this.$isLoading=true;this.$cards=[];this.cards=[]}angular.extend(this,data);this.isOwned=AddressBook.activeUser.isSuperUser||this.owner==AddressBook.activeUser.login;this.isSubscription=!this.isRemote&&this.owner!=AddressBook.activeUser.login};AddressBook.prototype.$id=function(){if(this.id){return AddressBook.$q.when(this.id)}else{return this.$futureAddressBookData.then(function(addressbook){return addressbook.id})}};AddressBook.prototype.isSelectedCard=function(cardId){return this.selectedCard==cardId};AddressBook.prototype.$selectedCount=function(){var count;count=0;if(this.cards){count=_.filter(this.cards,function(card){return card.selected}).length}return count};AddressBook.prototype.$startRefreshTimeout=function(){var _this=this;if(AddressBook.$refreshTimeout)AddressBook.$timeout.cancel(AddressBook.$refreshTimeout);AddressBook.$Preferences.ready().then(function(){var refreshViewCheck=AddressBook.$Preferences.defaults.SOGoRefreshViewCheck;if(refreshViewCheck&&refreshViewCheck!="manually"){var f=angular.bind(_this,AddressBook.prototype.$relLine truncated
!function(){"use strict";function a(b){if("function"!=typeof b.then)if(this.init(b),this.name&&!this.id){var c=a.$$resource.create("createFolder",this.name);this.$unwrap(c)}else this.id&&(this.$acl=new a.$$Acl("Contacts/"+this.id));else this.$unwrap(b)}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Card","Acl","Preferences",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")+"Contacts",e.activeUser()),$Card:g,$$Acl:h,$Preferences:i,$query:{search:"name_or_address",value:"",sort:"c_cn",asc:1},activeUser:e.activeUser(),selectedFolder:null,$refreshTimeout:null}),i.ready().then(function(){i.settings.Contact.SortingState&&(a.$query.sort=i.settings.Contact.SortingState[0],a.$query.asc=parseInt(i.settings.Contact.SortingState[1]))}),a}];try{angular.module("SOGo.ContactsUI")}catch(b){angular.module("SOGo.ContactsUI",["SOGo.Common","SOGo.PreferencesUI"])}angular.module("SOGo.ContactsUI").factory("AddressBook",a.$factory),a.$filterAll=function(b,c,d){var e={search:b};if(!b)return a.$cards=[],a.$q.when(a.$cards);if(angular.isUndefined(a.$cards))a.$cards=[];else if(a.$query.value==b)return a.$q.when(a.$cards);return a.$query.value=b,angular.extend(e,c),a.$$resource.fetch(null,"allContactSearch",e).then(function(c){var e,f,g,h=function(a){return this.id==a.id};for(e=d?_.filter(c.contacts,function(a){return _.isUndefined(_.find(d,h,a))}):c.contacts,g=a.$cards.length-1;g>=0;g--)f=a.$cards[g],_.isUndefined(_.find(e,h,f))&&a.$cards.splice(g,1);return _.each(e,function(c,d){if(_.isUndefined(_.find(a.$cards,h,c))){var e=new a.$Card(c,b);a.$cards.splice(d,0,e)}}),a.$log.debug(a.$cards),a.$cards})},a.$add=function(a){var b,c,d;b=a.isSubscription?this.$subscriptions:this.$addressbooks,c=_.find(b,function(b){return"personal"==a.id||"personal"!=b.id&&1===b.name.localeCompare(a.name)}),d=c?_.indexOf(_.pluck(b,"id"),c.id):1,b.splice(d,0,a)},a.$findAll=function(b){var c=this;return b&&(this.$addressbooks=[],this.$subscriptions=[],this.$remotes=[],angular.forEach(b,function(b,d){var e=new a(b);e.isRemote?c.$remotes.push(e):e.isSubscription?c.$subscriptions.push(e):c.$addressbooks.push(e)})),_.union(this.$addressbooks,this.$subscriptions,this.$remotes)},a.$find=function(b){var c=a.$Preferences.ready().then(function(){return a.$$resource.fetch(b,"view",a.$query)});return new a(c)},a.$subscribe=function(b,c){var d=this;return a.$$resource.userResource(b).fetch(c,"subscribe").then(function(b){var c=new a(b);return _.isUndefined(_.find(d.$subscriptions,function(a){return a.id==b.id}))&&a.$add(c),c})},a.prototype.init=function(b,c){this.$cards||(this.$isLoading=!0,this.$cards=[],this.cards=[]),angular.extend(this,b),this.isOwned=a.activeUser.isSuperUser||this.owner==a.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=a.activeUser.login},a.prototype.$id=function(){return this.id?a.$q.when(this.id):this.$futureAddressBookData.then(function(a){return a.id})},a.prototype.isSelectedCard=function(a){return this.selectedCard==a},a.prototype.$selectedCount=function(){var a;return a=0,this.cards&&(a=_.filter(this.cards,function(a){return a.selected}).length),a},a.prototype.$startRefreshTimeout=function(){var b=this;a.$refreshTimeout&&a.$timeout.cancel(a.$refreshTimeout),a.$Preferences.ready().then(function(){var c=a.$Preferences.defaults.SOGoRefreshViewCheck;if(c&&"manually"!=c){var d=angular.bind(b,a.prototype.$reload);a.$refreshTimeout=a.$timeout(d,1e3*c.timeInterval())}})},a.prototype.$reload=function(){return this.$startRefreshTimeout(),this.$filter()},a.prototype.$filter=function(b,c,d){var e=this;return c&&c.dry||(this.$isLoading=!0),a.$Preferences.ready().then(function(){if(c&&(angular.extend(a.$query,c),c.dry)){if(!b)return e.$cards=[],a.$q.when(e.$cards);if(a.$query.value==b)return a.$q.when(e.$cards)}return angular.isDefined(b)&&(a.$query.value=b),e.$id().then(function(b){return a.$$resource.fetch(b,"view",a.$query)}).then(function(f){var g,h,i,j,k=function(a){return e.id==a.id};for(h=c&&c.dry?e.$cards:e.cards,g=d?_.filter(f.cards,function(a){return _.isUndefined(_.find(d,k,a))}):f.cards,j=h.length-1;j>=0;j--)i=h[j],_.isUndefined(_.find(g,k,i))&&h.splice(j,1);return _.each(g,function(c,d){if(_.isUndefined(_.find(h,k,c))){var e=new a.$Card(c,b);h.splice(d,0,e)}}),_.each(g,function(a,b){var c,d;h[b].id!=a.id&&(c=_.findIndex(h,k,a),d=h.splice(c,1),h.splice(b,0,d[0]))}),e.$isLoading=!1,h})})},a.prototype.$rename=function(b){var c=_.indexOf(_.pluck(a.$addressbooks,"id"),this.id);return this.name=b,a.$addressbooks.splice(c,1),a.$add(this),this.$save()},a.prototype.$delete=function(){var b,c,d=this,e=a.$q.defer();return this.isSubscription?(c=a.$$resource.fetch(this.id,"unsubscribe"),b=a.$subscriptions):(c=a.$$resource.remove(this.id),b=a.$addressbooks),c.then(function(){var a=_.indexOf(_.pluck(b,"id"),d.id);b.splice(a,1),e.resolve()},e.reject),e.promise},a.prototype.$deleteCards=function(b){var c=_.map(b,function(a){return a.id}),d=this;return a.$$resouLine truncated
//# sourceMappingURL=Contacts.services.js.map