(js/css) Update generated files

This commit is contained in:
Francis Lachapelle committed 2018-03-07 11:09:20 -05:00
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){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 a(b){if(this.init(b),this.name&&!this.id){var c=a.$$resource.create("createFolder",this.name);this.$unwrap(c)}}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Component","Acl",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")+"Calendar",e.activeUser()),$Preferences:g,$Component:h,$$Acl:i,activeUser:e.activeUser(),$view:null}),a}];try{angular.module("SOGo.SchedulerUI")}catch(a){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").value("CalendarSettings",{EventDragDayLength:96,EventDragHorizontalOffset:3,ConflictHTTPErrorCode:409}).factory("Calendar",a.$factory),a.$defaultCalendar=function(){var b,c=a.$Preferences.defaults.SOGoDefaultCalendar;return"first"==c&&(b=_.find(a.$findAll(null,!0),function(a){return a.active}))?b.id:"personal"},a.$add=function(b){var c,d;c=b.isWebCalendar?this.$webcalendars:b.isSubscription?this.$subscriptions:this.$calendars,d=_.findIndex(c,function(a,c){return"personal"==b.id||"personal"!=a.id&&a.name.localeCompare(b.name)>0}),d<0?c.push(b):c.splice(d,0,b),a.$Preferences.settings.Calendar.FoldersOrder&&a.saveFoldersOrder(_.flatMap(a.$findAll(),"id")),a.$reloadAll()},a.$findAll=function(b,c){var d=this;if(b)this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],angular.forEach(b,function(b,c){var e=new a(b);e.isWebCalendar?d.$webcalendars.push(e):e.isSubscription?d.$subscriptions.push(e):d.$calendars.push(e)});else if(angular.isUndefined(this.$calendars))return this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],a.$$resource.fetch("calendarslist").then(function(b){return a.$findAll(b.calendars,c)});return c?_.union(this.$calendars,_.filter(this.$subscriptions,function(a){return a.isOwned||a.acls.objectCreator})):_.union(this.$calendars,this.$subscriptions,this.$webcalendars)},a.$reloadAll=function(){var b=this;a.$$resource.fetch("calendarslist").then(function(c){_.forEach(c.calendars,function(c){var d,e;d=c.isWebCalendar?b.$webcalendars:c.owner!=a.activeUser.login?b.$subscriptions:b.$calendars,e=_.find(d,function(a){return a.id==c.id}),e&&e.init(c)})})},a.$get=function(b){var c;return c=_.find(a.$calendars,function(a){return a.id==b}),c||(c=_.find(a.$subscriptions,function(a){return a.id==b})),c||(c=_.find(a.$webcalendars,function(a){return a.id==b})),c},a.$getIndex=function(b){var c;return c=_.indexOf(_.map(a.$calendars,"id"),b),c<0&&(c=_.indexOf(_.map(a.$subscriptions,"id"),b)),c<0&&(c=_.indexOf(_.map(a.$webcalendars,"id"),b)),c},a.$subscribe=function(b,c){var d=this;return a.$$resource.userResource(b).fetch(c,"subscribe").then(function(b){var c=new a(angular.extend({active:1},b));return _.find(d.$subscriptions,function(a){return a.id==b.id})||a.$add(c),c})},a.$addWebCalendar=function(b){var c=this,d=a.$q.defer();return _.find(c.$webcalendars,function(a){return a.urls.webCalendarURL==b})?d.reject():a.$$resource.post(null,"addWebCalendar",{url:b}).then(function(c){angular.extend(c,{isWebCalendar:!0,isEditable:!0,isRemote:!1,owner:a.activeUser.login,urls:{webCalendarURL:b}});var e=new a(c);a.$$resource.fetch(e.id,"reload").then(function(b){a.$log.debug(JSON.stringify(b,void 0,2)),a.$add(e),d.resolve()},function(a){401==a.status?d.resolve(e):d.reject()})},d.reject),d.promise},a.reloadWebCalendars=function(){var b=[];return _.forEach(this.$webcalendars,function(c){var d=a.$$resource.fetch(c.id,"reload");d.then(function(a){c.$error=!1},function(a){c.$error=l(a.statusText)}),b.push(d)}),a.$q.all(b)},a.$deleteComponents=function(b){var c={},d=[];return _.forEach(b,function(a){angular.isDefined(c[a.pid])||(c[a.pid]=[]),c[a.pid].push(a.id)}),_.forEach(c,function(b,c){d.push(a.$$resource.post(c,"batchDelete",{uids:b}))}),a.$q.all(d)},a.saveFoldersActivation=function(b){var c={};return _.forEach(b,function(b){var d=a.$get(b);c[d.id]=d.active}),a.$$resource.post(null,"saveFoldersActivation",c)},a.saveFoldersOrder=function(b){return this.$$resource.post(null,"saveFoldersOrder",{folders:b}).then(function(){if(a.$Preferences.settings.Calendar.FoldersOrder=b,!b)return a.$$resource.fetch("calendarslist").then(function(b){return a.$findAll(b.calendars)})})},a.prototype.init=function(b){this.color=this.color||"#AAAAAA",this.active=1,angular.extend(this,b),this.id&&(this.$acl=new a.$$Acl("Calendar/"+this.id)),this.isOwned=a.activeUser.isSuperUser||this.owner==a.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=a.activeUser.login,angular.isUndefined(this.$shadowData)&&(this.$shadowData=this.$omit())},a.prototype.$id=function(){return this.id?a.$q.when(this.id):this.$futureCalendarData.then(function(a){return a.id})},a.prototype.getClassName=function(a){return angular.isUndefined(a)&&(a="fg"),a+"-folder"+this.id},a.prototype.$rename=function(){var b,c,d=this;return this.name==this.$shadowData.name?a.$q.when():(c=this.isWebCalendar?a.$webcalendars:this.isSubscription?a.$subscriptions:a.$calendars,b=_.indexOf(Line truncated
}}).then(function(){a.$emit("calendars:list")},function(){})}function g(a,b,c,d,e){function f(){c.$adjust(angular.extend({ignoreConflicts:!0},d)).then(b.hide)}var g=this;g.conflictError=e,g.cancel=b.cancel,g.save=f}var h,i,j,p,q,r,s;h=n.$ghost.component,i=n.$ghost.pointerHandler,h.isNew?(j=i.currentEventCoordinates,h.summary="",h.isAllDay&&(j.duration-=96),h.setDelta(15*j.duration),z(null,"appointment",h).catch().finally(function(){d(function(){n.$resetGhost()})})):(p=i.currentEventCoordinates.getDelta(i.originalEventCoordinates),q={days:p.dayNumber,start:15*p.start,duration:15*p.duration},i.originalCalendar&&0!==p.dayNumber&&(r=i.currentEventCoordinates.dayNumber,s=_.filter(m.$findAll(),{active:1}),q.destination=s[r].id,q.days=0),h.isException||!h.occurrenceId?h.$adjust(q).then(function(){a.$emit("calendars:list"),o.getAlarms()},function(a){e(a,h,q)}).finally(function(){d(function(){n.$resetGhost()})}):h.occurrenceId&&f.show({clickOutsideToClose:!0,escapeToClose:!0,locals:{component:h,params:q},template:['<md-dialog flex="50" sm-flex="80" xs-flex="90">',' <md-dialog-content class="md-dialog-content">'," <p>"+l("editRepeatingItem")+"</p>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-click="updateThisOccurrence()">'+l("button_thisOccurrenceOnly")+"</md-button>",' <md-button ng-click="updateAllOccurrences()">'+l("button_allOccurrences")+"</md-button>"," </md-dialog-actions>","</md-dialog>"].join(""),controller:c}).then(function(){a.$emit("calendars:list")},function(){}).finally(function(){d(function(){n.$resetGhost()})})),c.$inject=["$scope","$mdDialog","component","params"],g.$inject=["$scope","$mdDialog","component","params","conflictError"]}function B(){return n["$query"+J.componentType.capitalize()].filterpopup}function C(a){n.$filter(J.componentType,{filterpopup:a})}function D(a){return n["$query"+J.componentType.capitalize()].filterpopup==a}function E(a){n.$filter(J.componentType,{sort:a})}function F(a){return n["$query"+J.componentType.capitalize()].sort==a}function G(){m.reloadWebCalendars().finally(function(){a.$emit("calendars:list")})}function H(){J.mode.search=!1,n.$filter(J.componentType,{value:""})}var I,J=this,K=[];J.component=n,J.componentType="events",J.selectedList=0,J.selectComponentType=q,J.unselectComponents=r,J.selectAll=s,J.searchMode=u,J.toggleComponentSelection=t,J.confirmDeleteSelectedComponents=v,J.openEvent=w,J.openTask=x,J.newComponent=z,J.filterpopup=B,J.filter=C,J.filteredBy=D,J.sort=E,J.sortedBy=F,J.reload=G,J.cancelSearch=H,J.mode={search:!1,multiple:0},this.$onInit=function(){p(K),I="events","tasksListView"==j.settings.Calendar.SelectedList&&(J.selectedList=1,I="tasks"),q(I,{reload:!0}),a.$on("calendars:list",function(){n.$filter(J.componentType,{reload:!0})}),a.$on("calendar:dragend",A),b.$on("$destroy",function(){_.forEach(K,function(a){g.deregisterHotkey(a)})})}}a.$inject=["$rootScope","$scope","$q","$timeout","$state","$mdDialog","sgHotkeys","sgFocus","Dialog","Preferences","CalendarSettings","Calendar","Component","Alarm"],angular.module("SOGo.SchedulerUI").controller("CalendarListController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j){function k(a,b,c){return a.sortableScope.element[0]==b.element[0]}function m(){j.saveFoldersOrder(_.flatMap(j.$findAll(),"id"))}function n(){s.sortableMode=!s.sortableMode,s.filter.name=""}function o(){j.saveFoldersOrder()}function p(a){g.prompt(l("New calendar"),l("Name of the Calendar")).then(function(a){var b=new j({name:a,isEditable:!0,isRemote:!1,owner:UserLogin});b.$id().then(function(){j.$add(b)})})}function q(){function a(a,b,c,d){var e=this,f=c.split("/"),g=f[2];e.title=l("Please identify yourself to %{0}").formatted(g),e.url=c,e.authenticate=function(a){!a.$valid&&a.$error.required||d.setCredentials(e.username,e.password).then(function(a){b.hide()},function(b){a.password.$setValidity("credentials",!1)})},e.cancel=function(){b.cancel()}}g.prompt(l("Subscribe to a web calendar..."),l("URL of the Calendar"),{inputType:"url"}).then(function(b){j.$addWebCalendar(b).then(function(c){angular.isObject(c)&&d.show({parent:angular.element(document.body),clickOutsideToClose:!0,escapeToClose:!0,templateUrl:"UIxWebCalendarAuthDialog",controller:a,controllerAs:"$WebCalendarAuthDialogController",locals:{url:b,calendar:c}})})}),a.$inject=["scope","$mdDialog","url","calendar"]}function r(a){e.debug("subscribeToFolder "+a.owner+a.name),j.$subscribe(a.owner,a.name).then(function(a){f.show(f.simple().content(l("Successfully subscribed to calendar")).position("top right").hideDelay(3e3))})}var s=this;s.activeUser=h.activeUser,s.service=j,s.newCalendar=p,s.addWebCalendar=q,s.subscribeToFolder=r,s.filter={name:""},s.sortableMode=!1,s.toggleSortableMode=n,s.resetSort=o,s.sortableCalendars={scrollableContainer:"#sidenav-content",containment:"md-list",orderChanged:m,accept:k},this.$onInit=function(){s.categories=_.map(i.defaults.SOGoCalendarCategories,function(a){return{id:a.asCSSIdentifier(),name:a,color:iLine truncated
this.deregisterDragStart(),this.deregisterDragStop(),this.$element.off("mousemove",this.bindedUpdateFromPointerHandler),angular.element(c).off("resize",this.bindedUpdateCoordinates)},onDragStart:function(){this.$element.on("mousemove",this.bindedUpdateFromPointerHandler),this.updateCoordinates(),this.updateFromPointerHandler()},onDragEnd:function(){this.$element.off("mousemove",this.bindedUpdateFromPointerHandler),h.$view=null},getQuarterHeight:function(){var a,b,c=null;return a=document.getElementById("hour0"),b=document.getElementById("hour23"),a&&b&&(c=(b.offsetTop-a.offsetTop)/92),c},getDayDimensions:function(a){var b,c,d,e,f,g,h;return c=b=d=e=0,f=this.element.getElementsByClassName("day"),f.length>0&&(g=f[0].getBoundingClientRect(),c=g.height,b=g.width,d=g.left-a,h=f[0].getElementsByClassName("sg-calendar-tile-header"),h.length>0&&(e=h[0].clientHeight)),{height:c,width:b,offset:{left:d,top:e}}},getDayNumbers:function(){var a;return a=this.element.getElementsByTagName("sg-calendar-day"),_.map(a,function(a,b){return o?b:parseInt(a.attributes["sg-day-number"].value)})},getMaxColumns:function(){var a,b=0;return"monthly"==this.type?(a=this.element.getElementsByTagName("md-grid-list")[0],b=parseInt(a.attributes["md-cols"].value)-1):b=this.element.getElementsByClassName("day").length-1,b},updateCoordinates:function(){var a,b;a=this.element.getBoundingClientRect(),b=this.getDayDimensions(a.left),angular.extend(this,{coordinates:{x:a.left,y:a.top},dayHeight:b.height,dayWidth:b.width,daysOffset:b.offset.left,topOffset:b.offset.top})},updateFromPointerHandler:function(){var a,b,c,d,e,f;a=i.$ghost.pointerHandler,this.coordinates&&a&&(b=a.getContainerBasedCoordinates(this),b&&(h.$view=this,c=(new Date).getTime(),(!this.lastScroll||c>this.lastScroll+100)&&(this.lastScroll=c,d=b.y-this.scrollStep,d<0?(e=-this.element.scrollTop,d<e&&(d=e),this.element.scrollTop+=d):(d=b.y+this.scrollStep,f=d-this.element.clientHeight,f>0&&(this.element.scrollTop+=f)))))}}}}}function b(a){this.type=a.type}a.$inject=["$rootScope","$window","$document","$q","$timeout","$mdGesture","Calendar","Component","Preferences"],b.$inject=["$scope"],angular.module("SOGo.SchedulerUI").directive("sgCalendarScrollView",a)}(),function(){"use strict";function a(){return{restrict:"E",scope:{calendars:"=sgCalendars",calendar:"@sgCalendar",blocksType:"@sgBlocksType",day:"@sgDay",clickBlock:"&sgClick"},template:["<sg-calendar-day-table",' sg-blocks="calendars[calendar][blocksType]"',' sg-day="day"',' sg-click="clickBlock({event: clickEvent, component: clickComponent})"/>'].join("")}}angular.module("SOGo.SchedulerUI").directive("sgCalendarTable",a)}(),function(){"use strict";function a(){return{restrict:"E",require:"ngModel",scope:{ngModel:"="},replace:!0,template:['<style type="text/css">'," .bg-category{{ ngModel.id }} {"," background-color: {{ ngModel.color }} !important;"," }"," .bdr-category{{ ngModel.id }} {"," border-color: {{ ngModel.color }} !important;"," }","</style>"].join("")}}angular.module("SOGo.SchedulerUI").directive("sgCategoryStylesheet",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g){function h(h,i,j,k){function m(){var a,b,c,d,e,f,g,j,k,l;h.block.length<3||(a=h.block.component,b=h.block.dayIndex,c=_.findIndex(a.blocks,["dayIndex",b]),d=0===c,e=c===a.blocks.length-1,f=angular.element('<div class="dragGrip"></div>'),f.addClass("bdr-folder"+a.pid),a.c_isallday||"SG-CALENDAR-MONTH-DAY"===i[0].parentNode.tagName?(d&&(g=angular.element('<div class="dragGrip-left"></div>').append(f),i.append(g)),e&&(j=angular.element('<div class="dragGrip-right"></div>').append(f.clone()),i.append(j))):(d&&(k=angular.element('<div class="dragGrip-top"></div>').append(f),i.append(k)),e&&(l=angular.element('<div class="dragGrip-bottom"></div>').append(f.clone()),i.append(l))))}function n(a){var b,c,d,e,f;a.stopPropagation(),d=a.target.scrollHeight>a.target.clientHeight+1,d&&(e=a.target.getBoundingClientRect(),f=e.left+e.width-18,a.pageX>f)||(b="move-event",h.block&&h.block.component?"dragGrip-top"==a.target.className||"dragGrip-left"==a.target.className?b="change-start":"dragGrip-bottom"!=a.target.className&&"dragGrip-right"!=a.target.className||(b="change-end"):b="change-end",c=new t(b),c.initFromEvent(a),g.$ghost.pointerHandler=c,angular.element(document).one("mouseup",q),angular.element(document).on("mousemove",p))}function o(b){var f,j,m,n,o,p,q,r,s;m=i.hasClass("clickableHourCell"),n="SG-CALENDAR-MONTH-DAY"==i[0].parentNode.tagName||i.hasClass("clickableDayCell"),s=k.calendarData(),h.block&&h.block.component?f=h.block:(o=k.dayString.parseDate(d.$mdDateLocaleProvider,"%Y-%m-%e"),p={type:"appointment",pid:s?s.pid:e.$defaultCalendar(),summary:l("New Event"),startDate:o,isAllDay:m?0:1},q=new g(p),f={component:q,dayNumber:k.dayNumber,length:0},f.component.blocks=[f]),j="multiday",n?j="monthly":f.component.c_isallday&&(j="multiday-allday"),_.forEach(f.component.blocks,function(a){a.dragging=!0}),r=g.$ghost.pointerHandler,r.prepareWithEventTyLine truncated
//# sourceMappingURL=Scheduler.services.js.map