/** * Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui) * Copyright 2018 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("kendo.scheduler.agendaview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e){function t(e){var t,s,a=0;for(t=0,s=e.length;t# if (resources[0]) {## } ## if (data.isException()) { ## } else if (data.isRecurring()) {## } #{0}#if (showDelete) {##}#',u=r.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){return e.concat(t)},_getGroupsInDay:function(){return[]},_getSumOfItemsForDate:function(){return 0},_renderTaskGroupsCells:function(e,t,s,a){var n=this._view;0===s&&0===a&&t.length&&n._renderTaskGroupsCells(e,t)},_renderDateCell:function(e,t,s,a,n,i){var o=this._view;e.push(r.format('{1}',s.length,o._dateTemplate({date:a}),n!=i.length-1||t.length?"":" k-last",t.length?"":" k-first"))},_renderDates:function(){},_getParents:function(e){return e.splice(0)},_getGroupsByDate:function(){},_renderTaskGroups:function(e,t,s){var a=this._view;e.append(a._renderTaskGroups(t,s))}}),d=r.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){var s,a,n=this._view;return n._isMobilePhoneView()?e.concat(t):(s=t.slice(0,1),a=t.slice(1),s.concat(e).concat(a))},_compareDateGroups:function(e,t,s){return e[s].text==t[s].text&&(0===s||this._compareDateGroups(e,t,s-1))},_getGroupsInDay:function(e,t){var s,a,n,r,i,o=[],l=null;for(s=0;s{1}',i,d._dateTemplate({date:o}))),u=0;u{1}',n[u][l],d._groupTemplate({value:t[s][u].text}),t[s][u].className))},_renderDateCell:function(){},_renderDates:function(e){var t,s=this._view,a=s._groupsByDate.sort(function(e,t){return e.array[0].value.getTime()-t.array[0].value.getTime()});for(t=0;t=this.startDate()&&u.push(o),i>1)for(o.end=r.date.nextDay(a),o.head=!0,l=1;l=this.startDate()||r.date.getDate(o.start).getTime()==this.endDate().getTime())&&u.push(o);return new r.data.Query(u).sort([{field:"start",dir:"asc"},{field:"end",dir:"asc"}]).groupBy({field:"startDate"}).toArray()},_renderTaskGroups:function(e,t){var s,a,n,i,o,l,u,d,c=[],h=this.options.editable,p=h&&h.destroy!==!1&&!this._isMobile(),g=this._isMobilePhoneView(),m=this._groupedView._getSumOfItemsForDate(e),f=this._groupedView._getGroupsInDay(e,t),_=0;for(s=0;s{0}',this._dateTemplate({date:a}))),c.push('':">")+d.join("")+"")):this._groupedView._renderDateCell(u,t,n,a,s,e)),l.format=l.head?"{0:t}":l.tail?"{1:t}":"{0:t}-{1:t}",l.resources=this.eventResources(l),u.push(r.format('
{0}{1}{2}
{3}',l.tail||l.middle?'':"",this._timeTemplate(l.clone({start:l._startTime||l.start,end:l.endTime||l.end})),l.head||l.middle?'':"",this._eventTemplate(l.clone({showDelete:p,messages:this.options.messages})))),c.push('':">")+u.join("")+"");return c.join("")},_renderTaskGroupsCells:function(e,t){for(var s=0;s{1}',t[s].rowSpan,this._groupTemplate({value:t[s].text}),t[s].className))},render:function(e){var t,s,n=this.content.find("table").empty(),r=[];e.length>0&&(t=this.groupedResources,t.length?(r=this._createGroupConfiguration(e,t,null),this._groupsByDate=[],this._renderGroups(r,n,[]),this._groupedView._renderDates(n)):(r=this._tasks(e),n.append(this._renderTaskGroups(r,[])))),s=this._eventsList=a(r),this._angularItems(n,s),this.refreshLayout(),this.trigger("activate")},_angularItems:function(e,t){this.angular("compile",function(){var s=[],a=t.map(function(t){return s.push({dataItem:t}),e.find(".k-task["+r.attr("uid")+"="+t.uid+"]")});return{elements:a,data:s}})},_renderGroups:function(e,t,s){var a,n,r;for(a=0,n=e.length;a-1)&&(c+=" k-last"),h={text:r.getter(g.dataTextField)(f[o]),value:l,rowSpan:0,className:c},a.length>1?(h.groups=this._createGroupConfiguration(u,a.slice(1),h),n&&(n.rowSpan+=h.rowSpan)):(h.items=d,p=t(h.items),_&&(p+=h.items.length),h.rowSpan=p,n&&(n.rowSpan+=p)),m.push(h));return m},selectionByElement:function(t){var s,a,n;if(t=e(t),!t.hasClass("k-scheduler-datecolumn")&&this._eventsList.length)return t.is(".k-task")&&(t=t.closest("td")),this._isMobile()?(n=t.parent(),s=n.parent().children().filter(function(){return e(this).children(":not(.k-scheduler-datecolumn)").length}).index(n)):s=t.parent().index(),a=this._eventsList[s],{index:s,start:a.start,end:a.end,isAllDay:a.isAllDay,uid:a.uid}},select:function(e){this.clearSelection();var t=this.table.find(".k-task").eq(e.index).closest("tr").addClass("k-state-selected").attr("aria-selected",!0)[0];this.current(t)},move:function(e,t){var s,a=!1,n=e.index;return t==r.keys.UP?(n--,a=!0):t==r.keys.DOWN&&(n++,a=!0),a&&(s=this._eventsList[n],s&&(e.start=s.start,e.end=s.end,e.isAllDay=s.isAllDay,e.events=[s.uid],e.index=n)),a},moveToEvent:function(){return!1},constrainSelection:function(e){var t=this._eventsList[0];t&&(e.start=t.start,e.end=t.end,e.isAllDay=t.isAllDay,e.events=[t.uid],e.index=0)},isInRange:function(){return!0},destroy:function(){this.element&&this.element.off(o),i.SchedulerView.fn.destroy.call(this)},options:{title:"Agenda",name:"agenda",editable:!0,selectedDateFormat:"{0:D}-{1:D}",selectedShortDateFormat:"{0:d} - {1:d}",eventTemplate:"#:title#",eventTimeTemplate:"#if(data.isAllDay) {##=this.options.messages.allDay##} else { ##=kendo.format(format, start, end)## } #",eventDateTemplate:'#=kendo.toString(date, "dd")##=kendo.toString(date,"dddd")##=kendo.toString(date, "y")#',eventGroupTemplate:'#=value#',messages:{event:"Event",date:"Date",time:"Time",allDay:"all day"}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,s){(s||t)()}); //# sourceMappingURL=kendo.scheduler.agendaview.min.js.map