{"version":3,"sources":["kendo.scheduler.monthview.js"],"names":["f","define","$","shiftArray","array","idx","slice","concat","firstVisibleMonthDay","date","calendarInfo","firstDay","firstVisibleDay","Date","getFullYear","getMonth","getHours","getMinutes","getSeconds","getMilliseconds","getDay","kendo","setTime","MS_PER_DAY","isInDateRange","value","min","max","msValue","msMin","msMax","window","ui","SchedulerView","NS","extend","getDate","NUMBER_OF_ROWS","NUMBER_OF_COLUMNS","DAY_TEMPLATE","template","EVENT_WRAPPER_STRING","EVENT_TEMPLATE","MORE_BUTTON_TEMPLATE","MonthGroupedView","Class","init","view","this","_view","_verticalRowCountForLevel","level","_rowCountForLevel","_horizontalGroupCountForLevel","_columnCountForLevel","_getCalendarRowsLength","cellsPerRow","cellCount","_createRows","start","startIdx","horizontalGroupCount","verticalGroupIndex","groupIdx","isVerticallyGrouped","_isVerticallyGrouped","html","_createRow","_adjustStartDate","addDays","_getContent","content","startDate","resources","_getTimeSlotByPosition","x","y","groupIndex","group","groups","daySlotByPosition","_nextSlotStartDate","nextDay","_createRowsLayout","rows","groupHeaderTemplate","_createVerticalColumnsLayout","columns","_createColumnsLayout","_verticalGroupCount","_horizontalGroupCount","_columnOffsetForResource","_positionEvent","event","range","rangeCount","end","rangeIndex","occurrence","isMobilePhoneView","_isMobilePhoneView","endDate","clone","head","tail","_positionMobileEvent","_createEventElement","_addDaySlotCollections","groupCount","tableRows","rowMultiplier","rowIndex","collection","tableRow","cells","cellMultiplier","cellIndex","cell","columnCount","rowCount","addDaySlotCollection","children","setAttribute","addDaySlot","_changePeriodGroupIndex","reverse","length","_createResizeHint","left","startSlot","offsetLeft","top","offsetTop","width","innerWidth","height","clientHeight","hint","fn","call","_appendResizeHint","_createMoveHint","endSlot","css","firstChildHeight","options","eventHeight","index","addClass","_appendMoveHint","MonthGroupedByDateView","verticalStart","dateIdx","_groupCount","isLastRow","cellIdx","_createDateLayout","dataIndex","obj","resource","configuration","data","dataSource","text","htmlEncode","getter","dataTextField","color","dataColorField","field","title","name","dataValueField","className","push","subColumns","i","currentSlot","dateRange","startIndex","endIndex","_slots","daySlotRanges","dateIndex","currentTableIndex","currentCellIndex","currentGroupIndex","_daySlotCollections","vertical","selectionGroupIndex","slotIdx","slot","offsetWidth","offsetHeight","scheduler","MonthView","element","that","_groupedView","_getGroupedView","_templates","_editable","_renderLayout","_groups","_isGroupedByDate","_updateDirection","selection","ranges","multiple","isSameSlot","isSameCollection","updateDirection","collectionIndex","backward","_changeDate","previous","collections","slotIndex","_getCollections","daySlotCollectionCount","_getNextHorizontalRange","method","horizontalRange","isVertical","_getNextVerticalRange","verticalRange","_changeViewPeriod","pad","events","_continuousSlot","continuousSlot","_changeGroupContinuously","lastGroupIndex","_normalizeHorizontalSelection","_normalizeVerticalSelection","settings","Template","templateSettings","eventTemplate","_eventTmpl","dayTemplate","dateForTitle","format","selectedDateFormat","_firstDayOfMonth","_lastDayOfMonth","shortDateForTitle","selectedShortDateFormat","nextDate","previousDate","previousDay","_startDate","_endDate","firstDayOfMonth","lastDayOfMonth","createLayout","_layout","_content","refreshLayout","on","e","offset","currentTarget","_slotByPosition","preventDefault","trigger","editable","_isMobile","_touchEditable","_mouseEditable","uid","closest","attr","create","resourceInfo","_resourceBySlot","eventInfo","isAllDay","update","threshold","support","mobileOS","android","_addUserEvents","UserEvents","filter","tap","target","_editUserEvents","selectionByElement","columnLevel","columnLevels","rowLevel","rowLevels","verticalGroupIdx","verticalGroupCount","groupedView","groupedResources","_createCalendar","find","calendarRowsLength","rowIdx","weekStartDates","_slotIndices","_weekStartDates","classes","isToday","getTime","inner","weekDayNames","days","namesShort","names","map","isMobile","showDelete","destroy","resizable","resize","ns","eventResources","inverseColor","_shouldInverseResourceColor","messages","angular","elements","dataItem","_isInDateSlot","slotStart","firstSlot","slotEnd","lastSlot","startTime","toUtcTime","endTime","_slotIndex","slotRange","eventCount","container","collidingEvents","createRows","at","firstChildTop","appendChild","addEvent","_continuousEvents","rightOffset","rowEvents","eventTop","j","eventLength","Math","style","more","clientWidth","appendTo","scrollTop","scrollLeft","ceil","_resizeHint","add","_updateResizeHint","_removeResizeHint","first","toString","timezone","toLocalDate","last","_updateMoveHint","distance","duration","_removeMoveHint","_moveHint","getElementsByTagName","_addResourceView","MS_PER_HOUR","floor","moreButtonHeight","render","remove","Query","sort","dir","toArray","_renderGroups","_renderEvents","slotRanges","itemIdx","tmp","_resourceValue","operator","groupEqFilter","table","removeClass","off","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,6BAA8B,wBAAyBD,IAChE,WAoiCE,MA3hCC,UAAUE,GA2gCP,QAASC,GAAWC,EAAOC,GACvB,MAAOD,GAAME,MAAMD,GAAKE,OAAOH,EAAME,MAAM,EAAGD,IAElD,QAASG,GAAqBC,EAAMC,GAEhC,IADA,GAAIC,GAAWD,EAAaC,SAAUC,EAAkB,GAAIC,MAAKJ,EAAKK,cAAeL,EAAKM,WAAY,EAAGN,EAAKO,WAAYP,EAAKQ,aAAcR,EAAKS,aAAcT,EAAKU,mBAC9JP,EAAgBQ,UAAYT,GAC/BU,EAAMZ,KAAKa,QAAQV,KAAsBW,EAE7C,OAAOX,GAEX,QAASY,GAAcC,EAAOC,EAAKC,GAC/B,GAA8BC,GAA1BC,EAAQH,EAAKI,EAAQH,CAEzB,OADAC,GAAUH,EACHG,GAAWC,GAASD,GAAWE,EAxhC7C,GACOT,GAAQU,OAAOV,MAAOW,EAAKX,EAAMW,GAAIC,EAAgBD,EAAGC,cAAeC,EAAK,kBAAmBC,EAASjC,EAAEiC,OAAQC,EAAUf,EAAMZ,KAAK2B,QAASb,EAAaF,EAAMZ,KAAKc,WAAYc,EAAiB,EAAGC,EAAoB,EAAGC,EAAelB,EAAMmB,SAAS,uEAAwEC,EAAuB,0gCAAgrCC,EAAiBrB,EAAMmB,SAAS,oGAC5iDG,EAAuBtB,EAAMmB,SAAS,mHACtCI,EAAmBvB,EAAMwB,MAAMV,QAC/BW,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,EAAY9M,sBAAsBjB,EAAUqD,QAGpD,GAEXnC,yBAA0B,SAAUwD,GAChC,MAAOnG,MAAKM,qBAAqB6F,GAASnG,KAAKM,qBAAqB6F,EAAQ,IAEhFyK,QAAS,WACD5Q,KAAKwV,OACLxV,KAAKwV,MAAMC,YAAY,yBAEvBzV,KAAKuB,SACLvB,KAAKuB,QAAQmU,IAAIxW,GAEjBc,KAAKoJ,SACLpJ,KAAKoJ,QAAQsM,IAAIxW,GAErBD,EAAcyG,GAAGkL,QAAQjL,KAAK3F,MAC1BA,KAAK2N,cAAgB3N,KAAKoD,sBAAwBpD,KAAKiG,QAAQyH,WAC3D1N,KAAKiG,QAAQyH,SAASO,UAAW,GACjCjO,KAAK2O,eAAeiC,UAEpB5Q,KAAKiG,QAAQyH,SAASY,UAAW,GACjCtO,KAAKgP,gBAAgB4B,YAIjCxF,QACI,SACA,MACA,OACA,YAEJnF,SACIyB,MAAO,QACPC,KAAM,QACNzB,YAAa,GACbuO,iBAAkB,GAClB/G,UAAU,EACVvB,mBAAoB,QACpBI,wBAAyB,QACzBlK,oBAAqB,UACrB2J,YAAazM,EACbuM,cAAepM,MAkBzBX,OAAOV,MAAMsX,QACR5W,OAAOV,OACE,kBAAVpB,SAAwBA,OAAO2Y,IAAM3Y,OAAS,SAAU4Y,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.scheduler.monthview.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.monthview', ['kendo.scheduler.view'], f);\n}(function () {\n var __meta__ = {\n id: 'scheduler.monthview',\n name: 'Scheduler Month View',\n category: 'web',\n description: 'The Scheduler Month View',\n depends: ['scheduler.view'],\n hidden: true\n };\n (function ($) {\n var kendo = window.kendo, ui = kendo.ui, SchedulerView = ui.SchedulerView, NS = '.kendoMonthView', extend = $.extend, getDate = kendo.date.getDate, MS_PER_DAY = kendo.date.MS_PER_DAY, NUMBER_OF_ROWS = 6, NUMBER_OF_COLUMNS = 7, DAY_TEMPLATE = kendo.template('#:kendo.toString(date, \"dd\")#'), 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 && !data.tail && !data.middle) {#' + '' + '#}#' + '# if(resizable && !data.head && !data.middle) {#' + '' + '#}#' + '
', EVENT_TEMPLATE = kendo.template('
' + '
#:title#
' + '
');\n var MORE_BUTTON_TEMPLATE = kendo.template('
...
');\n var MonthGroupedView = kendo.Class.extend({\n init: function (view) {\n this._view = view;\n },\n _verticalRowCountForLevel: function (level) {\n var view = this._view;\n return view._rowCountForLevel(level);\n },\n _horizontalGroupCountForLevel: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level);\n },\n _getCalendarRowsLength: function (cellsPerRow, cellCount) {\n return cellCount / cellsPerRow;\n },\n _createRows: function (start, startIdx, horizontalGroupCount, verticalGroupIndex) {\n var view = this._view;\n var cellsPerRow = NUMBER_OF_COLUMNS;\n var isVerticallyGrouped = view._isVerticallyGrouped();\n var html = '';\n for (var groupIdx = 0; groupIdx < horizontalGroupCount; groupIdx++) {\n html += view._createRow(start, startIdx, cellsPerRow, isVerticallyGrouped ? verticalGroupIndex : groupIdx);\n }\n return html;\n },\n _adjustStartDate: function (start) {\n return kendo.date.addDays(start, NUMBER_OF_COLUMNS);\n },\n _getContent: function (content, startDate, resources) {\n return content({\n date: startDate,\n resources: resources\n });\n },\n _getTimeSlotByPosition: function (x, y, groupIndex) {\n var group = this._view.groups[groupIndex];\n return group.daySlotByPosition(x, y);\n },\n _nextSlotStartDate: function (startDate) {\n return kendo.date.nextDay(startDate);\n },\n _createRowsLayout: function (resources, rows, groupHeaderTemplate) {\n var view = this._view;\n return view._createRowsLayout(resources, rows, groupHeaderTemplate);\n },\n _createVerticalColumnsLayout: function (resources, rows, groupHeaderTemplate, columns) {\n return columns;\n },\n _createColumnsLayout: function (resources, columns, groupHeaderTemplate) {\n var view = this._view;\n return view._createColumnsLayout(resources, columns, groupHeaderTemplate);\n },\n _verticalGroupCount: function (level) {\n var view = this._view;\n return view._rowCountForLevel(level);\n },\n _horizontalGroupCount: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level) / view._columnOffsetForResource(level);\n },\n _positionEvent: function (event, group, range, rangeCount, start, end, rangeIndex) {\n var view = this._view;\n var isMobilePhoneView = view._isMobilePhoneView();\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 head: range.head,\n tail: range.tail\n });\n if (isMobilePhoneView) {\n view._positionMobileEvent(range, view._createEventElement(occurrence), group);\n } else {\n view._positionEvent(range, view._createEventElement(occurrence), group);\n }\n },\n _addDaySlotCollections: function (groupCount, tableRows, startDate) {\n var view = this._view;\n var columnCount = NUMBER_OF_COLUMNS;\n var rowCount = NUMBER_OF_ROWS;\n for (var groupIndex = 0; groupIndex < groupCount; groupIndex++) {\n var cellCount = 0;\n var rowMultiplier = 0;\n if (view._isVerticallyGrouped()) {\n rowMultiplier = groupIndex;\n }\n for (var rowIndex = rowMultiplier * rowCount; rowIndex < (rowMultiplier + 1) * rowCount; rowIndex++) {\n var group = view.groups[groupIndex];\n var collection = group.addDaySlotCollection(kendo.date.addDays(startDate, cellCount), kendo.date.addDays(startDate, cellCount + columnCount));\n var tableRow = tableRows[rowIndex];\n var cells = tableRow.children;\n var cellMultiplier = 0;\n tableRow.setAttribute('role', 'row');\n if (!view._isVerticallyGrouped()) {\n cellMultiplier = groupIndex;\n }\n for (var cellIndex = cellMultiplier * columnCount; cellIndex < (cellMultiplier + 1) * columnCount; cellIndex++) {\n var cell = cells[cellIndex];\n view.addDaySlot(collection, cell, startDate, cellCount);\n cellCount++;\n }\n }\n }\n },\n _changePeriodGroupIndex: function (reverse) {\n var view = this._view;\n return reverse ? view.groups.length - 1 : 0;\n },\n _createResizeHint: function (range) {\n var view = this._view;\n var left = range.startSlot().offsetLeft;\n var top = range.start.offsetTop;\n var width = range.innerWidth();\n var height = range.start.clientHeight - 2;\n var hint = SchedulerView.fn._createResizeHint.call(view, left, top, width, height);\n view._appendResizeHint(hint);\n },\n _createMoveHint: function (range, event) {\n var view = this._view;\n var startSlot = range.startSlot();\n var endSlot = range.endSlot();\n var hint = view._createEventElement(event.clone({\n head: range.head,\n tail: range.tail\n }));\n hint.css({\n left: startSlot.offsetLeft + 2,\n top: startSlot.offsetTop + startSlot.firstChildHeight,\n height: view.options.eventHeight,\n width: range.innerWidth() - (startSlot.index !== endSlot.index ? 5 : 4)\n });\n hint.addClass('k-event-drag-hint');\n view._appendMoveHint(hint);\n }\n });\n var MonthGroupedByDateView = kendo.Class.extend({\n init: function (view) {\n this._view = view;\n },\n _verticalRowCountForLevel: function () {\n return 1;\n },\n _horizontalGroupCountForLevel: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level + 1) / NUMBER_OF_COLUMNS;\n },\n _createRows: function (start, startIdx, horizontalGroupCount) {\n var view = this._view;\n var cellsPerRow = NUMBER_OF_COLUMNS;\n var isVerticallyGrouped = view._isVerticallyGrouped();\n var html = '';\n var dateIdx = 0;\n if (isVerticallyGrouped) {\n var verticalStart = new Date(start);\n var groupCount = view._groupCount();\n for (dateIdx; dateIdx < NUMBER_OF_ROWS; dateIdx++) {\n html += view._createRow(verticalStart, startIdx, groupCount, dateIdx);\n verticalStart = kendo.date.addDays(verticalStart, cellsPerRow);\n }\n start = kendo.date.nextDay(start);\n } else {\n for (dateIdx; dateIdx < cellsPerRow; dateIdx++) {\n html += view._createRow(start, startIdx, horizontalGroupCount, dateIdx);\n start = kendo.date.nextDay(start);\n }\n start = kendo.date.addDays(start, cellsPerRow);\n }\n return html;\n },\n _adjustStartDate: function (start, isLastRow) {\n var view = this._view;\n var isVerticallyGrouped = view._isVerticallyGrouped();\n if (isVerticallyGrouped) {\n if (isLastRow) {\n return kendo.date.addDays(start, NUMBER_OF_COLUMNS * (NUMBER_OF_ROWS - 1) + 1);\n } else {\n return kendo.date.nextDay(start);\n }\n }\n return kendo.date.addDays(start, NUMBER_OF_COLUMNS);\n },\n _getContent: function (content, startDate, resources, cellIdx) {\n if (cellIdx === 0) {\n return content({\n date: startDate,\n resources: resources\n });\n }\n return '';\n },\n _getTimeSlotByPosition: function (x, y, groupIndex) {\n var group = this._view.groups[groupIndex];\n return group.daySlotByPosition(x, y, true);\n },\n _nextSlotStartDate: function (startDate) {\n return startDate;\n },\n _getCalendarRowsLength: function () {\n var view = this._view;\n var isVerticallyGrouped = view._isVerticallyGrouped();\n return isVerticallyGrouped ? NUMBER_OF_COLUMNS : NUMBER_OF_ROWS;\n },\n _createRowsLayout: function (resources, rows, groupHeaderTemplate, columns) {\n var view = this._view;\n return view._createDateLayout(columns, null, false);\n },\n _createVerticalColumnsLayout: function (resources, rows, groupHeaderTemplate) {\n var view = this._view;\n var resource = resources[0];\n var configuration = [];\n var data = resource.dataSource.view();\n for (var dataIndex = 0; dataIndex < data.length * NUMBER_OF_ROWS; dataIndex++) {\n var obj = {\n text: groupHeaderTemplate({\n text: kendo.htmlEncode(kendo.getter(resource.dataTextField)(data[dataIndex % data.length])),\n color: kendo.getter(resource.dataColorField)(data[dataIndex % data.length]),\n field: resource.field,\n title: resource.title,\n name: resource.name,\n value: kendo.getter(resource.dataValueField)(data[dataIndex % data.length])\n }),\n className: 'k-slot-cell'\n };\n obj.columns = view._createColumnsLayout(resources.slice(1), null, groupHeaderTemplate);\n configuration.push(obj);\n }\n return configuration;\n },\n _createColumnsLayout: function (resources, columns, groupHeaderTemplate, subColumns) {\n var view = this._view;\n return view._createColumnsLayout(resources, columns, groupHeaderTemplate, subColumns, true);\n },\n _verticalGroupCount: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level) / NUMBER_OF_ROWS;\n },\n _horizontalGroupCount: function (level) {\n var view = this._view;\n return view._columnCountForLevel(level) / NUMBER_OF_COLUMNS;\n },\n _positionEvent: function (event, group, range, rangeCount, start, end) {\n var view = this._view;\n var startIndex = range.start.index;\n var endIndex = range.end.index;\n var isMobilePhoneView = view._isMobilePhoneView();\n for (var i = range.start.index; i <= range.end.index; i++) {\n var currentSlot = range.collection._slots[i];\n var dateRange = group.daySlotRanges(currentSlot.start, currentSlot.start, true)[0];\n var occurrence = event.clone({\n start: i === startIndex ? currentSlot.start : start,\n end: i === endIndex ? currentSlot.end : end,\n head: i !== endIndex || range.head,\n tail: i !== startIndex || range.tail\n });\n if (isMobilePhoneView) {\n view._positionMobileEvent(dateRange, view._createEventElement(occurrence), group);\n } else {\n view._positionEvent(dateRange, view._createEventElement(occurrence), group);\n }\n }\n },\n _addDaySlotCollections: function (groupCount, tableRows, startDate) {\n var view = this._view;\n var columnCount = NUMBER_OF_COLUMNS;\n var rowCount = NUMBER_OF_ROWS;\n var isVerticallyGrouped = view._isVerticallyGrouped();\n for (var dateIndex = 0; dateIndex < columnCount; dateIndex++) {\n for (var rowIndex = 0; rowIndex < rowCount; rowIndex++) {\n var groupIndex = 0;\n var currentTableIndex = isVerticallyGrouped ? dateIndex : rowIndex;\n var tableRow = tableRows[currentTableIndex];\n var cells = tableRow.children;\n var cellMultiplier = 0;\n tableRow.setAttribute('role', 'row');\n if (!view._isVerticallyGrouped()) {\n cellMultiplier = dateIndex;\n }\n for (var cellIndex = cellMultiplier * groupCount; cellIndex < (cellMultiplier + 1) * groupCount; cellIndex++) {\n var cellCount = rowIndex * columnCount + dateIndex;\n var currentCellIndex = isVerticallyGrouped ? cellIndex + rowIndex * groupCount : cellIndex;\n var cell = cells[currentCellIndex];\n var currentGroupIndex = isVerticallyGrouped ? cellIndex : groupIndex;\n var group = view.groups[currentGroupIndex];\n var collection;\n if (dateIndex === 0) {\n collection = group.addDaySlotCollection(kendo.date.addDays(startDate, cellCount), kendo.date.addDays(startDate, cellCount + columnCount));\n } else {\n collection = group._daySlotCollections[rowIndex];\n }\n view.addDaySlot(collection, cell, startDate, cellCount);\n groupIndex++;\n }\n }\n }\n },\n _changePeriodGroupIndex: function (reverse, vertical, selectionGroupIndex) {\n var view = this._view;\n if (vertical && view._isVerticallyGrouped()) {\n return reverse ? view.groups.length - 1 : 0;\n }\n return selectionGroupIndex;\n },\n _createResizeHint: function (range) {\n var view = this._view;\n var left, top, width, height, hint;\n if (view._isVerticallyGrouped()) {\n left = range.startSlot().offsetLeft;\n top = range.start.offsetTop;\n width = range.startSlot().offsetWidth;\n height = range.endSlot().offsetTop + range.startSlot().offsetHeight - range.startSlot().offsetTop - 2;\n hint = SchedulerView.fn._createResizeHint.call(view, left, top, width, height);\n view._appendResizeHint(hint);\n } else {\n for (var slotIdx = range.startSlot().index; slotIdx <= range.endSlot().index; slotIdx++) {\n var slot = range.collection._slots[slotIdx];\n left = slot.offsetLeft;\n top = slot.offsetTop;\n width = slot.offsetWidth;\n height = slot.offsetHeight - 2;\n hint = SchedulerView.fn._createResizeHint.call(view, left, top, width, height);\n view._appendResizeHint(hint);\n }\n }\n },\n _createMoveHint: function (range, event) {\n var view = this._view;\n var startSlot = range.startSlot();\n var endSlot = range.endSlot();\n for (var slotIdx = startSlot.index; slotIdx <= endSlot.index; slotIdx++) {\n var slot = range.collection._slots[slotIdx];\n var hint = view._createEventElement(event.clone({\n head: range.head,\n tail: range.tail\n }));\n hint.css({\n left: slot.offsetLeft,\n top: slot.offsetTop + slot.firstChildHeight,\n height: view.options.eventHeight,\n width: slot.offsetWidth - 2\n });\n hint.addClass('k-event-drag-hint');\n view._appendMoveHint(hint);\n }\n }\n });\n kendo.ui.scheduler.MonthGroupedView = MonthGroupedView;\n kendo.ui.scheduler.MonthGroupedByDateView = MonthGroupedByDateView;\n ui.MonthView = SchedulerView.extend({\n init: function (element, options) {\n var that = this;\n SchedulerView.fn.init.call(that, element, options);\n that._groupedView = that._getGroupedView();\n that.title = that.options.title;\n that._templates();\n that._editable();\n that._renderLayout(that.options.date);\n that._groups();\n },\n name: 'month',\n _getGroupedView: function () {\n if (this._isGroupedByDate()) {\n return new kendo.ui.scheduler.MonthGroupedByDateView(this);\n } else {\n return new kendo.ui.scheduler.MonthGroupedView(this);\n }\n },\n _updateDirection: function (selection, ranges, multiple, reverse, vertical) {\n if (multiple) {\n var startSlot = ranges[0].start;\n var endSlot = ranges[ranges.length - 1].end;\n var isSameSlot = startSlot.index === endSlot.index;\n var isSameCollection = startSlot.collectionIndex === endSlot.collectionIndex;\n var updateDirection;\n if (vertical) {\n updateDirection = isSameSlot && isSameCollection || isSameCollection;\n } else {\n updateDirection = isSameSlot && isSameCollection;\n }\n if (updateDirection) {\n selection.backward = reverse;\n }\n }\n },\n _changeDate: function (selection, slot, previous) {\n var group = this.groups[selection.groupIndex];\n var collections, index;\n if (previous) {\n collections = group._getCollections(group.daySlotCollectionCount());\n index = slot.collectionIndex - 1;\n if (index >= 0) {\n return collections[index]._slots[collections[index]._slots.length - 1];\n }\n } else {\n collections = group._getCollections(group.daySlotCollectionCount());\n index = slot.collectionIndex + 1;\n var slotIndex = 0;\n if (collections[index] && collections[index]._slots[slotIndex]) {\n return collections[index]._slots[slotIndex];\n }\n }\n },\n _getNextHorizontalRange: function (group, method, horizontalRange) {\n var isVertical = this._isVerticallyGrouped();\n horizontalRange.startSlot = group[method](horizontalRange.startSlot, isVertical);\n horizontalRange.endSlot = group[method](horizontalRange.endSlot, isVertical);\n return horizontalRange;\n },\n _getNextVerticalRange: function (group, method, verticalRange, multiple) {\n var isVertical = this._isVerticallyGrouped() && this._isGroupedByDate();\n verticalRange.startSlot = group[method](verticalRange.startSlot, multiple, isVertical);\n verticalRange.endSlot = group[method](verticalRange.endSlot, multiple, isVertical);\n return verticalRange;\n },\n _changeViewPeriod: function (selection, reverse, vertical) {\n var pad = vertical ? 7 : 1;\n if (reverse) {\n pad *= -1;\n }\n selection.start = kendo.date.addDays(selection.start, pad);\n selection.end = kendo.date.addDays(selection.end, pad);\n if (!vertical || vertical && this._isVerticallyGrouped()) {\n selection.groupIndex = this._groupedView._changePeriodGroupIndex(reverse, vertical, selection.groupIndex);\n }\n selection.events = [];\n return true;\n },\n _continuousSlot: function (selection, ranges, reverse) {\n var index = selection.backward ? 0 : ranges.length - 1;\n var group = this.groups[selection.groupIndex];\n return group.continuousSlot(ranges[index].start, reverse);\n },\n _changeGroupContinuously: function (selection, continuousSlot, multiple, reverse) {\n if (!multiple) {\n var groupIndex = selection.groupIndex;\n var lastGroupIndex = this.groups.length - 1;\n var vertical = this._isVerticallyGrouped();\n var group = this.groups[groupIndex];\n if (!continuousSlot && vertical) {\n continuousSlot = group[reverse ? 'lastSlot' : 'firstSlot']();\n groupIndex += reverse ? -1 : 1;\n } else if (continuousSlot && !vertical) {\n groupIndex = reverse ? lastGroupIndex : 0;\n }\n if (groupIndex < 0 || groupIndex > lastGroupIndex) {\n groupIndex = reverse ? lastGroupIndex : 0;\n continuousSlot = null;\n }\n selection.groupIndex = groupIndex;\n }\n return continuousSlot;\n },\n _normalizeHorizontalSelection: function (selection, ranges, reverse) {\n var slot;\n if (reverse) {\n slot = ranges[0].start;\n } else {\n slot = ranges[ranges.length - 1].end;\n }\n return slot;\n },\n _normalizeVerticalSelection: function (selection, ranges) {\n var slot;\n if (selection.backward) {\n slot = ranges[0].start;\n } else {\n slot = ranges[ranges.length - 1].end;\n }\n return slot;\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.dayTemplate = kendo.template(options.dayTemplate, settings);\n this.groupHeaderTemplate = kendo.template(options.groupHeaderTemplate, settings);\n },\n dateForTitle: function () {\n return kendo.format(this.options.selectedDateFormat, this._firstDayOfMonth, this._lastDayOfMonth);\n },\n shortDateForTitle: function () {\n return kendo.format(this.options.selectedShortDateFormat, this._firstDayOfMonth, this._lastDayOfMonth);\n },\n nextDate: function () {\n return kendo.date.nextDay(this._lastDayOfMonth);\n },\n previousDate: function () {\n return kendo.date.previousDay(this._firstDayOfMonth);\n },\n startDate: function () {\n return this._startDate;\n },\n endDate: function () {\n return this._endDate;\n },\n _renderLayout: function (date) {\n var that = this;\n this._firstDayOfMonth = kendo.date.firstDayOfMonth(date);\n this._lastDayOfMonth = kendo.date.lastDayOfMonth(date);\n this._startDate = firstVisibleMonthDay(date, this.calendarInfo());\n this.createLayout(this._layout());\n this._content();\n this.refreshLayout();\n this.content.on('click' + NS, '.k-nav-day,.k-more-events', function (e) {\n var offset = $(e.currentTarget).offset();\n var slot = that._slotByPosition(offset.left, offset.top);\n e.preventDefault();\n that.trigger('navigate', {\n view: 'day',\n date: slot.startDate()\n });\n });\n },\n _editable: function () {\n if (this.options.editable && !this._isMobilePhoneView()) {\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-scheduler-monthview .k-event a:has(.k-i-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-monthview .k-scheduler-content td', function (e) {\n var offset = $(e.currentTarget).offset();\n var slot = that._slotByPosition(offset.left, offset.top);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({\n isAllDay: true,\n start: slot.startDate(),\n end: 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-scheduler-monthview .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-monthview .k-scheduler-content td',\n tap: function (e) {\n var offset = $(e.target).offset();\n var slot = that._slotByPosition(offset.left, offset.top);\n if (slot) {\n var resourceInfo = that._resourceBySlot(slot);\n that.trigger('add', {\n eventInfo: extend({\n isAllDay: true,\n start: slot.startDate(),\n end: 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-scheduler-monthview .k-event',\n tap: function (e) {\n if ($(e.event.target).closest('a:has(.k-i-close)').length === 0) {\n that.trigger('edit', { uid: $(e.target).closest('.k-event').attr(kendo.attr('uid')) });\n e.preventDefault();\n }\n }\n });\n }\n },\n selectionByElement: function (cell) {\n var offset = $(cell).offset();\n return this._slotByPosition(offset.left, offset.top);\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 _content: function () {\n var html = '';\n var verticalGroupCount = 1;\n var groupedView = this._groupedView;\n var resources = this.groupedResources;\n if (resources.length) {\n if (this._isVerticallyGrouped()) {\n verticalGroupCount = groupedView._verticalRowCountForLevel(resources.length - 1);\n }\n }\n for (var verticalGroupIdx = 0; verticalGroupIdx < verticalGroupCount; verticalGroupIdx++) {\n html += this._createCalendar(verticalGroupIdx);\n }\n html += '';\n this.content.find('table').html(html);\n },\n _createCalendar: function (verticalGroupIndex) {\n var start = this.startDate();\n var cellCount = NUMBER_OF_COLUMNS * NUMBER_OF_ROWS;\n var cellsPerRow = NUMBER_OF_COLUMNS;\n var weekStartDates = [start];\n var html = '';\n var horizontalGroupCount = 1;\n var isVerticallyGrouped = this._isVerticallyGrouped();\n var groupedView = this._groupedView;\n var resources = this.groupedResources;\n if (resources.length) {\n if (!isVerticallyGrouped) {\n horizontalGroupCount = groupedView._horizontalGroupCountForLevel(resources.length - 1);\n }\n }\n this._slotIndices = {};\n var calendarRowsLength = groupedView._getCalendarRowsLength(cellsPerRow, cellCount);\n for (var rowIdx = 0; rowIdx < calendarRowsLength; rowIdx++) {\n html += '';\n weekStartDates.push(start);\n var startIdx = rowIdx * cellsPerRow;\n html += groupedView._createRows(start, startIdx, horizontalGroupCount, verticalGroupIndex);\n start = groupedView._adjustStartDate(start, rowIdx === calendarRowsLength - 1);\n html += '';\n }\n this._weekStartDates = weekStartDates;\n this._endDate = kendo.date.previousDay(start);\n return html;\n },\n _createRow: function (startDate, startIdx, cellsPerRow, groupIndex) {\n var that = this;\n var min = that._firstDayOfMonth;\n var max = that._lastDayOfMonth;\n var content = that.dayTemplate;\n var classes = '';\n var html = '';\n var groupedView = this._groupedView;\n var resources = function () {\n return that._resourceBySlot({ groupIndex: groupIndex });\n };\n for (var cellIdx = 0; cellIdx < cellsPerRow; cellIdx++) {\n classes = '';\n if (kendo.date.isToday(startDate)) {\n classes += 'k-today';\n }\n if (!kendo.date.isInDateRange(startDate, min, max)) {\n classes += ' k-other-month';\n }\n html += ' ',\n className: 'k-hidden k-slot-cell'\n });\n }\n rows = groupedView._createRowsLayout(resources, inner, this.groupHeaderTemplate, columns);\n columns = groupedView._createVerticalColumnsLayout(resources, inner, this.groupHeaderTemplate, columns);\n } else {\n columns = groupedView._createColumnsLayout(resources, columns, this.groupHeaderTemplate, columns);\n }\n }\n return {\n columns: columns,\n rows: rows\n };\n },\n _createEventElement: function (event) {\n var options = this.options;\n var editable = options.editable;\n var isMobile = this._isMobile();\n event.showDelete = editable && editable.destroy !== false && !isMobile;\n event.resizable = editable && editable.resize !== false && !isMobile;\n event.ns = kendo.ns;\n event.resources = this.eventResources(event);\n event.inverseColor = event.resources && event.resources[0] ? this._shouldInverseResourceColor(event.resources[0]) : false;\n event.messages = options.messages || { destroy: 'Delete' };\n var element = $(this.eventTemplate(event));\n this.angular('compile', function () {\n return {\n elements: element,\n data: [{ dataItem: event }]\n };\n });\n return element;\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 _slotIndex: function (date) {\n return this._slotIndices[getDate(date).getTime()];\n },\n _positionMobileEvent: function (slotRange, element, group) {\n var startSlot = slotRange.start;\n if (slotRange.start.offsetLeft > slotRange.end.offsetLeft) {\n startSlot = slotRange.end;\n }\n var startIndex = slotRange.start.index;\n var endIndex = startIndex;\n var eventCount = 3;\n var events = SchedulerView.collidingEvents(slotRange.events(), startIndex, endIndex);\n events.push({\n element: element,\n start: startIndex,\n end: endIndex\n });\n var rows = SchedulerView.createRows(events);\n var slot = slotRange.collection.at(startIndex);\n var container = slot.container;\n if (!container) {\n container = $(kendo.format('
', startSlot.offsetTop + startSlot.firstChildTop + startSlot.firstChildHeight - 3 + 'px', startSlot.offsetLeft + 'px', startSlot.offsetWidth + 'px'));\n slot.container = container;\n this.content[0].appendChild(container[0]);\n }\n if (rows.length <= eventCount) {\n slotRange.addEvent({\n element: element,\n start: startIndex,\n end: endIndex,\n groupIndex: startSlot.groupIndex\n });\n group._continuousEvents.push({\n element: element,\n uid: element.attr(kendo.attr('uid')),\n start: slotRange.start,\n end: slotRange.end\n });\n container[0].appendChild(element[0]);\n }\n },\n _positionEvent: function (slotRange, element, group) {\n var eventHeight = this.options.eventHeight;\n var startSlot = slotRange.start;\n if (slotRange.start.offsetLeft > slotRange.end.offsetLeft) {\n startSlot = slotRange.end;\n }\n var startIndex = slotRange.start.index;\n var endIndex = slotRange.end.index;\n var eventCount = startSlot.eventCount;\n var events = SchedulerView.collidingEvents(slotRange.events(), startIndex, endIndex);\n var rightOffset = startIndex !== endIndex ? 5 : 4;\n events.push({\n element: element,\n start: startIndex,\n end: endIndex\n });\n var rows = SchedulerView.createRows(events);\n for (var idx = 0, length = Math.min(rows.length, eventCount); idx < length; idx++) {\n var rowEvents = rows[idx].events;\n var eventTop = startSlot.offsetTop + startSlot.firstChildHeight + idx * eventHeight + 3 * idx + 'px';\n for (var j = 0, eventLength = rowEvents.length; j < eventLength; j++) {\n rowEvents[j].element[0].style.top = eventTop;\n }\n }\n if (rows.length > eventCount) {\n for (var slotIndex = startIndex; slotIndex <= endIndex; slotIndex++) {\n var collection = slotRange.collection;\n var slot = collection.at(slotIndex);\n if (slot.more) {\n return;\n }\n slot.more = $(MORE_BUTTON_TEMPLATE({\n ns: kendo.ns,\n start: slotIndex,\n end: slotIndex,\n width: slot.clientWidth - 2,\n left: slot.offsetLeft + 2,\n top: slot.offsetTop + slot.firstChildHeight + eventCount * eventHeight + 3 * eventCount\n }));\n this.content[0].appendChild(slot.more[0]);\n }\n } else {\n slotRange.addEvent({\n element: element,\n start: startIndex,\n end: endIndex,\n groupIndex: startSlot.groupIndex\n });\n element[0].style.width = slotRange.innerWidth() - rightOffset + 'px';\n element[0].style.left = startSlot.offsetLeft + 2 + 'px';\n element[0].style.height = eventHeight + 'px';\n group._continuousEvents.push({\n element: element,\n uid: element.attr(kendo.attr('uid')),\n start: slotRange.start,\n end: slotRange.end\n });\n element.appendTo(this.content);\n }\n },\n _slotByPosition: function (x, y) {\n var offset = this.content.offset();\n x -= offset.left;\n y -= offset.top;\n y += this.content[0].scrollTop;\n x += this.content[0].scrollLeft;\n x = Math.ceil(x);\n y = Math.ceil(y);\n for (var groupIndex = 0; groupIndex < this.groups.length; groupIndex++) {\n var slot = this._groupedView._getTimeSlotByPosition(x, y, groupIndex);\n if (slot) {\n return slot;\n }\n }\n return null;\n },\n _appendResizeHint: function (hint) {\n hint.appendTo(this.content);\n this._resizeHint = this._resizeHint.add(hint);\n },\n _updateResizeHint: function (event, groupIndex, startTime, endTime) {\n this._removeResizeHint();\n var group = this.groups[groupIndex];\n var ranges = group.ranges(startTime, endTime, true, event.isAllDay);\n for (var rangeIndex = 0; rangeIndex < ranges.length; rangeIndex++) {\n this._groupedView._createResizeHint(ranges[rangeIndex]);\n }\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), 'M/dd'));\n this._resizeHint.last().addClass('k-last').find('.k-label-bottom').text(kendo.toString(kendo.timezone.toLocalDate(endTime), 'M/dd'));\n },\n _updateMoveHint: function (event, groupIndex, distance) {\n var start = kendo.date.toUtcTime(event.start) + distance;\n var end = start + event.duration();\n var group = this.groups[groupIndex];\n var ranges = group.ranges(start, end, true, event.isAllDay);\n this._removeMoveHint();\n for (var rangeIndex = 0; rangeIndex < ranges.length; rangeIndex++) {\n this._groupedView._createMoveHint(ranges[rangeIndex], event);\n }\n },\n _appendMoveHint: function (hint) {\n hint.appendTo(this.content);\n this._moveHint = this._moveHint.add(hint);\n },\n _groups: function () {\n var groupCount = this._groupCount();\n var tableRows = this.content[0].getElementsByTagName('tr');\n var startDate = this.startDate();\n this.groups = [];\n for (var idx = 0; idx < groupCount; idx++) {\n this._addResourceView(idx);\n }\n this._groupedView._addDaySlotCollections(groupCount, tableRows, startDate);\n },\n addDaySlot: function (collection, cell, startDate, cellCount) {\n var clientHeight = cell.clientHeight;\n var firstChildHeight = cell.children.length ? cell.children[0].offsetHeight + 3 : 0;\n var start = kendo.date.addDays(startDate, cellCount);\n var end = kendo.date.MS_PER_DAY;\n if (startDate.getHours() !== start.getHours()) {\n end += (startDate.getHours() - start.getHours()) * kendo.date.MS_PER_HOUR;\n }\n start = kendo.date.toUtcTime(start);\n end += start;\n var eventCount = Math.floor((clientHeight - firstChildHeight - this.options.moreButtonHeight) / (this.options.eventHeight + 3));\n cell.setAttribute('role', 'gridcell');\n cell.setAttribute('aria-selected', false);\n collection.addDaySlot(cell, start, end, eventCount);\n },\n render: function (events) {\n this.content.children('.k-event,.k-more-events,.k-events-container').remove();\n this._groups();\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 resources = this.groupedResources;\n if (resources.length) {\n this._renderGroups(events, resources, 0, 1);\n } else {\n this._renderEvents(events, 0);\n }\n this.refreshLayout();\n this.trigger('activate');\n },\n _renderEvents: function (events, groupIndex) {\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 group = this.groups[groupIndex];\n if (!group._continuousEvents) {\n group._continuousEvents = [];\n }\n var ranges = group.slotRanges(event, true);\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 this._groupedView._positionEvent(event, group, range, rangeCount, start, end, rangeIndex);\n }\n }\n }\n },\n _renderGroups: function (events, resources, offset, columnLevel) {\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 tmp = new kendo.data.Query(events).filter({\n field: resource.field,\n operator: SchedulerView.groupEqFilter(value)\n }).toArray();\n if (resources.length > 1) {\n offset = this._renderGroups(tmp, resources.slice(1), offset++, columnLevel + 1);\n } else {\n this._renderEvents(tmp, offset++);\n }\n }\n }\n return offset;\n },\n _groupCount: function () {\n var resources = this.groupedResources;\n var groupedView = this._groupedView;\n if (resources.length) {\n if (this._isVerticallyGrouped()) {\n return groupedView._verticalGroupCount(resources.length - 1);\n } else {\n return groupedView._horizontalGroupCount(resources.length);\n }\n }\n return 1;\n },\n _columnOffsetForResource: function (index) {\n return this._columnCountForLevel(index) / this._columnCountForLevel(index - 1);\n },\n destroy: function () {\n if (this.table) {\n this.table.removeClass('k-scheduler-monthview');\n }\n if (this.content) {\n this.content.off(NS);\n }\n if (this.element) {\n this.element.off(NS);\n }\n SchedulerView.fn.destroy.call(this);\n if (this._isMobile() && !this._isMobilePhoneView() && this.options.editable) {\n if (this.options.editable.create !== false) {\n this._addUserEvents.destroy();\n }\n if (this.options.editable.update !== false) {\n this._editUserEvents.destroy();\n }\n }\n },\n events: [\n 'remove',\n 'add',\n 'edit',\n 'navigate'\n ],\n options: {\n title: 'Month',\n name: 'month',\n eventHeight: 25,\n moreButtonHeight: 13,\n editable: true,\n selectedDateFormat: '{0:y}',\n selectedShortDateFormat: '{0:y}',\n groupHeaderTemplate: '#=text#',\n dayTemplate: DAY_TEMPLATE,\n eventTemplate: EVENT_TEMPLATE\n }\n });\n function shiftArray(array, idx) {\n return array.slice(idx).concat(array.slice(0, idx));\n }\n function firstVisibleMonthDay(date, calendarInfo) {\n var firstDay = calendarInfo.firstDay, firstVisibleDay = new Date(date.getFullYear(), date.getMonth(), 0, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n while (firstVisibleDay.getDay() != firstDay) {\n kendo.date.setTime(firstVisibleDay, -1 * MS_PER_DAY);\n }\n return firstVisibleDay;\n }\n function isInDateRange(value, min, max) {\n var msMin = min, msMax = max, msValue;\n msValue = value;\n return msValue >= msMin && msValue <= msMax;\n }\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}