{"version":3,"sources":["kendo.columnmenu.js"],"names":["f","define","$","undefined","trim","text","kendo","replace","toHash","arr","key","idx","len","current","result","length","leafColumns","columns","concat","push","attrEquals","attrName","attrValue","attr","insertElementAt","index","element","container","insertAfter","children","eq","prepend","columnOccurrences","signature","i","columnDict","JSON","stringify","oldColumnOccurrences","renderedListElements","checkBoxes","columCheckbox","field","title","j","indexAttr","fieldAttr","parseInt","window","ui","proxy","extend","grep","map","inArray","ACTIVE","ASC","DESC","CHANGE","INIT","OPEN","SELECT","STICK","UNSTICK","POPUP","FILTERMENU","MENU","NS","Widget","ColumnMenu","init","options","link","that","this","fn","call","owner","dataSource","find","addClass","messages","settings","on","_click","wrapper","_refreshHandler","refresh","bind","_init","pane","_isMobile","_createMobileMenu","_createMenu","_muteAngularRebind","_angularItems","_sort","_columns","_filter","_lockColumns","_stickyColumns","trigger","events","name","sortAscending","sortDescending","filter","column","columnVisibility","clear","cancel","done","lock","unlock","stick","unstick","setColumnPosition","sortable","filterable","animations","left","html","template","uid","guid","ns","_ownerColumns","showColumns","hasLockableColumns","hasStickableColumns","popup","anchor","copyAnchorStyles","open","_open","activate","_activate","deactivate","_deactivate","close","menu","_closing","closeCallback","data","orientation","closeOnClick","_updateMenuItems","viewElement","mobileTemplate","view","append","state","MobileMenu","columnMenu","e","stopPropagation","preventDefault","_applyChanges","_cancelChanges","_updateLockedColumns","_updateStickyColumns","initialSort","action","angular","items","closest","col","_originalObject","elements","destroy","filterMenu","unbind","_updateColumnsMenuHandler","_updateColumnsLockedStateHandler","off","purge","is","navigate","toggle","_setMenuItemsVisibility","_reorderMenuItems","_eachRenderedMenuItem","renderedListElement","matchesMedia","hide","show","renderedList","_updateDataIndexes","first","each","callback","duplicateColumnIndex","fieldValue","currentColumn","columnElements","oldOccurances","columnOccurrence","add","not","keyCode","keys","ESC","focus","menuColumns","originalField","hidden","locked","headerAttributes","id","dir","item","hasClass","parent","removeClass","_sortDataSource","compare","sort","allowUnsort","mode","splice","_updateColumnsMenu","_updateColumnsLockedState","input","columnIndexMap","columnsCount","showColumn","hideColumn","checked","checkboxes","switchWidget","lockedAttr","uidAttr","colIdx","columnsInMenu","visibleFields","visibleDataFields","lockedCount","nonLockedCount","columnsNotInMenu","hiddenColumnsNotInMenu","prop","indexOf","enable","check","widget","multi","checkSource","appendToElement","values","change","lockColumn","unlockColumn","stickColumn","unstickColumn","notLockable","lockItem","unlockItem","lockable","sticky","stickable","stickItem","unstickItem","descriptor","_filterExist","filters","found","_createCheckBoxes","target","currentTarget","_updateSelectedItems","el","otherItem","otherItemId","force","selectedItems","hasOwnProperty","kendoSwitch","unchecked","sender","_destroyCheckBoxes","plugin","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,oBACH,cACA,mBACA,cACDD,IACL,WAg6BE,MAp5BC,UAAUE,EAAGC,GAEV,QAASC,GAAKC,GACV,MAAOC,GAAMF,KAAKC,GAAME,QAAQ,WAAY,IAEhD,QAASC,GAAOC,EAAKC,GAArB,GAEQC,GAAKC,EAAKC,EADVC,IAEJ,KAAKH,EAAM,EAAGC,EAAMH,EAAIM,OAAQJ,EAAMC,EAAKD,IACvCE,EAAUJ,EAAIE,GACdG,EAAOD,EAAQH,IAAQG,CAE3B,OAAOC,GAEX,QAASE,GAAYC,GAArB,GAEaN,GADLG,IACJ,KAASH,EAAM,EAAGA,EAAMM,EAAQF,OAAQJ,IAC/BM,EAAQN,GAAKM,QAIlBH,EAASA,EAAOI,OAAOF,EAAYC,EAAQN,GAAKM,UAH5CH,EAAOK,KAAKF,EAAQN,GAK5B,OAAOG,GAEX,QAASM,GAAWC,EAAUC,GAC1B,MAAO,IAAMhB,EAAMiB,KAAKF,GAAY,MAASC,GAAa,IAAIf,QAAQ,KAAM,KAAO,KAEvF,QAASiB,GAAgBC,EAAOC,EAASC,GACjCF,EAAQ,EACRC,EAAQE,YAAYD,EAAUE,WAAWC,GAAGL,EAAQ,IAEp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OAAO5P,QAAQ2I,QAAQ,WAChCd,EAAQ9E,EAAKF,QAAQkF,WAAWJ,KAAKE,QAAWtI,YAChD+L,EAAKE,EAAK8B,KAAK,KAEfzF,GAAMtI,QAAQ+L,IADdzD,EAAMtI,QAAQ+L,GAKlBvI,EAAK4B,QAAQxC,GAAUqJ,KAAMA,QAIzCqE,mBAAoB,WAAA,GAGZlD,GACKnM,EAHLuC,EAAOC,KACP8F,EAAW/F,EAAK/C,QAAQqD,KAAK,mBAAmBA,KAAK,oBAEzD,KAAS7C,EAAI,EAAGA,EAAIsI,EAASzJ,OAAQmB,IACjCmM,EAAe7D,EAAS1I,GAAGI,GAAG6G,KAAK,eAC/BsF,GACAA,EAAa5D,WAIzB9B,MAAO,WACHjE,KAAKH,QAAQmB,KAAKuF,SAAS,KAE/BR,QAAS,WACL,GAAIhG,GAAOC,IACXN,GAAOO,GAAG8F,QAAQ7F,KAAKH,GACvBA,EAAK/C,QAAQoJ,IAAI3G,GACjBM,EAAK8M,uBAGbtO,GAAGuO,OAAOnN,IACZrB,OAAO1C,MAAMmR,QACRzO,OAAO1C,OACE,kBAAVL,SAAwBA,OAAOyR,IAAMzR,OAAS,SAAU0R,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.columnmenu.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.columnmenu', [\n 'kendo.popup',\n 'kendo.filtermenu',\n 'kendo.menu'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'columnmenu',\n name: 'Column Menu',\n category: 'framework',\n depends: [\n 'popup',\n 'filtermenu',\n 'menu'\n ],\n advanced: true\n };\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, proxy = $.proxy, extend = $.extend, grep = $.grep, map = $.map, inArray = $.inArray, ACTIVE = 'k-state-selected', ASC = 'asc', DESC = 'desc', CHANGE = 'change', INIT = 'init', OPEN = 'open', SELECT = 'select', STICK = 'stick', UNSTICK = 'unstick', POPUP = 'kendoPopup', FILTERMENU = 'kendoFilterMenu', MENU = 'kendoMenu', NS = '.kendoColumnMenu', Widget = ui.Widget;\n function trim(text) {\n return kendo.trim(text).replace(/ /gi, '');\n }\n function toHash(arr, key) {\n var result = {};\n var idx, len, current;\n for (idx = 0, len = arr.length; idx < len; idx++) {\n current = arr[idx];\n result[current[key]] = current;\n }\n return result;\n }\n function leafColumns(columns) {\n var result = [];\n for (var idx = 0; idx < columns.length; idx++) {\n if (!columns[idx].columns) {\n result.push(columns[idx]);\n continue;\n }\n result = result.concat(leafColumns(columns[idx].columns));\n }\n return result;\n }\n function attrEquals(attrName, attrValue) {\n return '[' + kendo.attr(attrName) + '=\\'' + (attrValue || '').replace(/'/g, '\"') + '\\']';\n }\n function insertElementAt(index, element, container) {\n if (index > 0) {\n element.insertAfter(container.children().eq(index - 1));\n } else {\n container.prepend(element);\n }\n }\n function columnOccurrences(columns) {\n var columnDict = {};\n var signature;\n for (var i = 0; i < columns.length; i++) {\n signature = JSON.stringify(columns[i]);\n if (columnDict[signature]) {\n columnDict[signature].push(i);\n } else {\n columnDict[signature] = [i];\n }\n }\n return columnDict;\n }\n function oldColumnOccurrences(renderedListElements, checkBoxes) {\n var indexAttr = kendo.attr('index');\n var fieldAttr = kendo.attr('field');\n var columnDict = {};\n var signature;\n var columCheckbox;\n var index;\n var field;\n var title;\n for (var j = 0; j < renderedListElements.length; j++) {\n columCheckbox = checkBoxes.eq(j);\n index = parseInt(columCheckbox.attr(indexAttr), 10);\n field = columCheckbox.attr(fieldAttr);\n title = columCheckbox.attr('title');\n signature = field ? field : title;\n if (columnDict[signature]) {\n columnDict[signature].push(index);\n } else {\n columnDict[signature] = [index];\n }\n }\n return columnDict;\n }\n var ColumnMenu = Widget.extend({\n init: function (element, options) {\n var that = this, link;\n Widget.fn.init.call(that, element, options);\n element = that.element;\n options = that.options;\n that.owner = options.owner;\n that.dataSource = options.dataSource;\n that.field = element.attr(kendo.attr('field'));\n that.title = element.attr(kendo.attr('title'));\n link = element.find('.k-header-column-menu');\n if (!link[0]) {\n link = element.addClass('k-with-icon').prepend('').find('.k-header-column-menu');\n }\n that.link = link.attr('tabindex', -1).on('click' + NS, proxy(that._click, that));\n that.wrapper = $('
');\n that._refreshHandler = proxy(that.refresh, that);\n that.dataSource.bind(CHANGE, that._refreshHandler);\n },\n _init: function () {\n var that = this;\n that.pane = that.options.pane;\n if (that.pane) {\n that._isMobile = true;\n }\n if (that._isMobile) {\n that._createMobileMenu();\n } else {\n that._createMenu();\n }\n that.owner._muteAngularRebind(function () {\n that._angularItems('compile');\n });\n that._sort();\n that._columns();\n that._filter();\n that._lockColumns();\n that._stickyColumns();\n that.trigger(INIT, {\n field: that.field,\n container: that.wrapper\n });\n },\n events: [\n INIT,\n OPEN,\n 'sort',\n 'filtering',\n STICK,\n UNSTICK\n ],\n options: {\n name: 'ColumnMenu',\n messages: {\n sortAscending: 'Sort Ascending',\n sortDescending: 'Sort Descending',\n filter: 'Filter',\n column: 'Column',\n columns: 'Columns',\n columnVisibility: 'Column Visibility',\n clear: 'Clear',\n cancel: 'Cancel',\n done: 'Done',\n settings: 'Edit Column Settings',\n lock: 'Lock Column',\n unlock: 'Unlock Column',\n stick: 'Stick Column',\n unstick: 'Unstick Column',\n setColumnPosition: 'Set Column Position'\n },\n filter: '',\n columns: true,\n sortable: true,\n filterable: true,\n animations: { left: 'slide' }\n },\n _createMenu: function () {\n var that = this, options = that.options;\n that.wrapper.html(kendo.template(template)({\n uid: kendo.guid(),\n ns: kendo.ns,\n messages: options.messages,\n sortable: options.sortable,\n filterable: options.filterable,\n columns: that._ownerColumns(),\n showColumns: options.columns,\n hasLockableColumns: options.hasLockableColumns,\n hasStickableColumns: options.hasStickableColumns\n }));\n that.popup = that.wrapper[POPUP]({\n anchor: that.link,\n copyAnchorStyles: false,\n open: proxy(that._open, that),\n activate: proxy(that._activate, that),\n deactivate: proxy(that._deactivate, that),\n close: function () {\n that.menu._closing = true;\n if (that.options.closeCallback) {\n that.options.closeCallback(that.element);\n }\n }\n }).data(POPUP);\n that.menu = that.wrapper.children()[MENU]({\n orientation: 'vertical',\n closeOnClick: false,\n open: function () {\n that._updateMenuItems();\n }\n }).data(MENU);\n },\n _deactivate: function () {\n this.menu._closing = false;\n },\n _createMobileMenu: function () {\n var that = this, options = that.options;\n var html = kendo.template(mobileTemplate)({\n ns: kendo.ns,\n field: that.field,\n title: that.title || that.field,\n messages: options.messages,\n sortable: options.sortable,\n filterable: options.filterable,\n columns: that._ownerColumns(),\n showColumns: options.columns,\n hasLockableColumns: options.hasLockableColumns,\n hasStickableColumns: options.hasStickableColumns\n });\n that.view = that.pane.append(html);\n that.view.state = { columns: {} };\n that.wrapper = that.view.element.find('.k-column-menu');\n that.menu = new MobileMenu(that.wrapper.children(), {\n pane: that.pane,\n columnMenu: that\n });\n that.menu.element.on('transitionend' + NS, function (e) {\n e.stopPropagation();\n });\n var viewElement = that.view.wrapper && that.view.wrapper[0] ? that.view.wrapper : that.view.element;\n viewElement.on('click', '.k-header-done', function (e) {\n e.preventDefault();\n that.menu._applyChanges();\n that.menu._cancelChanges(false);\n that.close();\n });\n viewElement.on('click', '.k-header-cancel', function (e) {\n e.preventDefault();\n that.menu._cancelChanges(true);\n that.close();\n });\n that.view.bind('showStart', function () {\n var view = that.view || { columns: {} };\n if (that.options.hasLockableColumns) {\n that._updateLockedColumns();\n }\n if (that.options.hasStickableColumns) {\n that._updateStickyColumns();\n }\n if (view.element.find('.k-sort-asc.k-state-selected').length) {\n view.state.initialSort = 'asc';\n } else if (view.element.find('.k-sort-desc.k-state-selected').length) {\n view.state.initialSort = 'desc';\n }\n });\n },\n _angularItems: function (action) {\n var that = this;\n that.angular(action, function () {\n var items = that.wrapper.find('.k-columns-item input[' + kendo.attr('field') + ']').map(function () {\n return $(this).closest('li');\n });\n var data = map(that._ownerColumns(), function (col) {\n return { column: col._originalObject };\n });\n return {\n elements: items,\n data: data\n };\n });\n },\n destroy: function () {\n var that = this;\n that._angularItems('cleanup');\n Widget.fn.destroy.call(that);\n if (that.filterMenu) {\n that.filterMenu.destroy();\n }\n if (that._refreshHandler) {\n that.dataSource.unbind(CHANGE, that._refreshHandler);\n }\n if (that.options.columns && that.owner) {\n if (that._updateColumnsMenuHandler) {\n that.owner.unbind('columnShow', that._updateColumnsMenuHandler);\n that.owner.unbind('columnHide', that._updateColumnsMenuHandler);\n }\n if (that._updateColumnsLockedStateHandler) {\n that.owner.unbind('columnLock', that._updateColumnsLockedStateHandler);\n that.owner.unbind('columnUnlock', that._updateColumnsLockedStateHandler);\n }\n }\n if (that.menu) {\n that.menu.element.off(NS);\n that.menu.destroy();\n }\n that.wrapper.off(NS);\n if (that.popup) {\n that.popup.destroy();\n }\n if (that.view) {\n that.view.purge();\n }\n that.link.off(NS);\n that.owner = null;\n that.wrapper = null;\n that.element = null;\n },\n close: function () {\n this.menu.close();\n if (this.popup) {\n this.popup.close();\n this.popup.element.off('keydown' + NS);\n }\n },\n _click: function (e) {\n var that = this;\n e.preventDefault();\n e.stopPropagation();\n var options = this.options;\n if (options.filter && this.element.is(!options.filter)) {\n return;\n }\n if (!this.popup && !this.pane) {\n this._init();\n } else {\n that._updateMenuItems();\n }\n if (this._isMobile) {\n this.pane.navigate(this.view, this.options.animations.left);\n } else {\n this.popup.toggle();\n }\n },\n _updateMenuItems: function () {\n var that = this;\n if (that.options.columns) {\n that._setMenuItemsVisibility();\n that._reorderMenuItems();\n }\n },\n _setMenuItemsVisibility: function () {\n var that = this;\n that._eachRenderedMenuItem(function (index, column, renderedListElement) {\n if (column.matchesMedia === false) {\n renderedListElement.hide();\n } else {\n renderedListElement.show();\n }\n });\n },\n _reorderMenuItems: function () {\n var that = this;\n that._eachRenderedMenuItem(function (index, column, renderedListElement, renderedList) {\n if (renderedListElement[0] && renderedListElement.index() !== index) {\n insertElementAt(index, renderedListElement, renderedList);\n }\n });\n that._updateDataIndexes();\n },\n _updateDataIndexes: function () {\n var that = this;\n var renderedList = that._isMobile && that.view ? $(that.view.element).find('.k-columns-item').children('ul') : $(that.wrapper).find('.k-menu-group').first();\n renderedList.find('span.' + (this._isMobile ? 'k-listgroup-form-field-wrapper' : 'k-menu-link') + ' input').each(function (i) {\n $(this).attr(kendo.attr('index'), i);\n });\n },\n _eachRenderedMenuItem: function (callback) {\n var that = this;\n var renderedListElement;\n var duplicateColumnIndex;\n var fieldValue;\n var currentColumn;\n var columns = grep(leafColumns(that.owner.columns), function (col) {\n var result = true, title = trim(col.title || '');\n if (col.menu === false || !col.field && !title.length) {\n result = false;\n }\n return result;\n }).map(function (col) {\n return {\n field: col.field,\n title: col.title,\n matchesMedia: col.matchesMedia\n };\n });\n var renderedList = that._isMobile && that.view ? $(that.view.element).find('.k-columns-item').children('ul') : $(that.wrapper).find('.k-menu-group').first();\n var renderedListElements = renderedList.find('span.' + (this._isMobile ? 'k-listgroup-form-field-wrapper' : 'k-menu-link'));\n var oldOccurances = oldColumnOccurrences(renderedListElements, renderedList.find('input[type=checkbox]'));\n var columnOccurrence = columnOccurrences(columns);\n var columnElements;\n for (var i = 0; i < columns.length; i++) {\n currentColumn = columns[i];\n fieldValue = currentColumn.field ? currentColumn.field : currentColumn.title;\n duplicateColumnIndex = $.inArray(i, columnOccurrence[JSON.stringify(currentColumn)]);\n columnElements = $();\n for (var idx = 0; idx < oldOccurances[fieldValue].length; idx++) {\n columnElements = columnElements.add(renderedListElements.eq(oldOccurances[fieldValue][idx]));\n }\n renderedListElement = columnElements.find(attrEquals('field', fieldValue)).closest('li').eq(duplicateColumnIndex);\n callback(i, currentColumn, renderedListElement, renderedList);\n }\n },\n _open: function () {\n var that = this;\n $('.k-column-menu').not(that.wrapper).each(function () {\n $(this).data(POPUP).close();\n });\n that.popup.element.on('keydown' + NS, function (e) {\n if (e.keyCode == kendo.keys.ESC) {\n that.close();\n }\n });\n if (that.options.hasLockableColumns) {\n that._updateLockedColumns();\n }\n if (that.options.hasStickableColumns) {\n that._updateStickyColumns();\n }\n },\n _activate: function () {\n this.menu.element.focus();\n this.trigger(OPEN, {\n field: this.field,\n container: this.wrapper\n });\n },\n _ownerColumns: function () {\n var columns = leafColumns(this.owner.columns), menuColumns = grep(columns, function (col) {\n var result = true, title = trim(col.title || '');\n if (col.menu === false || !col.field && !title.length) {\n result = false;\n }\n return result;\n });\n return map(menuColumns, function (col) {\n return {\n originalField: col.field,\n field: col.field || col.title,\n title: col.title || col.field,\n hidden: col.hidden,\n matchesMedia: col.matchesMedia,\n index: inArray(col, columns),\n locked: !!col.locked,\n _originalObject: col,\n uid: col.headerAttributes.id\n };\n });\n },\n _sort: function () {\n var that = this;\n if (that.options.sortable) {\n that.refresh();\n that.menu.bind(SELECT, function (e) {\n var item = $(e.item), dir;\n if (item.hasClass('k-sort-asc')) {\n dir = ASC;\n } else if (item.hasClass('k-sort-desc')) {\n dir = DESC;\n }\n if (!dir) {\n return;\n }\n item.parent().find('.k-sort-' + (dir == ASC ? DESC : ASC)).removeClass(ACTIVE);\n that._sortDataSource(item, dir);\n if (!that._isMobile) {\n that.close();\n }\n });\n }\n },\n _sortDataSource: function (item, dir) {\n var that = this, sortable = that.options.sortable, compare = sortable.compare === null ? undefined : sortable.compare, dataSource = that.dataSource, idx, length, sort = dataSource.sort() || [];\n var removeClass = item.hasClass(ACTIVE) && sortable && sortable.allowUnsort !== false;\n dir = !removeClass ? dir : undefined;\n if (that.trigger('sort', {\n sort: {\n field: that.field,\n dir: dir,\n compare: compare\n }\n })) {\n return;\n }\n if (removeClass) {\n item.removeClass(ACTIVE);\n } else {\n item.addClass(ACTIVE);\n }\n if (sortable.mode === 'multiple') {\n for (idx = 0, length = sort.length; idx < length; idx++) {\n if (sort[idx].field === that.field) {\n sort.splice(idx, 1);\n break;\n }\n }\n sort.push({\n field: that.field,\n dir: dir,\n compare: compare\n });\n } else {\n sort = [{\n field: that.field,\n dir: dir,\n compare: compare\n }];\n }\n dataSource.sort(sort);\n },\n _columns: function () {\n var that = this;\n if (that.options.columns) {\n that._updateColumnsMenu();\n that._updateColumnsMenuHandler = proxy(that._updateColumnsMenu, that);\n that.owner.bind([\n 'columnHide',\n 'columnShow'\n ], that._updateColumnsMenuHandler);\n that._updateColumnsLockedStateHandler = proxy(that._updateColumnsLockedState, that);\n that.owner.bind([\n 'columnUnlock',\n 'columnLock'\n ], that._updateColumnsLockedStateHandler);\n that.menu.bind(SELECT, function (e) {\n var item = $(e.item), input, column, indexAttr = kendo.attr('index'), columnIndexMap = {}, columnsCount = 0, columns = grep(leafColumns(that.owner.columns), function (col, idx) {\n var result = true, title = trim(col.title || '');\n if (col.menu === false || !col.field && !title.length) {\n result = false;\n }\n if (result) {\n columnIndexMap[idx] = columnsCount;\n columnsCount++;\n }\n return result;\n });\n if (that._isMobile) {\n e.preventDefault();\n }\n if (!item.parent().closest('li.k-columns-item')[0]) {\n return;\n }\n input = item.find(':checkbox');\n if (input.attr('disabled')) {\n return;\n }\n column = columns[parseInt(input.attr(indexAttr), 10)];\n if (column.hidden === true) {\n that.owner.showColumn(column);\n } else {\n that.owner.hideColumn(column);\n }\n });\n }\n },\n _updateColumnsMenu: function () {\n var idx, length, current, checked, locked;\n var fieldAttr = kendo.attr('field'), lockedAttr = kendo.attr('locked'), uidAttr = kendo.attr('uid'), columnIndexMap = {}, columnsCount = 0, colIdx = 0, columnsInMenu = grep(leafColumns(this.owner.columns), function (col, idx) {\n var result = true, title = trim(col.title || '');\n if (col.menu === false || !col.field && !title.length) {\n result = false;\n }\n if (result) {\n columnIndexMap[idx] = columnsCount;\n columnsCount++;\n }\n return result;\n }), visibleFields = grep(this._ownerColumns(), function (field) {\n return !field.hidden && field.matchesMedia !== false;\n }), visibleDataFields = grep(visibleFields, function (field) {\n return field.originalField;\n }), lockedCount = grep(visibleDataFields, function (col) {\n return col.locked === true;\n }).length, nonLockedCount = grep(visibleDataFields, function (col) {\n return col.locked !== true;\n }).length, columnsNotInMenu = grep(this.owner.columns, function (col) {\n return col.menu === false;\n }), hiddenColumnsNotInMenu = grep(columnsNotInMenu, function (col) {\n return col.hidden;\n });\n this.wrapper.find('[role=\\'menuitemcheckbox\\']').attr('aria-checked', false);\n var checkboxes = this.wrapper.find('.k-columns-item input[' + fieldAttr + ']').prop('disabled', false).prop('checked', false);\n var switchWidget;\n for (idx = 0, length = checkboxes.length; idx < length; idx++) {\n current = checkboxes.eq(idx);\n locked = current.attr(lockedAttr) === 'true';\n checked = false;\n switchWidget = current.data('kendoSwitch');\n colIdx = columnsInMenu.map(function (col) {\n return col.headerAttributes.id;\n }).indexOf(current.attr(uidAttr));\n checked = !columnsInMenu[colIdx].hidden && columnsInMenu[colIdx].matchesMedia !== false;\n current.prop('checked', checked);\n if (switchWidget) {\n switchWidget.enable(true);\n switchWidget.check(checked);\n }\n current.closest('[role=\\'menuitemcheckbox\\']').attr('aria-checked', checked);\n if (checked) {\n if (lockedCount == 1 && locked) {\n current.prop('disabled', true);\n if (switchWidget) {\n switchWidget.enable(false);\n }\n }\n if ((columnsNotInMenu.length === 0 || columnsNotInMenu.length === hiddenColumnsNotInMenu.length) && nonLockedCount == 1 && !locked) {\n current.prop('disabled', true);\n if (switchWidget) {\n switchWidget.enable(false);\n }\n }\n }\n }\n },\n _updateColumnsLockedState: function () {\n var idx, length, current, column;\n var fieldAttr = kendo.attr('field');\n var lockedAttr = kendo.attr('locked');\n var columns = toHash(this._ownerColumns(), 'field');\n var checkboxes = this.wrapper.find('.k-columns-item input[type=checkbox]');\n for (idx = 0, length = checkboxes.length; idx < length; idx++) {\n current = checkboxes.eq(idx);\n column = columns[current.attr(fieldAttr)];\n if (column) {\n current.attr(lockedAttr, column.locked);\n }\n }\n this._updateColumnsMenu();\n },\n _filter: function () {\n var that = this, widget = FILTERMENU, options = that.options;\n if (options.filterable !== false) {\n if (options.filterable.multi) {\n widget = 'kendoFilterMultiCheck';\n if (options.filterable.dataSource) {\n options.filterable.checkSource = options.filterable.dataSource;\n delete options.filterable.dataSource;\n }\n }\n that.filterMenu = that.wrapper.find('.k-filterable')[widget](extend(true, {}, {\n appendToElement: true,\n dataSource: options.dataSource,\n values: options.values,\n field: that.field,\n title: that.title,\n change: function (e) {\n if (that.trigger('filtering', {\n filter: e.filter,\n field: e.field\n })) {\n e.preventDefault();\n }\n }\n }, options.filterable)).data(widget);\n if (that._isMobile) {\n that.menu.bind(SELECT, function (e) {\n var item = $(e.item);\n if (item.hasClass('k-filter-item')) {\n that.pane.navigate(that.filterMenu.view, that.options.animations.left);\n }\n });\n }\n }\n },\n _lockColumns: function () {\n var that = this;\n that.menu.bind(SELECT, function (e) {\n var item = $(e.item);\n if (item.hasClass('k-lock')) {\n that.owner.lockColumn(that.field);\n if (!that._isMobile) {\n that.close();\n }\n } else if (item.hasClass('k-unlock')) {\n that.owner.unlockColumn(that.field);\n if (!that._isMobile) {\n that.close();\n }\n }\n });\n },\n _stickyColumns: function () {\n var that = this;\n that.menu.bind(SELECT, function (e) {\n var item = $(e.item);\n var field = that.field;\n var columns = that.owner.columns;\n var column = grep(columns, function (column) {\n return column.field == field || column.title == field;\n })[0];\n if (item.hasClass('k-stick')) {\n that.owner.stickColumn(that.field);\n that.trigger(STICK, { column: column });\n if (!that._isMobile) {\n that.close();\n }\n } else if (item.hasClass('k-unstick')) {\n that.owner.unstickColumn(that.field);\n that.trigger(UNSTICK, { column: column });\n if (!that._isMobile) {\n that.close();\n }\n }\n });\n },\n _updateLockedColumns: function () {\n var field = this.field;\n var columns = this.owner.columns;\n var column = grep(columns, function (column) {\n return column.field == field || column.title == field;\n })[0];\n if (!column) {\n return;\n }\n var locked = column.locked === true;\n var length = grep(columns, function (column) {\n return !column.hidden && (column.locked && locked || !column.locked && !locked);\n }).length;\n var notLockable = column.lockable === false;\n var lockItem = this.wrapper.find('.k-lock').removeClass('k-state-disabled');\n var unlockItem = this.wrapper.find('.k-unlock').removeClass('k-state-disabled');\n if (locked || length == 1 || notLockable) {\n lockItem.addClass('k-state-disabled');\n }\n if (!locked || length == 1 || notLockable) {\n unlockItem.addClass('k-state-disabled');\n }\n this._updateColumnsLockedState();\n },\n _updateStickyColumns: function () {\n var field = this.field;\n var columns = this.owner.columns;\n var column = grep(columns, function (column) {\n return column.field == field || column.title == field;\n })[0];\n if (!column) {\n return;\n }\n var sticky = column.sticky === true;\n var stickable = column.stickable === true;\n var locked = column.locked === true;\n var length = grep(columns, function (column) {\n return !column.hidden && (column.locked && locked || !column.locked && !locked);\n }).length;\n var stickItem = this.wrapper.find('.k-stick').removeClass('k-state-disabled');\n var unstickItem = this.wrapper.find('.k-unstick').removeClass('k-state-disabled');\n if (sticky || !stickable || locked && length === 1) {\n stickItem.addClass('k-state-disabled');\n }\n if (!sticky || !stickable) {\n unstickItem.addClass('k-state-disabled');\n }\n },\n refresh: function () {\n var that = this, sort = that.options.dataSource.sort() || [], descriptor, field = that.field, idx, length;\n that.wrapper.find('.k-sort-asc, .k-sort-desc').removeClass(ACTIVE);\n for (idx = 0, length = sort.length; idx < length; idx++) {\n descriptor = sort[idx];\n if (field == descriptor.field) {\n that.wrapper.find('.k-sort-' + descriptor.dir).addClass(ACTIVE);\n }\n }\n that.link[that._filterExist(that.dataSource.filter()) ? 'addClass' : 'removeClass']('k-state-active');\n },\n _filterExist: function (filters) {\n var found = false;\n var filter;\n if (!filters) {\n return;\n }\n filters = filters.filters;\n for (var idx = 0, length = filters.length; idx < length; idx++) {\n filter = filters[idx];\n if (filter.field == this.field) {\n found = true;\n } else if (filter.filters) {\n found = found || this._filterExist(filter);\n }\n }\n return found;\n }\n });\n var template = '';\n var mobileTemplate = '
' + '
' + '' + '${messages.settings}' + '' + '
' + '
' + '
    ' + '
  • ' + '#=messages.column#: ${title}' + '
      ' + '#if(sortable){#' + '
    • ${messages.sortAscending}
    • ' + '
    • ${messages.sortDescending}
    • ' + '#}#' + '#if(hasLockableColumns){#' + '
    • ${messages.lock}
    • ' + '
    • ${messages.unlock}
    • ' + '#}#' + '#if(hasStickableColumns){#' + '
    • ${messages.stick}
    • ' + '
    • ${messages.unstick}
    • ' + '#}#' + '#if(filterable){#' + '
    • ' + '' + '' + '${messages.filter}' + '' + '' + '
    • ' + '#}#' + '
    ' + '
  • ' + '#if(showColumns){#' + '
  • ${messages.columnVisibility}' + '
      ' + '#for (var idx = 0; idx < columns.length; idx++) {#' + '
    • ' + '' + '' + '#=columns[idx].title#' + '' + '' + '' + '' + '' + '
    • ' + '#}#' + '
    ' + '
  • ' + '#}#' + '
  • ' + ' ' + '
      ' + '
    • ' + '' + '#=messages.clear#' + '' + '
    • ' + '
    ' + '
  • ' + '
' + '
' + '
';\n var MobileMenu = Widget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that._createCheckBoxes();\n that.element.on('click' + NS, 'li.k-item:not(.k-separator):not(.k-state-disabled):not(:has(.k-switch))', '_click');\n },\n events: [SELECT],\n _click: function (e) {\n var that = this;\n if (!$(e.target).is('[type=checkbox]')) {\n e.preventDefault();\n }\n if ($(e.target).hasClass('k-clear')) {\n that._cancelChanges(true);\n return;\n }\n if ($(e.target).hasClass('k-filterable')) {\n that._cancelChanges(true);\n that.trigger(SELECT, { item: e.currentTarget });\n return;\n }\n that._updateSelectedItems(e.currentTarget);\n },\n _updateSelectedItems: function (el) {\n var that = this;\n var item = $(el);\n var state = that.options.columnMenu.view.state || { columns: {} };\n var id = item.prop('id');\n if (item.hasClass('k-filter-item')) {\n return;\n }\n if (state[id]) {\n state[id] = false;\n } else {\n state[id] = true;\n }\n if (item.hasClass('k-sort-asc') || item.hasClass('k-sort-desc')) {\n var dir;\n var otherItem;\n var otherItemId;\n if (item.hasClass('k-sort-asc')) {\n dir = 'asc';\n otherItem = that.element.find('.k-sort-desc');\n } else {\n dir = 'desc';\n otherItem = that.element.find('.k-sort-asc');\n }\n otherItemId = otherItem.prop('id');\n if (dir === state.initialSort && !item.hasClass('k-state-selected')) {\n state[id] = false;\n }\n if (state[otherItemId]) {\n state[otherItemId] = false;\n }\n otherItem.removeClass(ACTIVE);\n }\n if (item.hasClass(ACTIVE)) {\n item.removeClass(ACTIVE);\n } else {\n item.addClass(ACTIVE);\n }\n },\n _cancelChanges: function (force) {\n var that = this;\n var menu = that.options.columnMenu;\n var view = menu.view;\n var state = view.state || { columns: {} };\n var columns = state.columns;\n that.element.find('.' + ACTIVE).removeClass(ACTIVE);\n menu.refresh();\n if (force) {\n var selectedItems = [];\n for (var key in columns) {\n if (columns.hasOwnProperty(key)) {\n if (columns[key] === true) {\n var item = view.element.find('#' + key);\n selectedItems.push(item[0]);\n }\n }\n }\n for (var i = selectedItems.length - 1; i >= 0; i--) {\n that.trigger(SELECT, { item: selectedItems[i] });\n }\n if (menu.options.hasLockableColumns) {\n menu._updateLockedColumns();\n }\n if (menu.options.hasStickableColumns) {\n menu._updateStickyColumns();\n }\n }\n that.options.columnMenu.view.state = { columns: {} };\n },\n _applyChanges: function () {\n var that = this;\n var view = that.options.columnMenu.view;\n var state = view.state || { columns: {} };\n for (var key in state) {\n if (state.hasOwnProperty(key)) {\n if (key !== 'initialSort' && key !== 'columns' && state[key] === true) {\n var item = view.element.find('#' + key);\n if (item.hasClass(ACTIVE)) {\n item.removeClass(ACTIVE);\n } else {\n item.addClass(ACTIVE);\n }\n that.trigger(SELECT, { item: item[0] });\n }\n }\n }\n },\n _createCheckBoxes: function () {\n var that = this;\n that.element.find('.k-columns-item').find('[type=\\'checkbox\\']').kendoSwitch({\n messages: {\n checked: '',\n unchecked: ''\n },\n change: function (e) {\n var item = e.sender.element.closest('.k-item');\n var state = that.options.columnMenu.view.state || { columns: {} };\n var id = item.prop('id');\n if (state.columns[id]) {\n state.columns[id] = false;\n } else {\n state.columns[id] = true;\n }\n that.trigger(SELECT, { item: item });\n }\n });\n },\n _destroyCheckBoxes: function () {\n var that = this;\n var elements = that.element.find('.k-columns-item').find('[type=\\'checkbox\\']');\n var switchWidget;\n for (var i = 0; i < elements.length; i++) {\n switchWidget = elements.eq(i).data('kendoSwitch');\n if (switchWidget) {\n switchWidget.destroy();\n }\n }\n },\n close: function () {\n this.options.pane.navigate('');\n },\n destroy: function () {\n var that = this;\n Widget.fn.destroy.call(that);\n that.element.off(NS);\n that._destroyCheckBoxes();\n }\n });\n ui.plugin(ColumnMenu);\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}