{"version":3,"sources":["kendo.scheduler.dayview.js"],"names":["f","define","$","undefined","toInvariantTime","date","staticDate","Date","setTime","getMilliseconds","isInDateRange","value","min","max","isInTimeRange","overlaps","addContinuousEvent","group","range","element","isAllDay","idx","events","_continuousEvents","lastEvent","length","startDate","getDate","start","getTime","splice","uid","attr","kendo","end","push","getWorkDays","options","workDays","dayIndex","workWeekStart","workWeekEnd","window","ui","SchedulerView","extend","proxy","MS_PER_MINUTE","MS_PER_DAY","NS","DAY_VIEW_EVENT_TEMPLATE","template","DAY_VIEW_ALL_DAY_EVENT_TEMPLATE","DATA_HEADER_TEMPLATE","ALLDAY_EVENT_WRAPPER_STRING","EVENT_WRAPPER_STRING","MultiDayView","init","that","this","fn","call","title","name","_workDays","_templates","_editable","calculateDateRange","_groups","_currentTime","_currentTimeMarkerUpdater","timezone","timezoneOffset","groupsCount","groupIndex","currentGroup","utcCurrentTime","ranges","collection","slotElement","currentTime","currentTimeMarker","useLocalTimezone","dataSource","schema","offset","convert","getTimezoneOffset","times","find","remove","orientation","groups","toUtcTime","timeSlotRanges","slotByStartDate","appendTo","css","top","Math","round","innerRect","height","right","left","updateInterval","markerOptions","_currentTimeUpdateTimer","setInterval","_updateResizeHint","event","startTime","endTime","rangeIndex","width","rect","hint","format","container","multiday","isMultiDay","_removeResizeHint","startSlot","offsetWidth","clientHeight","offsetTop","innerWidth","outerRect","snap","bottom","_createResizeHint","offsetLeft","_resizeHint","add","content","text","first","addClass","toString","toLocalDate","last","_updateMoveHint","distance","duration","_removeMoveHint","pop","_createEventElement","clone","_isRtl","clientWidth","_moveHint","_slotByPosition","x","y","slot","_isVerticallyGrouped","scrollTop","scrollLeft","ceil","daySlotByPosition","timeSlotByPosition","_groupCount","resources","groupedResources","_groupOrientation","_rowCountForLevel","_columnCountForLevel","_columnOffsetForResource","_columnCountInResourceView","_timeSlotGroups","groupCount","columnCount","rowCount","rowMultiplier","rowIndex","time","cellMultiplier","cells","cellIndex","cell","collectionIndex","currentDate","interval","_timeSlotInterval","tableRows","floor","children","getTimeSlotCollection","_dates","UTC","getFullYear","getMonth","setAttribute","addTimeSlot","_daySlotGroups","cellCount","getDaySlotCollection","addDaySlot","view","columnIndex","_addResourceView","addTimeSlotCollection","addDays","allDaySlot","addDaySlotCollection","selectedDateFormat","selectedShortDateFormat","showWorkHours","today","minorTickCount","majorTick","majorTimeHeaderTemplate","minorTimeHeaderTemplate","groupHeaderTemplate","slotTemplate","allDaySlotTemplate","eventTemplate","allDayEventTemplate","dateHeaderTemplate","editable","workDayStart","workDayEnd","footer","command","messages","allDay","showFullDay","showWorkDay","settings","Template","templateSettings","_eventTmpl","_isMobile","_touchEditable","_mouseEditable","on","e","trigger","closest","preventDefault","create","resourceInfo","parent","hasClass","pageX","pageY","_resourceBySlot","eventInfo","endDate","update","threshold","support","mobileOS","android","_addUserEvents","UserEvents","filter","tap","target","location","_allDayUserEvents","_editUserEvents","eventElement","_layout","dates","column","columns","rows","isToday","className","cellContent","_forTimeRange","middleRow","lastSlotRow","row","_createRowsLayout","_createColumnsLayout","_footer","html","isWorkDay","action","after","msMin","msMax","msMajorInterval","msInterval","startDay","msStart","majorTickDivider","isMajorTickRow","isMiddleRow","isLastSlotRow","_content","allDayVerticalGroupRow","appendRow","rowIdx","isVerticalGroupped","rowLevels","result","columnLevels","tmplDate","classes","groupIdx","_isWorkDay","append","i","day","getDay","_render","allDayHeader","_startDate","_endDate","createLayout","refreshLayout","_allDayHeaderHeight","datesHeader","th","currentTarget","outerHeight","_end","nextDate","nextDay","previousDate","previousDay","destroy","clearInterval","off","inRange","selectionByElement","_timeSlotIndex","eventStartTime","timeSlotInterval","_slotIndex","_dateSlotIndex","slotStart","slotEnd","slots","_positionAllDayEvent","slotRange","rowEvents","j","eventLength","slotWidth","startIndex","index","endIndex","allDayEvents","collidingEvents","currentColumnCount","_headerColumnCount","leftOffset","rightOffset","eventHeight","addEvent","slotIndex","createRows","_arrangeColumns","eventRightOffset","columnEvents","eventElements","slotEvents","columnWidth","createColumns","style","_positionEvent","_startTime","_endTime","isOneDayEvent","head","tail","middle","eventStartDate","eventEndDate","data","isMobile","showDelete","resizable","resize","_time","eventEndTime","eventResources","apply","ns","singleDay","inverseColor","_shouldInverseResourceColor","angular","elements","dataItem","_isInTimeSlot","slotStartTime","slotEndTime","_date","_isInDateSlot","firstSlot","lastSlot","_updateAllDayHeaderHeight","allDaySlots","_height","refresh","_renderEvents","isMultiDayEvent","rangeCount","occurrence","allDayEventContainer","slotRanges","render","eventsByResource","eventsPerDate","Query","sort","field","dir","toArray","_eventsByResource","map","grep","itemIdx","eventsFilteredByResource","resource","_resourceValue","operator","groupEqFilter","slice","level","columnLevel","rowLevel","clearSelection","removeAttr","removeClass","_updateDirection","selection","multiple","reverse","vertical","isDaySlot","endSlot","backward","_changeViewPeriod","endMilliseconds","DayView","WeekView","selectedDate","dayOfWeek","calendarInfo","firstDay","WorkWeekView","weekStart","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,2BAA4B,wBAAyBD,IAC9D,WA2tCE,MAltCC,UAAUE,EAAGC,GAGV,QAASC,GAAgBC,GACrB,GAAIC,GAAa,GAAIC,MAAK,KAAM,EAAG,EAAG,EAAG,EAAG,EAE5C,OADAC,GAAQF,EAAYG,EAAgBJ,IAC7BC,EAEX,QAASI,GAAcC,EAAOC,EAAKC,GAC/B,MAAOF,IAASC,GAAgBC,GAATF,EAE3B,QAASG,GAAcH,EAAOC,EAAKC,EAAKE,GAEpC,MADAA,GAAWA,EAAoBF,GAATF,EAAuBE,EAARF,EAC9BA,EAAQC,GAAOG,EAE1B,QAASC,GAAmBC,EAAOC,EAAOC,EAASC,GAAnD,GAKYC,GAJJC,EAASL,EAAMM,kBACfC,EAAYF,EAAOA,EAAOG,OAAS,GACnCC,EAAYC,EAAQT,EAAMU,MAAMF,aAAaG,SACjD,IAAIT,GAAYI,GAAaG,EAAQH,EAAUI,MAAMF,aAAaG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AkBrL,IACjI,KAAKnP,EAAM,EAAGI,EAAS,EAASA,EAANJ,EAAcA,IACpCmP,EAAMrO,KAAKP,GACXA,EAAQK,EAAM5B,KAAK4T,QAAQrS,EAE/B+B,MAAKyP,QAAQ5C,MAGrBsL,aAActY,EAAaX,QACvBR,SACI0B,KAAM,eACND,MAAO,YACP+I,mBAAoB,gBACpBC,wBAAyB,iBAE7B/I,KAAM,WACNiQ,SAAU,WACN,MAAO/R,GAAM5B,KAAKsb,UAAU1Z,EAAM5B,KAAK4T,QAAQtQ,KAAKjC,aAAciC,KAAKiY,eAAeC,SAAU,IAEpG3H,aAAc,WACV,GAAI6H,GAAY9Z,EAAM5B,KAAKsb,UAAUhY,KAAKjC,YAAaiC,KAAKiY,eAAeC,SAAU,GACrF,OAAO5Z,GAAM5B,KAAK8T,YAAY4H,IAElC5X,mBAAoB,WAEhB,IADA,GAAIuX,GAAe/X,KAAKtB,QAAQhC,KAAMsb,EAAY1Z,EAAM5B,KAAKsb,UAAWI,EAAYJ,EAAUD,EAAc/X,KAAKiY,eAAeC,SAAU,IAAKja,EAAQ+Z,EAAUI,EAAWpY,KAAKtB,QAAQG,cAAe,GAAIN,EAAMyZ,EAAU/Z,EAAO+B,KAAKtB,QAAQI,YAAa,GAAI+N,KACjPtO,GAATN,GACH4O,EAAMrO,KAAKP,GACXA,EAAQK,EAAM5B,KAAK4T,QAAQrS,EAE/B+B,MAAKyP,QAAQ5C,SAI3B9N,OAAOT,MAAM+Z,QACRtZ,OAAOT,OACE,kBAAVhC,SAAwBA,OAAOgc,IAAMhc,OAAS,SAAUic,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.scheduler.dayview.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('kendo.scheduler.dayview', ['kendo.scheduler.view'], f);\n}(function () {\n var __meta__ = {\n id: 'scheduler.dayview',\n name: 'Scheduler Day View',\n category: 'web',\n description: 'The Scheduler Day View',\n depends: ['scheduler.view'],\n hidden: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, setTime = kendo.date.setTime, SchedulerView = ui.SchedulerView, extend = $.extend, proxy = $.proxy, getDate = kendo.date.getDate, MS_PER_MINUTE = kendo.date.MS_PER_MINUTE, MS_PER_DAY = kendo.date.MS_PER_DAY, getMilliseconds = kendo.date.getMilliseconds, NS = '.kendoMultiDayView';\n var DAY_VIEW_EVENT_TEMPLATE = kendo.template('
' + '
#:kendo.format(\"{0:t} - {1:t}\", start, end)#
' + '
${title}
' + '
'), DAY_VIEW_ALL_DAY_EVENT_TEMPLATE = kendo.template('
' + '
${title}
' + '
'), DATA_HEADER_TEMPLATE = kendo.template('#=kendo.toString(date, \\'ddd M/dd\\')#'), ALLDAY_EVENT_WRAPPER_STRING = '
' + '' + '# if(data.tail || data.middle) {#' + '' + '#}#' + '# if(data.isException()) {#' + '' + '# } else if(data.isRecurring()) {#' + '' + '# } #' + '' + '{0}' + '' + '#if (showDelete) {#' + '' + '#}#' + '# if(data.head || data.middle) {#' + '' + '#}#' + '' + '#if(resizable && !singleDay && !data.tail && !data.middle){#' + '' + '#}#' + '#if(resizable && !singleDay && !data.head && !data.middle){#' + '' + '#}#' + '
', EVENT_WRAPPER_STRING = '
' + '' + '# if(data.isException()) {#' + '' + '# } else if(data.isRecurring()) {#' + '' + '# } #' + '' + '{0}' + '' + '#if (showDelete) {#' + '' + '#}#' + '' + '' + '# if(data.tail || data.middle) {#' + '' + '# } #' + '' + '' + '# if(data.head || data.middle) {#' + '' + '# } #' + '' + '# if(resizable && !data.tail && !data.middle) {#' + '' + '# } #' + '# if(resizable && !data.head && !data.middle) {#' + '' + '# } #' + '
';\n function toInvariantTime(date) {\n var staticDate = new Date(1980, 1, 1, 0, 0, 0);\n setTime(staticDate, getMilliseconds(date));\n return staticDate;\n }\n function isInDateRange(value, min, max) {\n return value >= min && value <= max;\n }\n function isInTimeRange(value, min, max, overlaps) {\n overlaps = overlaps ? value <= max : value < max;\n return value > min && overlaps;\n }\n function addContinuousEvent(group, range, element, isAllDay) {\n var events = group._continuousEvents;\n var lastEvent = events[events.length - 1];\n var startDate = getDate(range.start.startDate()).getTime();\n if (isAllDay && lastEvent && getDate(lastEvent.start.startDate()).getTime() == startDate) {\n var idx = events.length - 1;\n for (; idx > -1; idx--) {\n if (events[idx].isAllDay || getDate(events[idx].start.startDate()).getTime() < startDate) {\n break;\n }\n }\n events.splice(idx + 1, 0, {\n element: element,\n isAllDay: true,\n uid: element.attr(kendo.attr('uid')),\n start: range.start,\n end: range.end\n });\n } else {\n events.push({\n element: element,\n isAllDay: isAllDay,\n uid: element.attr(kendo.attr('uid')),\n start: range.start,\n end: range.end\n });\n }\n }\n function getWorkDays(options) {\n var workDays = [];\n var dayIndex = options.workWeekStart;\n workDays.push(dayIndex);\n while (options.workWeekEnd != dayIndex) {\n if (dayIndex > 6) {\n dayIndex -= 7;\n } else {\n dayIndex++;\n }\n workDays.push(dayIndex);\n }\n return workDays;\n }\n var MultiDayView = SchedulerView.extend({\n init: function (element, options) {\n var that = this;\n SchedulerView.fn.init.call(that, element, options);\n that.title = that.options.title || that.options.name;\n that._workDays = getWorkDays(that.options);\n that._templates();\n that._editable();\n that.calculateDateRange();\n that._groups();\n that._currentTime();\n },\n _currentTimeMarkerUpdater: function () {\n var currentTime = new Date();\n var options = this.options;\n if (options.currentTimeMarker.useLocalTimezone === false) {\n var timezone = options.dataSource.options.schema.timezone;\n if (options.dataSource && timezone) {\n var timezoneOffset = kendo.timezone.offset(currentTime, timezone);\n currentTime = kendo.timezone.convert(currentTime, currentTime.getTimezoneOffset(), timezoneOffset);\n }\n }\n this.times.find('.k-current-time').remove();\n var groupsCount = !options.group || options.group.orientation == 'horizontal' ? 1 : this.groups.length;\n for (var groupIndex = 0; groupIndex < groupsCount; groupIndex++) {\n var currentGroup = this.groups[groupIndex];\n var utcCurrentTime = kendo.date.toUtcTime(currentTime);\n var ranges = currentGroup.timeSlotRanges(utcCurrentTime, utcCurrentTime + 1);\n if (ranges.length === 0) {\n return;\n }\n var collection = ranges[0].collection;\n var slotElement = collection.slotByStartDate(currentTime);\n if (slotElement) {\n var element = $('
');\n element.appendTo(this.times).css({\n top: Math.round(ranges[0].innerRect(currentTime, new Date(currentTime.getTime() + 1), false).top),\n height: '1px',\n right: '1px',\n left: 0\n });\n }\n }\n },\n _currentTime: function () {\n var that = this;\n var markerOptions = that.options.currentTimeMarker;\n if (markerOptions !== false && markerOptions.updateInterval !== undefined) {\n var updateInterval = markerOptions.updateInterval;\n that._currentTimeMarkerUpdater();\n that._currentTimeUpdateTimer = setInterval(proxy(this._currentTimeMarkerUpdater, that), updateInterval);\n }\n },\n _updateResizeHint: function (event, groupIndex, startTime, endTime) {\n var multiday = event.isMultiDay();\n var group = this.groups[groupIndex];\n var ranges = group.ranges(startTime, endTime, multiday, event.isAllDay);\n this._removeResizeHint();\n for (var rangeIndex = 0; rangeIndex < ranges.length; rangeIndex++) {\n var range = ranges[rangeIndex];\n var start = range.startSlot();\n var width = start.offsetWidth;\n var height = start.clientHeight;\n var top = start.offsetTop;\n if (multiday) {\n width = range.innerWidth();\n } else {\n var rect = range.outerRect(startTime, endTime, this.options.snap);\n top = rect.top;\n height = rect.bottom - rect.top;\n }\n var hint = SchedulerView.fn._createResizeHint.call(this, start.offsetLeft, top, width, height);\n this._resizeHint = this._resizeHint.add(hint);\n }\n var format = 't';\n var container = this.content;\n if (multiday) {\n format = 'M/dd';\n container = this.element.find('.k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div');\n if (!container.length) {\n container = this.content;\n }\n }\n this._resizeHint.appendTo(container);\n this._resizeHint.find('.k-label-top,.k-label-bottom').text('');\n this._resizeHint.first().addClass('k-first').find('.k-label-top').text(kendo.toString(kendo.timezone.toLocalDate(startTime), format));\n this._resizeHint.last().addClass('k-last').find('.k-label-bottom').text(kendo.toString(kendo.timezone.toLocalDate(endTime), format));\n },\n _updateMoveHint: function (event, groupIndex, distance) {\n var multiday = event.isMultiDay();\n var group = this.groups[groupIndex];\n var start = kendo.date.toUtcTime(event.start) + distance;\n var end = start + event.duration();\n var ranges = group.ranges(start, end, multiday, event.isAllDay);\n start = kendo.timezone.toLocalDate(start);\n end = kendo.timezone.toLocalDate(end);\n this._removeMoveHint();\n if (!multiday && (getMilliseconds(end) === 0 || getMilliseconds(end) < getMilliseconds(this.startTime()))) {\n if (ranges.length > 1) {\n ranges.pop();\n }\n }\n for (var rangeIndex = 0; rangeIndex < ranges.length; rangeIndex++) {\n var range = ranges[rangeIndex];\n var startSlot = range.start;\n var hint = this._createEventElement(event.clone({\n start: start,\n end: end\n }), !multiday);\n hint.addClass('k-event-drag-hint');\n var css = {\n left: startSlot.offsetLeft + 2,\n top: startSlot.offsetTop\n };\n if (this._isRtl) {\n css.left = startSlot.clientWidth * 0.1 + startSlot.offsetLeft + 2;\n }\n if (multiday) {\n css.width = range.innerWidth() - 4;\n } else {\n var rect = range.outerRect(start, end, this.options.snap);\n css.top = rect.top;\n css.height = rect.bottom - rect.top;\n css.width = startSlot.clientWidth * 0.9 - 4;\n }\n hint.css(css);\n this._moveHint = this._moveHint.add(hint);\n }\n var content = this.content;\n if (multiday) {\n content = this.element.find('.k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div');\n if (!content.length) {\n content = this.content;\n }\n }\n this._moveHint.appendTo(content);\n },\n _slotByPosition: function (x, y) {\n var slot;\n var offset;\n if (this._isVerticallyGrouped()) {\n offset = this.content.offset();\n y += this.content[0].scrollTop;\n x += this.content[0].scrollLeft;\n } else {\n offset = this.element.find('.k-scheduler-header-wrap:has(.k-scheduler-header-all-day)').find('>div').offset();\n }\n if (offset) {\n x -= offset.left;\n y -= offset.top;\n }\n x = Math.ceil(x);\n y = Math.ceil(y);\n var group;\n var groupIndex;\n for (groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {\n group = this.groups[groupIndex];\n slot = group.daySlotByPosition(x, y);\n if (slot) {\n return slot;\n }\n }\n if (offset) {\n x += offset.left;\n y += offset.top;\n }\n offset = this.content.offset();\n x -= offset.left;\n y -= offset.top;\n if (!this._isVerticallyGrouped()) {\n y += this.content[0].scrollTop;\n x += this.content[0].scrollLeft;\n }\n x = Math.ceil(x);\n y = Math.ceil(y);\n for (groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {\n group = this.groups[groupIndex];\n slot = group.timeSlotByPosition(x, y);\n if (slot) {\n return slot;\n }\n }\n return null;\n },\n _groupCount: function () {\n var resources = this.groupedResources;\n if (resources.length) {\n if (this._groupOrientation() === 'vertical') {\n return this._rowCountForLevel(resources.length - 1);\n } else {\n return this._columnCountForLevel(resources.length) / this._columnOffsetForResource(resources.length);\n }\n }\n return 1;\n },\n _columnCountInResourceView: function () {\n var resources = this.groupedResources;\n if (!resources.length || this._isVerticallyGrouped()) {\n return this._columnCountForLevel(0);\n }\n return this._columnOffsetForResource(resources.length);\n },\n _timeSlotGroups: function (groupCount, columnCount) {\n var interval = this._timeSlotInterval();\n var tableRows = this.content.find('tr:not(.k-scheduler-header-all-day)');\n tableRows.attr('role', 'row');\n var rowCount = tableRows.length;\n if (this._isVerticallyGrouped()) {\n rowCount = Math.floor(rowCount / groupCount);\n }\n for (var groupIndex = 0; groupIndex < groupCount; groupIndex++) {\n var rowMultiplier = 0;\n if (this._isVerticallyGrouped()) {\n rowMultiplier = groupIndex;\n }\n var rowIndex = rowMultiplier * rowCount;\n var time;\n var cellMultiplier = 0;\n if (!this._isVerticallyGrouped()) {\n cellMultiplier = groupIndex;\n }\n while (rowIndex < (rowMultiplier + 1) * rowCount) {\n var cells = tableRows[rowIndex].children;\n var group = this.groups[groupIndex];\n if (rowIndex % rowCount === 0) {\n time = getMilliseconds(new Date(+this.startTime()));\n }\n for (var cellIndex = cellMultiplier * columnCount; cellIndex < (cellMultiplier + 1) * columnCount; cellIndex++) {\n var cell = cells[cellIndex];\n var collectionIndex = cellIndex % columnCount;\n var collection = group.getTimeSlotCollection(collectionIndex);\n var currentDate = this._dates[collectionIndex];\n var currentTime = Date.UTC(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());\n var start = currentTime + time;\n var end = start + interval;\n cell.setAttribute('role', 'gridcell');\n cell.setAttribute('aria-selected', false);\n collection.addTimeSlot(cell, start, end);\n }\n time += interval;\n rowIndex++;\n }\n }\n },\n _daySlotGroups: function (groupCount, columnCount) {\n var tableRows;\n if (this._isVerticallyGrouped()) {\n tableRows = this.element.find('.k-scheduler-header-all-day');\n } else {\n tableRows = this.element.find('.k-scheduler-header-all-day tr');\n }\n tableRows.attr('role', 'row');\n for (var groupIndex = 0; groupIndex < groupCount; groupIndex++) {\n var rowMultiplier = 0;\n if (this._isVerticallyGrouped()) {\n rowMultiplier = groupIndex;\n }\n var group = this.groups[groupIndex];\n var collection = group.getDaySlotCollection(0);\n var cells = tableRows[rowMultiplier].children;\n var cellMultiplier = 0;\n if (!this._isVerticallyGrouped()) {\n cellMultiplier = groupIndex;\n }\n var cellCount = 0;\n for (var cellIndex = cellMultiplier * columnCount; cellIndex < (cellMultiplier + 1) * columnCount; cellIndex++) {\n var cell = cells[cellIndex];\n if (cellIndex % columnCount === 0) {\n cellCount = 0;\n }\n var start = this._dates[cellCount];\n var currentTime = Date.UTC(start.getFullYear(), start.getMonth(), start.getDate());\n cellCount++;\n cell.setAttribute('role', 'gridcell');\n cell.setAttribute('aria-selected', false);\n collection.addDaySlot(cell, currentTime, currentTime + kendo.date.MS_PER_DAY);\n }\n }\n },\n _groups: function () {\n var groupCount = this._groupCount();\n var columnCount = this._columnCountInResourceView();\n this.groups = [];\n for (var idx = 0; idx < groupCount; idx++) {\n var view = this._addResourceView(idx);\n for (var columnIndex = 0; columnIndex < columnCount; columnIndex++) {\n view.addTimeSlotCollection(this._dates[columnIndex], kendo.date.addDays(this._dates[columnIndex], 1));\n }\n if (this.options.allDaySlot) {\n view.addDaySlotCollection(this._dates[0], kendo.date.addDays(this._dates[this._dates.length - 1], 1));\n }\n }\n this._timeSlotGroups(groupCount, columnCount);\n if (this.options.allDaySlot) {\n this._daySlotGroups(groupCount, columnCount);\n }\n },\n options: {\n name: 'MultiDayView',\n selectedDateFormat: '{0:D}',\n selectedShortDateFormat: '{0:d}',\n allDaySlot: true,\n showWorkHours: false,\n title: '',\n startTime: kendo.date.today(),\n endTime: kendo.date.today(),\n minorTickCount: 2,\n majorTick: 60,\n majorTimeHeaderTemplate: '#=kendo.toString(date, \\'t\\')#',\n minorTimeHeaderTemplate: ' ',\n groupHeaderTemplate: '#=text#',\n slotTemplate: ' ',\n allDaySlotTemplate: ' ',\n eventTemplate: DAY_VIEW_EVENT_TEMPLATE,\n allDayEventTemplate: DAY_VIEW_ALL_DAY_EVENT_TEMPLATE,\n dateHeaderTemplate: DATA_HEADER_TEMPLATE,\n editable: true,\n workDayStart: new Date(1980, 1, 1, 8, 0, 0),\n workDayEnd: new Date(1980, 1, 1, 17, 0, 0),\n workWeekStart: 1,\n workWeekEnd: 5,\n footer: { command: 'workDay' },\n messages: {\n allDay: 'all day',\n showFullDay: 'Show full day',\n showWorkDay: 'Show business hours'\n },\n currentTimeMarker: {\n updateInterval: 10000,\n useLocalTimezone: true\n }\n },\n events: [\n 'remove',\n 'add',\n 'edit'\n ],\n _templates: function () {\n var options = this.options, settings = extend({}, kendo.Template, options.templateSettings);\n this.eventTemplate = this._eventTmpl(options.eventTemplate, EVENT_WRAPPER_STRING);\n this.allDayEventTemplate = this._eventTmpl(options.allDayEventTemplate, ALLDAY_EVENT_WRAPPER_STRING);\n this.majorTimeHeaderTemplate = kendo.template(options.majorTimeHeaderTemplate, settings);\n this.minorTimeHeaderTemplate = kendo.template(options.minorTimeHeaderTemplate, settings);\n this.dateHeaderTemplate = kendo.template(options.dateHeaderTemplate, settings);\n this.slotTemplate = kendo.template(options.slotTemplate, settings);\n this.allDaySlotTemplate = kendo.template(options.allDaySlotTemplate, settings);\n this.groupHeaderTemplate = kendo.template(options.groupHeaderTemplate, settings);\n },\n _editable: function () {\n if (this.options.editable) {\n if (this._isMobile()) {\n this._touchEditable();\n } else {\n this._mouseEditable();\n }\n }\n },\n _mouseEditable: function () {\n var that = this;\n that.element.on('click' + NS, '.k-event a:has(.k-si-close)', function (e) {\n that.trigger('remove', { uid: $(this).closest('.k-event').attr(kendo.attr('uid')) });\n e.preventDefault();\n });\n if (that.options.editable.create !== false) {\n that.element.on('dblclick' + NS, '.k-scheduler-content td', function (e) {\n if (!$(this).parent().hasClass('k-scheduler-header-all-day')) {\n var slot = that._slotByPosition(e.pageX, e.pageY);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({\n start: slot.startDate(),\n end: slot.endDate()\n }, resourceInfo)\n });\n }\n e.preventDefault();\n }\n }).on('dblclick' + NS, '.k-scheduler-header-all-day td', function (e) {\n var slot = that._slotByPosition(e.pageX, e.pageY);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({}, {\n isAllDay: true,\n start: kendo.date.getDate(slot.startDate()),\n end: kendo.date.getDate(slot.startDate())\n }, resourceInfo)\n });\n }\n e.preventDefault();\n });\n }\n if (that.options.editable.update !== false) {\n that.element.on('dblclick' + NS, '.k-event', function (e) {\n that.trigger('edit', { uid: $(this).closest('.k-event').attr(kendo.attr('uid')) });\n e.preventDefault();\n });\n }\n },\n _touchEditable: function () {\n var that = this;\n var threshold = 0;\n if (kendo.support.mobileOS.android) {\n threshold = 5;\n }\n if (that.options.editable.create !== false) {\n that._addUserEvents = new kendo.UserEvents(that.element, {\n threshold: threshold,\n filter: '.k-scheduler-content td',\n tap: function (e) {\n if (!$(e.target).parent().hasClass('k-scheduler-header-all-day')) {\n var x = e.x.location !== undefined ? e.x.location : e.x;\n var y = e.y.location !== undefined ? e.y.location : e.y;\n var slot = that._slotByPosition(x, y);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({\n start: slot.startDate(),\n end: slot.endDate()\n }, resourceInfo)\n });\n }\n e.preventDefault();\n }\n }\n });\n that._allDayUserEvents = new kendo.UserEvents(that.element, {\n threshold: threshold,\n filter: '.k-scheduler-header-all-day td',\n tap: function (e) {\n var x = e.x.location !== undefined ? e.x.location : e.x;\n var y = e.y.location !== undefined ? e.y.location : e.y;\n var slot = that._slotByPosition(x, y);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({}, {\n isAllDay: true,\n start: kendo.date.getDate(slot.startDate()),\n end: kendo.date.getDate(slot.startDate())\n }, resourceInfo)\n });\n }\n e.preventDefault();\n }\n });\n }\n if (that.options.editable.update !== false) {\n that._editUserEvents = new kendo.UserEvents(that.element, {\n threshold: threshold,\n filter: '.k-event',\n tap: function (e) {\n var eventElement = $(e.target).closest('.k-event');\n if (!eventElement.hasClass('k-event-active')) {\n that.trigger('edit', { uid: eventElement.attr(kendo.attr('uid')) });\n }\n e.preventDefault();\n }\n });\n }\n },\n _layout: function (dates) {\n var columns = [];\n var rows = [];\n var options = this.options;\n var that = this;\n for (var idx = 0; idx < dates.length; idx++) {\n var column = {};\n column.text = that.dateHeaderTemplate({ date: dates[idx] });\n if (kendo.date.isToday(dates[idx])) {\n column.className = 'k-today';\n }\n columns.push(column);\n }\n var resources = this.groupedResources;\n if (options.allDaySlot) {\n rows.push({\n text: options.messages.allDay,\n allDay: true,\n cellContent: function (idx) {\n var groupIndex = idx;\n idx = resources.length && that._groupOrientation() !== 'vertical' ? idx % dates.length : idx;\n return that.allDaySlotTemplate({\n date: dates[idx],\n resources: function () {\n return that._resourceBySlot({ groupIndex: groupIndex });\n }\n });\n }\n });\n }\n this._forTimeRange(this.startTime(), this.endTime(), function (date, majorTick, middleRow, lastSlotRow) {\n var template = majorTick ? that.majorTimeHeaderTemplate : that.minorTimeHeaderTemplate;\n var row = {\n text: template({ date: date }),\n className: lastSlotRow ? 'k-slot-cell' : ''\n };\n rows.push(row);\n });\n if (resources.length) {\n if (this._groupOrientation() === 'vertical') {\n rows = this._createRowsLayout(resources, rows, this.groupHeaderTemplate);\n } else {\n columns = this._createColumnsLayout(resources, columns, this.groupHeaderTemplate);\n }\n }\n return {\n columns: columns,\n rows: rows\n };\n },\n _footer: function () {\n var options = this.options;\n if (options.footer !== false) {\n var html = '
';\n var command = options.footer.command;\n if (command && command === 'workDay') {\n html += '';\n } else {\n html += ' ';\n }\n html += '
';\n this.footer = $(html).appendTo(this.element);\n var that = this;\n this.footer.on('click' + NS, '.k-scheduler-fullday', function (e) {\n e.preventDefault();\n that.trigger('navigate', {\n view: that.name || options.name,\n date: that.startDate(),\n isWorkDay: !options.showWorkHours\n });\n });\n }\n },\n _forTimeRange: function (min, max, action, after) {\n min = toInvariantTime(min);\n max = toInvariantTime(max);\n var that = this, msMin = getMilliseconds(min), msMax = getMilliseconds(max), minorTickCount = that.options.minorTickCount, msMajorInterval = that.options.majorTick * MS_PER_MINUTE, msInterval = msMajorInterval / minorTickCount || 1, start = new Date(+min), startDay = start.getDate(), msStart, idx = 0, length, html = '';\n length = MS_PER_DAY / msInterval;\n if (msMin != msMax) {\n if (msMin > msMax) {\n msMax += MS_PER_DAY;\n }\n length = (msMax - msMin) / msInterval;\n }\n length = Math.round(length);\n for (; idx < length; idx++) {\n var majorTickDivider = idx % (msMajorInterval / msInterval), isMajorTickRow = majorTickDivider === 0, isMiddleRow = majorTickDivider < minorTickCount - 1, isLastSlotRow = majorTickDivider === minorTickCount - 1;\n html += action(start, isMajorTickRow, isMiddleRow, isLastSlotRow);\n setTime(start, msInterval, false);\n }\n if (msMax) {\n msStart = getMilliseconds(start);\n if (startDay < start.getDate()) {\n msStart += MS_PER_DAY;\n }\n if (msStart > msMax) {\n start = new Date(+max);\n }\n }\n if (after) {\n html += after(start);\n }\n return html;\n },\n _content: function (dates) {\n var that = this;\n var options = that.options;\n var start = that.startTime();\n var end = this.endTime();\n var groupsCount = 1;\n var rowCount = 1;\n var columnCount = dates.length;\n var html = '';\n var resources = this.groupedResources;\n var slotTemplate = this.slotTemplate;\n var allDaySlotTemplate = this.allDaySlotTemplate;\n var isVerticalGroupped = false;\n var allDayVerticalGroupRow;\n if (resources.length) {\n isVerticalGroupped = that._groupOrientation() === 'vertical';\n if (isVerticalGroupped) {\n rowCount = this._rowCountForLevel(this.rowLevels.length - 2);\n if (options.allDaySlot) {\n allDayVerticalGroupRow = function (groupIndex) {\n var result = '';\n var resources = function () {\n return that._resourceBySlot({ groupIndex: groupIndex });\n };\n for (var idx = 0, length = dates.length; idx < length; idx++) {\n result += '' + allDaySlotTemplate({\n date: dates[idx],\n resources: resources\n }) + '';\n }\n return result + '';\n };\n }\n } else {\n groupsCount = this._columnCountForLevel(this.columnLevels.length - 2);\n }\n }\n html += '';\n var appendRow = function (date, majorTick) {\n var content = '';\n var idx;\n var length;\n var classes = '';\n var tmplDate;\n var groupIdx = 0;\n content = '';\n var resources = function (groupIndex) {\n return function () {\n return that._resourceBySlot({ groupIndex: groupIndex });\n };\n };\n for (; groupIdx < groupsCount; groupIdx++) {\n for (idx = 0, length = columnCount; idx < length; idx++) {\n classes = '';\n if (kendo.date.isToday(dates[idx])) {\n classes += 'k-today';\n }\n if (kendo.date.getMilliseconds(date) < kendo.date.getMilliseconds(that.options.workDayStart) || kendo.date.getMilliseconds(date) >= kendo.date.getMilliseconds(that.options.workDayEnd) || !that._isWorkDay(dates[idx])) {\n classes += ' k-nonwork-hour';\n }\n content += '';\n tmplDate = kendo.date.getDate(dates[idx]);\n kendo.date.setTime(tmplDate, kendo.date.getMilliseconds(date));\n content += slotTemplate({\n date: tmplDate,\n resources: resources(isVerticalGroupped ? rowIdx : groupIdx)\n });\n content += '';\n }\n }\n content += '';\n return content;\n };\n for (var rowIdx = 0; rowIdx < rowCount; rowIdx++) {\n html += allDayVerticalGroupRow ? allDayVerticalGroupRow(rowIdx) : '';\n html += this._forTimeRange(start, end, appendRow);\n }\n html += '';\n this.content.find('table').append(html);\n },\n _isWorkDay: function (date) {\n var day = date.getDay();\n var workDays = this._workDays;\n for (var i = 0; i < workDays.length; i++) {\n if (workDays[i] === day) {\n return true;\n }\n }\n return false;\n },\n _render: function (dates) {\n var that = this;\n dates = dates || [];\n this._dates = dates;\n this._startDate = dates[0];\n this._endDate = dates[dates.length - 1 || 0];\n this.createLayout(this._layout(dates));\n this._content(dates);\n this._footer();\n this.refreshLayout();\n var allDayHeader = this.element.find('.k-scheduler-header-all-day td');\n if (allDayHeader.length) {\n this._allDayHeaderHeight = allDayHeader.first()[0].clientHeight;\n }\n that.datesHeader.on('click' + NS, '.k-nav-day', function (e) {\n var th = $(e.currentTarget).closest('th');\n var offset = th.offset();\n var slot = that._slotByPosition(offset.left, offset.top + th.outerHeight());\n that.trigger('navigate', {\n view: 'day',\n date: slot.startDate()\n });\n });\n },\n startTime: function () {\n var options = this.options;\n return options.showWorkHours ? options.workDayStart : options.startTime;\n },\n endTime: function () {\n var options = this.options;\n return options.showWorkHours ? options.workDayEnd : options.endTime;\n },\n startDate: function () {\n return this._startDate;\n },\n endDate: function () {\n return this._endDate;\n },\n _end: function (isAllDay) {\n var time = getMilliseconds(this.endTime()) || MS_PER_DAY;\n if (isAllDay) {\n time = 0;\n }\n return new Date(this._endDate.getTime() + time);\n },\n nextDate: function () {\n return kendo.date.nextDay(this.endDate());\n },\n previousDate: function () {\n return kendo.date.previousDay(this.startDate());\n },\n calculateDateRange: function () {\n this._render([this.options.date]);\n },\n destroy: function () {\n var that = this;\n if (that._currentTimeUpdateTimer) {\n clearInterval(that._currentTimeUpdateTimer);\n }\n if (that.datesHeader) {\n that.datesHeader.off(NS);\n }\n if (that.element) {\n that.element.off(NS);\n }\n if (that.footer) {\n that.footer.remove();\n }\n SchedulerView.fn.destroy.call(this);\n if (this._isMobile() && that.options.editable) {\n if (that.options.editable.create !== false) {\n that._addUserEvents.destroy();\n that._allDayUserEvents.destroy();\n }\n if (that.options.editable.update !== false) {\n that._editUserEvents.destroy();\n }\n }\n },\n inRange: function (options) {\n var inRange = SchedulerView.fn.inRange.call(this, options);\n var startTime = getMilliseconds(this.startTime());\n var endTime = getMilliseconds(this.endTime()) || kendo.date.MS_PER_DAY;\n var start = getMilliseconds(options.start);\n var end = getMilliseconds(options.end) || kendo.date.MS_PER_DAY;\n return inRange && startTime <= start && end <= endTime;\n },\n selectionByElement: function (cell) {\n var offset = cell.offset();\n return this._slotByPosition(offset.left, offset.top);\n },\n _timeSlotInterval: function () {\n var options = this.options;\n return options.majorTick / options.minorTickCount * MS_PER_MINUTE;\n },\n _timeSlotIndex: function (date) {\n var options = this.options;\n var eventStartTime = getMilliseconds(date);\n var startTime = getMilliseconds(this.startTime());\n var timeSlotInterval = options.majorTick / options.minorTickCount * MS_PER_MINUTE;\n return (eventStartTime - startTime) / timeSlotInterval;\n },\n _slotIndex: function (date, multiday) {\n if (multiday) {\n return this._dateSlotIndex(date);\n }\n return this._timeSlotIndex(date);\n },\n _dateSlotIndex: function (date, overlaps) {\n var idx;\n var length;\n var slots = this._dates || [];\n var slotStart;\n var slotEnd;\n var offset = 1;\n for (idx = 0, length = slots.length; idx < length; idx++) {\n slotStart = kendo.date.getDate(slots[idx]);\n slotEnd = new Date(kendo.date.getDate(slots[idx]).getTime() + MS_PER_DAY - (overlaps ? 0 : 1));\n if (isInDateRange(date, slotStart, slotEnd)) {\n return idx * offset;\n }\n }\n return -1;\n },\n _positionAllDayEvent: function (element, slotRange) {\n var slotWidth = slotRange.innerWidth();\n var startIndex = slotRange.start.index;\n var endIndex = slotRange.end.index;\n var allDayEvents = SchedulerView.collidingEvents(slotRange.events(), startIndex, endIndex);\n var currentColumnCount = this._headerColumnCount || 0;\n var leftOffset = 2;\n var rightOffset = startIndex !== endIndex ? 5 : 4;\n var eventHeight = this._allDayHeaderHeight;\n var start = slotRange.startSlot();\n element.css({\n left: start.offsetLeft + leftOffset,\n width: slotWidth - rightOffset\n });\n slotRange.addEvent({\n slotIndex: startIndex,\n start: startIndex,\n end: endIndex,\n element: element\n });\n allDayEvents.push({\n slotIndex: startIndex,\n start: startIndex,\n end: endIndex,\n element: element\n });\n var rows = SchedulerView.createRows(allDayEvents);\n if (rows.length && rows.length > currentColumnCount) {\n this._headerColumnCount = rows.length;\n }\n var top = slotRange.start.offsetTop;\n for (var idx = 0, length = rows.length; idx < length; idx++) {\n var rowEvents = rows[idx].events;\n for (var j = 0, eventLength = rowEvents.length; j < eventLength; j++) {\n $(rowEvents[j].element).css({ top: top + idx * eventHeight });\n }\n }\n },\n _arrangeColumns: function (element, top, height, slotRange) {\n var startSlot = slotRange.start;\n element = {\n element: element,\n slotIndex: startSlot.index,\n start: top,\n end: top + height\n };\n var columns, slotWidth = startSlot.clientWidth, eventRightOffset = slotWidth * 0.1, columnEvents, eventElements = slotRange.events(), slotEvents = SchedulerView.collidingEvents(eventElements, element.start, element.end);\n slotRange.addEvent(element);\n slotEvents.push(element);\n columns = SchedulerView.createColumns(slotEvents);\n var columnWidth = (slotWidth - eventRightOffset) / columns.length;\n for (var idx = 0, length = columns.length; idx < length; idx++) {\n columnEvents = columns[idx].events;\n for (var j = 0, eventLength = columnEvents.length; j < eventLength; j++) {\n columnEvents[j].element[0].style.width = columnWidth - 4 + 'px';\n columnEvents[j].element[0].style.left = (this._isRtl ? eventRightOffset : 0) + startSlot.offsetLeft + idx * columnWidth + 2 + 'px';\n }\n }\n },\n _positionEvent: function (event, element, slotRange) {\n var start = event._startTime || event.start;\n var end = event._endTime || event.end;\n var rect = slotRange.innerRect(start, end, false);\n var height = rect.bottom - rect.top - 2;\n if (height < 0) {\n height = 0;\n }\n element.css({\n top: rect.top,\n height: height\n });\n this._arrangeColumns(element, rect.top, element[0].clientHeight, slotRange);\n },\n _createEventElement: function (event, isOneDayEvent, head, tail) {\n var template = isOneDayEvent ? this.eventTemplate : this.allDayEventTemplate;\n var options = this.options;\n var editable = options.editable;\n var isMobile = this._isMobile();\n var showDelete = editable && editable.destroy !== false && !isMobile;\n var resizable = editable && editable.resize !== false;\n var startDate = getDate(this.startDate());\n var endDate = getDate(this.endDate());\n var startTime = getMilliseconds(this.startTime());\n var endTime = getMilliseconds(this.endTime());\n var eventStartTime = event._time('start');\n var eventEndTime = event._time('end');\n var middle;\n if (startTime >= endTime) {\n endTime = getMilliseconds(new Date(this.endTime().getTime() + MS_PER_DAY - 1));\n }\n if (!isOneDayEvent && !event.isAllDay) {\n endDate = new Date(endDate.getTime() + MS_PER_DAY);\n }\n var eventStartDate = event.start;\n var eventEndDate = event.end;\n if (event.isAllDay) {\n eventEndDate = getDate(event.end);\n }\n if (!isInDateRange(getDate(eventStartDate), startDate, endDate) && !isInDateRange(eventEndDate, startDate, endDate) || isOneDayEvent && eventStartTime < startTime && eventEndTime > endTime) {\n middle = true;\n } else if (getDate(eventStartDate) < startDate || isOneDayEvent && eventStartTime < startTime) {\n tail = true;\n } else if (eventEndDate > endDate && !isOneDayEvent || isOneDayEvent && eventEndTime > endTime) {\n head = true;\n }\n var resources = this.eventResources(event);\n if (event._startTime && eventStartTime !== kendo.date.getMilliseconds(event.start)) {\n eventStartDate = new Date(eventStartTime);\n eventStartDate = kendo.timezone.apply(eventStartDate, 'Etc/UTC');\n }\n if (event._endTime && eventEndTime !== kendo.date.getMilliseconds(event.end)) {\n eventEndDate = new Date(eventEndTime);\n eventEndDate = kendo.timezone.apply(eventEndDate, 'Etc/UTC');\n }\n var data = extend({}, {\n ns: kendo.ns,\n resizable: resizable,\n showDelete: showDelete,\n middle: middle,\n head: head,\n tail: tail,\n singleDay: this._dates.length == 1,\n resources: resources,\n inverseColor: resources && resources[0] ? this._shouldInverseResourceColor(resources[0]) : false\n }, event, {\n start: eventStartDate,\n end: eventEndDate\n });\n var element = $(template(data));\n this.angular('compile', function () {\n return {\n elements: element,\n data: [{ dataItem: data }]\n };\n });\n return element;\n },\n _isInTimeSlot: function (event) {\n var slotStartTime = this.startTime(), slotEndTime = this.endTime(), startTime = event._startTime || event.start, endTime = event._endTime || event.end;\n if (getMilliseconds(slotEndTime) === getMilliseconds(kendo.date.getDate(slotEndTime))) {\n slotEndTime = kendo.date.getDate(slotEndTime);\n setTime(slotEndTime, MS_PER_DAY - 1);\n }\n if (event._date('end') > event._date('start')) {\n endTime = +event._date('end') + (MS_PER_DAY - 1);\n }\n endTime = endTime - event._date('end');\n startTime = startTime - event._date('start');\n slotEndTime = getMilliseconds(slotEndTime);\n slotStartTime = getMilliseconds(slotStartTime);\n if (slotStartTime === startTime && startTime === endTime) {\n return true;\n }\n var overlaps = startTime !== slotEndTime;\n return isInTimeRange(startTime, slotStartTime, slotEndTime, overlaps) || isInTimeRange(endTime, slotStartTime, slotEndTime, overlaps) || isInTimeRange(slotStartTime, startTime, endTime) || isInTimeRange(slotEndTime, startTime, endTime);\n },\n _isInDateSlot: function (event) {\n var groups = this.groups[0];\n var slotStart = groups.firstSlot().start;\n var slotEnd = groups.lastSlot().end - 1;\n var startTime = kendo.date.toUtcTime(event.start);\n var endTime = kendo.date.toUtcTime(event.end);\n return (isInDateRange(startTime, slotStart, slotEnd) || isInDateRange(endTime, slotStart, slotEnd) || isInDateRange(slotStart, startTime, endTime) || isInDateRange(slotEnd, startTime, endTime)) && (!isInDateRange(endTime, slotStart, slotStart) || isInDateRange(endTime, startTime, startTime) || event.isAllDay);\n },\n _updateAllDayHeaderHeight: function (height) {\n if (this._height !== height) {\n this._height = height;\n var allDaySlots = this.element.find('.k-scheduler-header-all-day td');\n if (allDaySlots.length) {\n allDaySlots.parent().add(this.element.find('.k-scheduler-times-all-day').parent()).height(height);\n for (var groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {\n this.groups[groupIndex].refresh();\n }\n }\n }\n },\n _renderEvents: function (events, groupIndex) {\n var allDayEventContainer = this.datesHeader.find('.k-scheduler-header-wrap > div');\n var event;\n var idx;\n var length;\n for (idx = 0, length = events.length; idx < length; idx++) {\n event = events[idx];\n if (this._isInDateSlot(event)) {\n var isMultiDayEvent = event.isAllDay || event.end.getTime() - event.start.getTime() >= MS_PER_DAY;\n var container = isMultiDayEvent && !this._isVerticallyGrouped() ? allDayEventContainer : this.content;\n var element;\n var ranges;\n var group;\n if (!isMultiDayEvent) {\n if (this._isInTimeSlot(event)) {\n group = this.groups[groupIndex];\n if (!group._continuousEvents) {\n group._continuousEvents = [];\n }\n ranges = group.slotRanges(event);\n var rangeCount = ranges.length;\n for (var rangeIndex = 0; rangeIndex < rangeCount; rangeIndex++) {\n var range = ranges[rangeIndex];\n var start = event.start;\n var end = event.end;\n if (rangeCount > 1) {\n if (rangeIndex === 0) {\n end = range.end.endDate();\n } else if (rangeIndex == rangeCount - 1) {\n start = range.start.startDate();\n } else {\n start = range.start.startDate();\n end = range.end.endDate();\n }\n }\n var occurrence = event.clone({\n start: start,\n end: end,\n _startTime: event._startTime,\n _endTime: event.endTime\n });\n if (this._isInTimeSlot(occurrence)) {\n var head = range.head;\n element = this._createEventElement(event, !isMultiDayEvent, head, range.tail);\n element.appendTo(container);\n this._positionEvent(occurrence, element, range);\n addContinuousEvent(group, range, element, false);\n }\n }\n }\n } else if (this.options.allDaySlot) {\n group = this.groups[groupIndex];\n if (!group._continuousEvents) {\n group._continuousEvents = [];\n }\n ranges = group.slotRanges(event);\n if (ranges.length) {\n element = this._createEventElement(event, !isMultiDayEvent);\n this._positionAllDayEvent(element, ranges[0]);\n addContinuousEvent(group, ranges[0], element, true);\n element.appendTo(container);\n }\n }\n }\n }\n },\n render: function (events) {\n this._headerColumnCount = 0;\n this._groups();\n this.element.find('.k-event').remove();\n events = new kendo.data.Query(events).sort([\n {\n field: 'start',\n dir: 'asc'\n },\n {\n field: 'end',\n dir: 'desc'\n }\n ]).toArray();\n var eventsByResource = [];\n this._eventsByResource(events, this.groupedResources, eventsByResource);\n var eventsPerDate = $.map(this._dates, function (date) {\n return Math.max.apply(null, $.map(eventsByResource, function (events) {\n return $.grep(events, function (event) {\n return event.isMultiDay() && isInDateRange(date, getDate(event.start), getDate(event.end));\n }).length;\n }));\n });\n var height = Math.max.apply(null, eventsPerDate);\n this._updateAllDayHeaderHeight((height + 1) * this._allDayHeaderHeight);\n for (var groupIndex = 0; groupIndex < eventsByResource.length; groupIndex++) {\n this._renderEvents(eventsByResource[groupIndex], groupIndex);\n }\n this.refreshLayout();\n this.trigger('activate');\n },\n _eventsByResource: function (events, resources, result) {\n var resource = resources[0];\n if (resource) {\n var view = resource.dataSource.view();\n for (var itemIdx = 0; itemIdx < view.length; itemIdx++) {\n var value = this._resourceValue(resource, view[itemIdx]);\n var eventsFilteredByResource = new kendo.data.Query(events).filter({\n field: resource.field,\n operator: SchedulerView.groupEqFilter(value)\n }).toArray();\n if (resources.length > 1) {\n this._eventsByResource(eventsFilteredByResource, resources.slice(1), result);\n } else {\n result.push(eventsFilteredByResource);\n }\n }\n } else {\n result.push(events);\n }\n },\n _columnOffsetForResource: function (index) {\n return this._columnCountForLevel(index) / this._columnCountForLevel(index - 1);\n },\n _columnCountForLevel: function (level) {\n var columnLevel = this.columnLevels[level];\n return columnLevel ? columnLevel.length : 0;\n },\n _rowCountForLevel: function (level) {\n var rowLevel = this.rowLevels[level];\n return rowLevel ? rowLevel.length : 0;\n },\n clearSelection: function () {\n this.content.add(this.datesHeader).find('.k-state-selected').removeAttr('id').attr('aria-selected', false).removeClass('k-state-selected');\n },\n _updateDirection: function (selection, ranges, multiple, reverse, vertical) {\n var isDaySlot = selection.isAllDay;\n var startSlot = ranges[0].start;\n var endSlot = ranges[ranges.length - 1].end;\n if (multiple) {\n if (vertical) {\n if (!isDaySlot && startSlot.index === endSlot.index && startSlot.collectionIndex === endSlot.collectionIndex) {\n selection.backward = reverse;\n }\n } else {\n if (isDaySlot && startSlot.index === endSlot.index || !isDaySlot && startSlot.collectionIndex === endSlot.collectionIndex) {\n selection.backward = reverse;\n }\n }\n }\n },\n _changeViewPeriod: function (selection, reverse, vertical) {\n if (!vertical) {\n var date = reverse ? this.previousDate() : this.nextDate();\n var start = selection.start;\n var end = selection.end;\n selection.start = new Date(date);\n selection.end = new Date(date);\n var endMilliseconds = selection.isAllDay ? MS_PER_DAY : getMilliseconds(end);\n setTime(selection.start, getMilliseconds(start));\n setTime(selection.end, endMilliseconds);\n if (!this._isVerticallyGrouped()) {\n selection.groupIndex = reverse ? this.groups.length - 1 : 0;\n }\n selection.events = [];\n return true;\n }\n }\n });\n extend(true, ui, {\n MultiDayView: MultiDayView,\n DayView: MultiDayView.extend({\n options: {\n name: 'DayView',\n title: 'Day'\n },\n name: 'day'\n }),\n WeekView: MultiDayView.extend({\n options: {\n name: 'WeekView',\n title: 'Week',\n selectedDateFormat: '{0:D} - {1:D}',\n selectedShortDateFormat: '{0:d} - {1:d}'\n },\n name: 'week',\n calculateDateRange: function () {\n var selectedDate = this.options.date, start = kendo.date.dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1), idx, length, dates = [];\n for (idx = 0, length = 7; idx < length; idx++) {\n dates.push(start);\n start = kendo.date.nextDay(start);\n }\n this._render(dates);\n }\n }),\n WorkWeekView: MultiDayView.extend({\n options: {\n name: 'WorkWeekView',\n title: 'Work Week',\n selectedDateFormat: '{0:D} - {1:D}',\n selectedShortDateFormat: '{0:d} - {1:d}'\n },\n name: 'workWeek',\n nextDate: function () {\n return kendo.date.dayOfWeek(kendo.date.nextDay(this.startDate()), this.calendarInfo().firstDay, 1);\n },\n previousDate: function () {\n var weekStart = kendo.date.dayOfWeek(this.startDate(), this.calendarInfo().firstDay, -1);\n return kendo.date.previousDay(weekStart);\n },\n calculateDateRange: function () {\n var selectedDate = this.options.date, dayOfWeek = kendo.date.dayOfWeek, weekStart = dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1), start = dayOfWeek(weekStart, this.options.workWeekStart, 1), end = dayOfWeek(start, this.options.workWeekEnd, 1), dates = [];\n while (start <= end) {\n dates.push(start);\n start = kendo.date.nextDay(start);\n }\n this._render(dates);\n }\n })\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"],"sourceRoot":"/source/"}