{"version":3,"sources":["kendo.listbox.js"],"names":["f","define","$","undefined","getSortedDomIndices","items","indices","map","item","index","isUndefined","value","defaultHint","element","clone","removeClass","DRAGGEDCLASS","FOCUSED_CLASS","addClass","kendo","format","SELECTED_STATE_CLASS","RESET","DRAG_CLUE_CLASS","width","defaultPlaceholder","DROP_HINT_CLASS","isInputElement","is","CommandFactory","ListBoxCommand","RemoveItemsCommand","MoveItemsCommand","MoveUpItemsCommand","MoveDownItemsCommand","TransferItemsCommand","TransferItemsToCommand","TransferItemsFromCommand","TransferAllItemsToCommand","TransferAllItemsFromCommand","ToolBar","window","kendoAttr","attr","data","keys","kendoTemplate","template","Widget","ui","DataSource","Selectable","DataBoundWidget","Class","extend","noop","proxy","DASH","DOT","SPACE","HASH","KENDO_LISTBOX","NS","DISABLED_STATE_CLASS","ENABLED_ITEM_SELECTOR","ENABLED_ITEMS_SELECTOR","TOOLBAR_CLASS","TOOL_SELECTOR","LIST_CLASS","LIST_SELECTOR","CLICK","KEYDOWN","BLUR","outerWidth","_outerWidth","outerHeight","_outerHeight","CHANGE","DATABOUND","ADD","REMOVE","REORDER","MOVE_UP","MOVE_DOWN","TRANSFER_TO","TRANSFER_FROM","TRANSFER_ALL_TO","TRANSFER_ALL_FROM","UNIQUE_ID","TABINDEX","COMMAND","MOVE_UP_OFFSET","MOVE_DOWN_OFFSET","DRAGSTART","DRAG","DROP","DRAGEND","DEFAULT_FILTER","RIGHT","BOTTOM","TOOLBAR_POSITION_CLASS_NAMES","ListBox","init","options","that","this","fn","call","_wrapper","_list","hide","dataSource","dataTextField","dataValueField","_templates","_selectable","_dataSource","_createToolbar","_createDraggable","_createNavigatable","destroy","isNaN","_listTabIndex","_getList","off","_unbindDataSource","_destroySelectable","_destroyToolbar","wrapper","_target","_draggable","placeholder","setOptions","events","name","autoBind","selectable","draggable","dropSources","connectWith","navigatable","toolbar","position","tools","messages","remove","moveUp","moveDown","transferTo","transferFrom","transferAllTo","transferAllFrom","add","dataItems","i","length","itemsLength","list","_unbindDataChange","_addItem","_bindDataChange","_bindDataSource","_syncElement","dataItem","templates","itemTemplate","r","itemContent","uid","appendTo","_data","push","_addItemAt","_insertElementAt","insertAfter","children","eq","prepend","on","_click","_keyDown","_blur","_getTabIndex","tabindex","removeAttr","e","target","currentTarget","oldTarget","isInput","_activeElement","focus","_getNavigatableItem","key","current","filter","first","UP","prevAll","DOWN","nextAll","_scrollIntoView","itemOffsetTop","contentScrollTop","contentOffsetHeight","bottomDistance","parent","offsetTop","scrollTop","clientHeight","offsetHeight","shouldPreventDefault","keyCode","shiftKey","ctrlKey","_shiftSelecting","DELETE","_executeCommand","preventDefault","clearSelection","hasClass","trigger","select","SPACEBAR","LEFT","focusElement","hint","Error","Draggable","isFunction","dragstart","_dragstart","dragcancel","_clear","drag","_drag","dragend","_dragend","draggedElement","eventData","draggableEvent","enabled","_findElementUnderCursor","elementUnderCursor","sender","contains","show","_findTarget","node","elementNode","closest","has","listBox","appendToBottom","_searchConnectedListBox","_getElementCenter","center","getOffset","top","left","connectedListBox","closestContainer","originalElement","find","getKendoListBox","inArray","id","targetCenter","offsetDelta","direction","cursorOffset","x","location","y","Math","round","_movePlaceholder","draggableOptions","before","after","append","draggedItem","placeholderIndex","not","draggedIndex","offset","reorder","dropped","_updateToolbar","_updateAllToolbars","dataItemAtIndex","at","itemAtIndex","listItem","_removeElement","listItems","_getItems","_removeItem","pop","uniqueIdAttr","getByUid","html","_dataItems","enabledItems","multiple","clear","enable","_enableItem","setDataSource","isArray","fields","field","create","fetch","_changeHandler","bind","unbind","_dataChangeHandler","refresh","wrap","style","cssText","title","insertBefore","className","css","_innerWrapper","firstChild","expr","useWithBlock","idx","view","_setItemIds","_option","dataValue","dataText","option","indexOf","replace","htmlEncode","viewLength","selectableOptions","parseOptions","aria","change","_onSelect","toolbarElement","toolbarOptions","toolbarInsertion","join","commandName","command","execute","_updateToolStates","listBoxElements","elementsLength","plugin","_commands","register","commandType","match","commands","toLowerCase","getItems","canExecute","moveItems","movedItem","indecesInDom","movedItems","makeArray","sort","itemComparer","moveAction","item1","item2","indexItem1","indexItem2","domIndices","last","sourceListBox","getSourceListBox","destinationListBox","getDestinationListBox","updatedSelection","getUpdatedSelection","updateSelection","itemFilter","lastEnabledItem","containsLastItem","itemToSelect","_initTemplates","_createTools","_attachEventHandlers","_detachEventHandlers","tool","toolsLength","toolsMessages","toolList","_createToolList","defaultTools","text","_onToolClick","_executeToolCommand","_updateToolState","toolName","toolElement","iconClass","jQuery","amd","a1","a2","a3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,iBACH,oBACA,aACA,oBACDD,IACL,WAg0CE,MArzCC,UAAUE,EAAGC,GAmEV,QAASC,GAAoBC,GACzB,GAAIC,GAAUJ,EAAEK,IAAIF,EAAO,SAAUG,GACjC,MAAON,GAAEM,GAAMC,SAEnB,OAAOH,GAEX,QAASI,GAAYC,GACjB,MAAwB,KAAVA,EAElB,QAASC,GAAYC,GACjB,MAAOA,GAAQC,QAAQC,YAAYC,IAAcD,YAAYE,GAAeC,SAASC,EAAMC,OAAO,cAAeC,EAAsBC,EAAOC,IAAkBC,MAAMX,EAAQW,SAElL,QAASC,KACL,MAAOvB,GAAE,QAAQgB,SAASQ,GAiuC9B,QAASC,GAAed,GACpB,MAAOX,GAAEW,GAASe,GAAG,0MAlzC5B,GA48BOC,GA8BAC,EAaAC,EAiBAC,EA2CAC,EAYAC,EAaAC,EAmDAC,EAkBAC,EAkBAC,EAaAC,EAaAC,EA5rCArB,EAAQsB,OAAOtB,MACfuB,EAAYvB,EAAMwB,KAClBC,EAAOzB,EAAMyB,KACbC,EAAO1B,EAAM0B,KACbC,EAAgB3B,EAAM4B,SACtBC,EAAS7B,EAAM8B,GAAGD,OAClBE,EAAaN,EAAKM,WAClBC,EAAahC,EAAM8B,GAAGE,WACtBC,EAAkBjC,EAAM8B,GAAGG,gBAC3BC,EAAQlC,EAAMkC,MACdC,EAASpD,EAAEoD,OACX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MACrB4P,EAAc5P,EAAMY,MAExB,KAAKD,EAAI,EAAGA,EAAIiP,EAAajP,IACzBlD,EAAK2S,iBAAiBpQ,EAAMW,KAGpCyP,iBAAkB,SAAUC,GAAV,GACV5S,GAAOC,KACPsP,EAAUlU,EAAeqK,QAAQsH,OAAO4F,GAAYxJ,QAASpJ,EAAKoJ,UAClE8I,EAAOlS,EAAK3F,QAAQ0P,KAAK,kBAAqB6I,EAAW,MACzDC,EAAcX,EAAK,EACnBW,IAAetD,GAAWA,EAAQa,aAC9Bb,EAAQa,aACR8B,EAAK3X,YAAYgD,GAAsByH,WAAW/F,IAElDiT,EAAKxX,SAAS6C,GAAsBpB,KAAK8C,GAAU,UAKnEjD,EAAQuW,cACJ9P,QACI8M,QAAS/Q,GACTsU,UAAW,SAEfpQ,QACI6M,QAAS7Q,GACToU,UAAW,mBAEfnQ,UACI4M,QAAS5Q,GACTmU,UAAW,qBAEflQ,YACI2M,QAAS3Q,GACTkU,UAAW,sBAEfjQ,cACI0M,QAAS1Q,GACTiU,UAAW,qBAEfhQ,eACIyM,QAASzQ,GACTgU,UAAW,6BAEf/P,iBACIwM,QAASxQ,GACT+T,UAAW,6BAGnBhW,EAAO+C,IAAW7D,QAASA,KAI7BC,OAAOtB,MAAMoY,QACR9W,OAAOtB,OACE,kBAAVlB,SAAwBA,OAAOuZ,IAAMvZ,OAAS,SAAUwZ,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.listbox.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.listbox', [\n 'kendo.draganddrop',\n 'kendo.data',\n 'kendo.selectable'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'listbox',\n name: 'ListBox',\n category: 'web',\n depends: [\n 'draganddrop',\n 'data',\n 'selectable'\n ]\n };\n (function ($, undefined) {\n var kendo = window.kendo;\n var kendoAttr = kendo.attr;\n var data = kendo.data;\n var keys = kendo.keys;\n var kendoTemplate = kendo.template;\n var Widget = kendo.ui.Widget;\n var DataSource = data.DataSource;\n var Selectable = kendo.ui.Selectable;\n var DataBoundWidget = kendo.ui.DataBoundWidget;\n var Class = kendo.Class;\n var extend = $.extend;\n var noop = $.noop;\n var proxy = $.proxy;\n var DASH = '-';\n var DOT = '.';\n var SPACE = ' ';\n var HASH = '#';\n var KENDO_LISTBOX = 'kendoListBox';\n var NS = DOT + KENDO_LISTBOX;\n var DISABLED_STATE_CLASS = 'k-state-disabled';\n var SELECTED_STATE_CLASS = 'k-state-selected';\n var ENABLED_ITEM_SELECTOR = '.k-item:not(.k-state-disabled)';\n var ENABLED_ITEMS_SELECTOR = '.k-list:not(.k-state-disabled) >' + ENABLED_ITEM_SELECTOR;\n var TOOLBAR_CLASS = 'k-listbox-toolbar';\n var TOOL_SELECTOR = 'li > a.k-button:not(.k-state-disabled)';\n var FOCUSED_CLASS = 'k-state-focused';\n var DRAG_CLUE_CLASS = 'k-drag-clue';\n var DROP_HINT_CLASS = 'k-drop-hint';\n var LIST_CLASS = 'k-reset k-list';\n var LIST_SELECTOR = '.k-reset.k-list';\n var RESET = 'k-reset';\n var CLICK = 'click' + NS;\n var KEYDOWN = 'keydown' + NS;\n var BLUR = 'blur' + NS;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n var CHANGE = 'change';\n var DATABOUND = 'dataBound';\n var ADD = 'add';\n var REMOVE = 'remove';\n var REORDER = 'reorder';\n var MOVE_UP = 'moveUp';\n var MOVE_DOWN = 'moveDown';\n var TRANSFER_TO = 'transferTo';\n var TRANSFER_FROM = 'transferFrom';\n var TRANSFER_ALL_TO = 'transferAllTo';\n var TRANSFER_ALL_FROM = 'transferAllFrom';\n var DRAGGEDCLASS = 'k-ghost';\n var UNIQUE_ID = 'uid';\n var TABINDEX = 'tabindex';\n var COMMAND = 'command';\n var MOVE_UP_OFFSET = -1;\n var MOVE_DOWN_OFFSET = 1;\n var DRAGSTART = 'dragstart';\n var DRAG = 'drag';\n var DROP = 'drop';\n var DRAGEND = 'dragend';\n var DEFAULT_FILTER = 'ul.k-reset.k-list>li.k-item';\n var RIGHT = 'right';\n var BOTTOM = 'bottom';\n var TOOLBAR_POSITION_CLASS_NAMES = [\n TOOLBAR_CLASS + DASH + 'left',\n TOOLBAR_CLASS + DASH + RIGHT,\n TOOLBAR_CLASS + DASH + 'top',\n TOOLBAR_CLASS + DASH + BOTTOM\n ];\n function getSortedDomIndices(items) {\n var indices = $.map(items, function (item) {\n return $(item).index();\n });\n return indices;\n }\n function isUndefined(value) {\n return typeof value === 'undefined';\n }\n function defaultHint(element) {\n return element.clone().removeClass(DRAGGEDCLASS).removeClass(FOCUSED_CLASS).addClass(kendo.format('{0} {1} {2}', SELECTED_STATE_CLASS, RESET, DRAG_CLUE_CLASS)).width(element.width());\n }\n function defaultPlaceholder() {\n return $('
  • ').addClass(DROP_HINT_CLASS);\n }\n var ListBox = DataBoundWidget.extend({\n init: function (element, options) {\n var that = this;\n Widget.fn.init.call(that, element, options);\n that._wrapper();\n that._list();\n element = that.element.attr('multiple', 'multiple').hide();\n if (element[0] && !that.options.dataSource) {\n that.options.dataTextField = that.options.dataTextField || 'text';\n that.options.dataValueField = that.options.dataValueField || 'value';\n }\n that._templates();\n that._selectable();\n that._dataSource();\n that._createToolbar();\n that._createDraggable();\n that._createNavigatable();\n },\n destroy: function () {\n var that = this;\n DataBoundWidget.fn.destroy.call(that);\n if (!isNaN(that._listTabIndex)) {\n that._getList().off();\n that._listTabIndex = null;\n }\n that._unbindDataSource();\n that._destroySelectable();\n that._destroyToolbar();\n that.wrapper.off(NS);\n if (that._target) {\n that._target = null;\n }\n if (that._draggable) {\n that._draggable.destroy();\n that.placeholder = null;\n }\n kendo.destroy(that.element);\n },\n setOptions: function (options) {\n Widget.fn.setOptions.call(this, options);\n this._templates();\n this._dataSource();\n },\n events: [\n CHANGE,\n DATABOUND,\n ADD,\n REMOVE,\n REORDER,\n DRAGSTART,\n DRAG,\n DROP,\n DRAGEND\n ],\n options: {\n name: 'ListBox',\n autoBind: true,\n template: '',\n dataTextField: '',\n dataValueField: '',\n selectable: 'single',\n draggable: null,\n dropSources: [],\n connectWith: '',\n navigatable: true,\n toolbar: {\n position: RIGHT,\n tools: []\n },\n messages: {\n tools: {\n remove: 'Delete',\n moveUp: 'Move Up',\n moveDown: 'Move Down',\n transferTo: 'Transfer To',\n transferFrom: 'Transfer From',\n transferAllTo: 'Transfer All To',\n transferAllFrom: 'Transfer All From'\n }\n }\n },\n add: function (dataItems) {\n var that = this;\n var items = dataItems && dataItems.length ? dataItems : [dataItems];\n var itemsLength = items.length;\n var list = that._getList();\n var i;\n that._unbindDataSource();\n that._unbindDataChange();\n for (i = 0; i < itemsLength; i++) {\n that._addItem(items[i], list);\n }\n that._bindDataChange();\n that._bindDataSource();\n that._syncElement();\n },\n _addItem: function (dataItem, list) {\n var that = this;\n var item = that.templates.itemTemplate({\n item: dataItem,\n r: that.templates.itemContent\n });\n $(item).attr(kendoAttr(UNIQUE_ID), dataItem.uid).appendTo(list);\n if (typeof dataItem === typeof '') {\n that.dataSource._data.push(dataItem);\n } else {\n that.dataSource.add(dataItem);\n }\n },\n _addItemAt: function (dataItem, index) {\n var that = this;\n var item = that.templates.itemTemplate({\n item: dataItem,\n r: that.templates.itemContent\n });\n that._unbindDataSource();\n if (typeof dataItem === typeof '') {\n that._insertElementAt(item, index);\n that.dataSource._data.push(dataItem);\n } else {\n that._insertElementAt($(item).attr(kendoAttr(UNIQUE_ID), dataItem.uid), index);\n that.dataSource.add(dataItem);\n }\n that._bindDataSource();\n that._syncElement();\n },\n _insertElementAt: function (item, index) {\n var that = this;\n var list = that._getList();\n if (index > 0) {\n $(item).insertAfter(list.children().eq(index - 1));\n } else {\n $(list).prepend(item);\n }\n },\n _createNavigatable: function () {\n var that = this;\n var options = that.options;\n if (options.navigatable) {\n that._getList().on(CLICK, ENABLED_ITEM_SELECTOR, proxy(that._click, that)).on(KEYDOWN, proxy(that._keyDown, that)).on(BLUR, proxy(that._blur, that));\n }\n },\n _getTabIndex: function () {\n var that = this;\n var tabindex;\n if (!isNaN(that._listTabIndex)) {\n return that._listTabIndex;\n }\n tabindex = that.element.attr(TABINDEX);\n that._listTabIndex = !isNaN(tabindex) ? tabindex : 0;\n that.element.removeAttr(TABINDEX);\n return that._listTabIndex;\n },\n _blur: function () {\n if (this._target) {\n this._target.removeClass(FOCUSED_CLASS);\n this._getList().removeAttr('aria-activedescendant');\n }\n this._target = null;\n },\n _click: function (e) {\n var that = this;\n var target = $(e.currentTarget);\n var oldTarget = that._target;\n var isInput = isInputElement(e.target);\n if (oldTarget) {\n oldTarget.removeClass(FOCUSED_CLASS);\n }\n that._target = target;\n target.addClass(FOCUSED_CLASS);\n that._getList().attr('aria-activedescendant', target.attr('id'));\n if (that._getList()[0] !== kendo._activeElement() && !isInput) {\n that.focus();\n }\n },\n _getNavigatableItem: function (key) {\n var that = this;\n var current;\n if (!that._target) {\n current = that.items().filter(ENABLED_ITEM_SELECTOR).first();\n } else {\n current = that._target;\n }\n if (key === keys.UP && that._target) {\n current = that._target.prevAll(ENABLED_ITEM_SELECTOR).first();\n }\n if (key === keys.DOWN && that._target) {\n current = that._target.nextAll(ENABLED_ITEM_SELECTOR).first();\n }\n return current.length ? current : null;\n },\n _scrollIntoView: function (item) {\n if (!item) {\n return;\n }\n if (item[0]) {\n item = item[0];\n }\n var list = this._getList().parent()[0];\n var itemOffsetTop = item.offsetTop;\n var contentScrollTop = list.scrollTop;\n var contentOffsetHeight = list.clientHeight;\n var bottomDistance = itemOffsetTop + item.offsetHeight;\n if (contentScrollTop > itemOffsetTop) {\n contentScrollTop = itemOffsetTop;\n } else if (bottomDistance > contentScrollTop + contentOffsetHeight) {\n contentScrollTop = bottomDistance - contentOffsetHeight;\n }\n list.scrollTop = contentScrollTop;\n },\n _keyDown: function (e) {\n var that = this;\n var key = e.keyCode;\n var current = that._getNavigatableItem(key);\n var shouldPreventDefault;\n if (that._target) {\n that._target.removeClass(FOCUSED_CLASS);\n }\n if (!(e.shiftKey && !e.ctrlKey && (key === keys.DOWN || key === keys.UP))) {\n that._shiftSelecting = false;\n }\n if (key == keys.DELETE) {\n that._executeCommand(REMOVE);\n if (that._target) {\n that._target.removeClass(FOCUSED_CLASS);\n that._getList().removeAttr('aria-activedescendant');\n that._target = null;\n }\n shouldPreventDefault = true;\n } else if (key === keys.DOWN || key === keys.UP) {\n if (!current) {\n e.preventDefault();\n return;\n }\n if (e.shiftKey && !e.ctrlKey) {\n if (!that._shiftSelecting) {\n that.clearSelection();\n that._shiftSelecting = true;\n }\n if (that._target && current.hasClass('k-state-selected')) {\n that._target.removeClass(SELECTED_STATE_CLASS);\n that.trigger(CHANGE);\n } else if (that.options.selectable == 'single') {\n that.select(current);\n } else {\n that.select(current.add(that._target));\n }\n } else if (e.shiftKey && e.ctrlKey) {\n that._executeCommand(key === keys.DOWN ? MOVE_DOWN : MOVE_UP);\n that._scrollIntoView(that._target);\n e.preventDefault();\n return;\n } else if (!e.shiftKey && !e.ctrlKey) {\n if (that.options.selectable === 'multiple') {\n that.clearSelection();\n }\n that.select(current);\n }\n that._target = current;\n if (that._target) {\n that._target.addClass(FOCUSED_CLASS);\n that._scrollIntoView(that._target);\n that._getList().attr('aria-activedescendant', that._target.attr('id'));\n } else {\n that._getList().removeAttr('aria-activedescendant');\n }\n shouldPreventDefault = true;\n } else if (key == keys.SPACEBAR) {\n if (e.ctrlKey && that._target) {\n if (that._target.hasClass(SELECTED_STATE_CLASS)) {\n that._target.removeClass(SELECTED_STATE_CLASS);\n that.trigger(CHANGE);\n } else {\n that.select(that._target);\n }\n } else {\n that.clearSelection();\n that.select(that._target);\n }\n shouldPreventDefault = true;\n } else if (e.ctrlKey && key == keys.RIGHT) {\n if (e.shiftKey) {\n that._executeCommand(TRANSFER_ALL_TO);\n } else {\n that._executeCommand(TRANSFER_TO);\n }\n that._target = that.select().length ? that.select() : null;\n shouldPreventDefault = true;\n } else if (e.ctrlKey && key == keys.LEFT) {\n if (e.shiftKey) {\n that._executeCommand(TRANSFER_ALL_FROM);\n } else {\n that._executeCommand(TRANSFER_FROM);\n }\n shouldPreventDefault = true;\n }\n if (shouldPreventDefault) {\n e.preventDefault();\n }\n },\n focus: function () {\n kendo.focusElement(this._getList());\n },\n _createDraggable: function () {\n var that = this;\n var draggable = that.options.draggable;\n var hint;\n if (draggable) {\n hint = draggable.hint;\n if (!that.options.selectable) {\n throw new Error('Dragging requires selection to be enabled');\n }\n if (!hint) {\n hint = defaultHint;\n }\n that._draggable = new kendo.ui.Draggable(that.wrapper, {\n filter: draggable.filter ? draggable.filter : DEFAULT_FILTER,\n hint: kendo.isFunction(hint) ? hint : $(hint),\n dragstart: proxy(that._dragstart, that),\n dragcancel: proxy(that._clear, that),\n drag: proxy(that._drag, that),\n dragend: proxy(that._dragend, that)\n });\n }\n },\n _dragstart: function (e) {\n var that = this;\n var draggedElement = that.draggedElement = e.currentTarget;\n var placeholder = that.options.draggable.placeholder;\n var dataItem = that.dataItem(draggedElement);\n var eventData = {\n dataItems: dataItem,\n items: $(draggedElement),\n draggableEvent: e\n };\n if (that.options.draggable.enabled === false) {\n e.preventDefault();\n return;\n }\n if (!placeholder) {\n placeholder = defaultPlaceholder;\n }\n that.placeholder = kendo.isFunction(placeholder) ? $(placeholder.call(that, draggedElement)) : $(placeholder);\n if (draggedElement.is(DOT + DISABLED_STATE_CLASS)) {\n e.preventDefault();\n } else {\n if (that.trigger(DRAGSTART, eventData)) {\n e.preventDefault();\n } else {\n that.clearSelection();\n that.select(draggedElement);\n draggedElement.addClass(DRAGGEDCLASS);\n }\n }\n },\n _clear: function () {\n this.draggedElement.removeClass(DRAGGEDCLASS);\n this.placeholder.remove();\n },\n _findElementUnderCursor: function (e) {\n var elementUnderCursor = kendo.elementUnderCursor(e);\n var draggable = e.sender;\n if ($.contains(draggable.hint[0], elementUnderCursor) || draggable.hint[0] === elementUnderCursor) {\n draggable.hint.hide();\n elementUnderCursor = kendo.elementUnderCursor(e);\n draggable.hint.show();\n }\n return elementUnderCursor;\n },\n _findTarget: function (e) {\n var that = this;\n var element = that._findElementUnderCursor(e);\n var elementNode = $(element);\n var list = that._getList();\n var items;\n var node;\n if ($.contains(list[0], element)) {\n items = that.items();\n element = elementNode.is('li') ? element : elementNode.closest('li')[0];\n node = items.filter(element)[0] || items.has(element)[0];\n if (node) {\n node = $(node);\n return !node.hasClass(DISABLED_STATE_CLASS) ? {\n element: node,\n listBox: that\n } : null;\n } else {\n return null;\n }\n } else if (list[0] == element || list.parent()[0] == element) {\n return {\n element: $(list),\n appendToBottom: true,\n listBox: that\n };\n } else {\n return that._searchConnectedListBox(elementNode);\n }\n },\n _getElementCenter: function (element) {\n var center = element.length ? kendo.getOffset(element) : null;\n if (center) {\n center.top += outerHeight(element) / 2;\n center.left += outerWidth(element) / 2;\n }\n return center;\n },\n _searchConnectedListBox: function (element) {\n var connectedListBox;\n var items;\n var node;\n var originalElement = element;\n var closestContainer;\n if (element.hasClass('k-list-scroller k-selectable')) {\n closestContainer = element;\n } else {\n closestContainer = element.closest('.k-list-scroller.k-selectable');\n }\n if (closestContainer.length) {\n connectedListBox = closestContainer.parent().find('[data-role=\\'listbox\\']').getKendoListBox();\n } else {\n return null;\n }\n if (connectedListBox && $.inArray(this.element[0].id, connectedListBox.options.dropSources) !== -1) {\n items = connectedListBox.items();\n element = element.is('li') ? element[0] : element.closest('li')[0];\n node = items.filter(element)[0] || items.has(element)[0];\n if (node) {\n node = $(node);\n return !node.hasClass(DISABLED_STATE_CLASS) ? {\n element: node,\n listBox: connectedListBox\n } : null;\n } else if (!items.length || originalElement.hasClass('k-list-scroller k-selectable') || originalElement.hasClass('k-reset k-list')) {\n return {\n element: connectedListBox._getList(),\n listBox: connectedListBox,\n appendToBottom: true\n };\n } else {\n return null;\n }\n }\n return null;\n },\n _drag: function (e) {\n var that = this;\n var draggedElement = that.draggedElement;\n var target = that._findTarget(e);\n var cursorOffset = {\n left: e.x.location,\n top: e.y.location\n };\n var dataItem = that.dataItem(draggedElement);\n var eventData = {\n dataItems: [dataItem],\n items: $(draggedElement),\n draggableEvent: e\n };\n var targetCenter;\n var offsetDelta;\n var direction;\n if (that.trigger(DRAG, eventData)) {\n e.preventDefault();\n return;\n }\n if (target) {\n targetCenter = this._getElementCenter(target.element);\n offsetDelta = {\n left: Math.round(cursorOffset.left - targetCenter.left),\n top: Math.round(cursorOffset.top - targetCenter.top)\n };\n if (target.appendToBottom) {\n that._movePlaceholder(target, null, draggedElement);\n return;\n }\n if (offsetDelta.top < 0) {\n direction = 'prev';\n } else if (offsetDelta.top > 0) {\n direction = 'next';\n }\n if (direction) {\n if (target.element[0] != that.placeholder[0]) {\n that._movePlaceholder(target, direction, draggedElement);\n }\n }\n } else if (that.placeholder.parent().length) {\n that.placeholder.remove();\n }\n },\n _movePlaceholder: function (target, direction, draggedElement) {\n var that = this;\n var placeholder = that.placeholder;\n var draggableOptions = target.listBox.options.draggable;\n if (placeholder.parent().length) {\n that.placeholder.remove();\n if (draggableOptions && draggableOptions.placeholder) {\n that.placeholder = kendo.isFunction(draggableOptions.placeholder) ? $(draggableOptions.placeholder.call(that, draggedElement)) : $(draggableOptions.placeholder);\n } else {\n that.placeholder = $(defaultPlaceholder.call(that, draggedElement));\n }\n }\n if (!direction) {\n target.element.append(that.placeholder);\n } else if (direction === 'prev') {\n target.element.before(that.placeholder);\n } else if (direction === 'next') {\n target.element.after(that.placeholder);\n }\n },\n _dragend: function (e) {\n var that = this;\n var draggedItem = that.draggedElement;\n var items = that.items();\n var placeholderIndex = items.not(that.draggedElement).index(that.placeholder);\n var draggedIndex = items.not(that.placeholder).index(that.draggedElement);\n var dataItem = that.dataItem(draggedItem);\n var eventData = {\n dataItems: [dataItem],\n items: $(draggedItem)\n };\n var connectedListBox = that.placeholder.closest('.k-widget.k-listbox').find('[data-role=\\'listbox\\']').getKendoListBox();\n if (that.trigger(DROP, extend({}, eventData, { draggableEvent: e }))) {\n e.preventDefault();\n this._clear();\n return;\n }\n if (placeholderIndex >= 0) {\n if (placeholderIndex !== draggedIndex && !that.trigger(REORDER, extend({}, eventData, { offset: placeholderIndex - draggedIndex }))) {\n draggedItem.removeClass(DRAGGEDCLASS);\n that.reorder(draggedItem, placeholderIndex);\n }\n } else if (connectedListBox) {\n if (!that.trigger(REMOVE, eventData)) {\n that.remove($(draggedItem));\n }\n if (!connectedListBox.trigger(ADD, eventData)) {\n connectedListBox._addItemAt(dataItem, connectedListBox.items().index(that.placeholder));\n }\n }\n that._clear();\n that._draggable.dropped = true;\n that.trigger(DRAGEND, extend({}, eventData, { draggableEvent: e }));\n that._updateToolbar();\n that._updateAllToolbars();\n },\n reorder: function (item, index) {\n var that = this;\n var dataSource = that.dataSource;\n var dataItem = that.dataItem(item);\n var dataItemAtIndex = dataSource.at(index);\n var itemAtIndex = that.items()[index];\n var listItem = $(item);\n if (dataItem && itemAtIndex && dataItemAtIndex) {\n that._removeElement(listItem);\n that._insertElementAt(listItem, index);\n that._updateToolbar();\n }\n },\n remove: function (items) {\n var that = this;\n var listItems = that._getItems(items);\n var itemsLength = listItems.length;\n var i;\n that._unbindDataSource();\n that._unbindDataChange();\n for (i = 0; i < itemsLength; i++) {\n that._removeItem($(listItems[i]));\n }\n that._bindDataChange();\n that._bindDataSource();\n that._syncElement();\n that._updateToolbar();\n that._updateAllToolbars();\n },\n _removeItem: function (item) {\n var that = this;\n var dataSource = that.dataSource;\n var dataItem = that.dataItem(item);\n if (!dataItem || !dataSource) {\n return;\n }\n if (typeof dataItem === typeof '') {\n var data = dataSource._data;\n for (var i = 0; i < data.length; i++) {\n if (dataItem === data[i]) {\n data[i] = data[data.length - 1];\n data.pop();\n break;\n }\n }\n } else {\n dataSource.remove(dataItem);\n }\n that._removeElement(item);\n },\n _removeElement: function (item) {\n kendo.destroy(item);\n $(item).off().remove();\n },\n dataItem: function (element) {\n var uniqueIdAttr = kendoAttr(UNIQUE_ID);\n var uid = $(element).attr(uniqueIdAttr) || $(element).closest('[' + uniqueIdAttr + ']').attr(uniqueIdAttr);\n if (uid) {\n return this.dataSource.getByUid(uid);\n } else {\n return $(element).html();\n }\n },\n _dataItems: function (items) {\n var dataItems = [];\n var listItems = $(items);\n var itemsLength = listItems.length;\n var i;\n for (i = 0; i < itemsLength; i++) {\n dataItems.push(this.dataItem(listItems.eq(i)));\n }\n return dataItems;\n },\n items: function () {\n var list = this._getList();\n return list.children();\n },\n select: function (items) {\n var that = this;\n var selectable = that.selectable;\n var enabledItems;\n if (isUndefined(items)) {\n return selectable.value();\n }\n enabledItems = that.items().filter(items).filter(ENABLED_ITEMS_SELECTOR);\n if (!selectable.options.multiple) {\n selectable.clear();\n enabledItems = enabledItems.first();\n }\n return selectable.value(enabledItems);\n },\n clearSelection: function () {\n var that = this;\n var selectable = that.selectable;\n if (selectable) {\n selectable.clear();\n }\n },\n enable: function (items, enable) {\n var that = this;\n var enabled = isUndefined(enable) ? true : !!enable;\n var listItems = that._getItems(items);\n var itemsLength = listItems.length;\n var i;\n for (i = 0; i < itemsLength; i++) {\n that._enableItem($(listItems[i]), enabled);\n }\n that._updateAllToolbars();\n },\n _enableItem: function (item, enable) {\n var that = this;\n var dataItem = that.dataItem(item);\n if (dataItem) {\n if (enable) {\n $(item).removeClass(DISABLED_STATE_CLASS);\n } else {\n $(item).addClass(DISABLED_STATE_CLASS).removeClass(SELECTED_STATE_CLASS);\n }\n }\n },\n setDataSource: function (dataSource) {\n var that = this;\n that.options.dataSource = dataSource;\n that._dataSource();\n },\n _dataSource: function () {\n var that = this;\n var options = that.options;\n var dataSource = options.dataSource || {};\n dataSource = $.isArray(dataSource) ? { data: dataSource } : dataSource;\n dataSource.select = that.element;\n dataSource.fields = [\n { field: options.dataTextField },\n { field: options.dataValueField }\n ];\n that._unbindDataSource();\n that.dataSource = DataSource.create(dataSource);\n that._bindDataSource();\n if (that.options.autoBind) {\n that.dataSource.fetch();\n }\n },\n _bindDataChange: function () {\n var dataSource = this.dataSource;\n if (dataSource._data && dataSource._changeHandler) {\n dataSource._data.bind(CHANGE, dataSource._changeHandler);\n dataSource._data.trigger(CHANGE);\n }\n },\n _unbindDataChange: function () {\n var dataSource = this.dataSource;\n if (dataSource._data && dataSource._changeHandler) {\n dataSource._data.unbind(CHANGE, dataSource._changeHandler);\n }\n },\n _bindDataSource: function () {\n var that = this;\n var dataSource = that.dataSource;\n that._dataChangeHandler = proxy(that.refresh, that);\n if (dataSource) {\n dataSource.bind(CHANGE, that._dataChangeHandler);\n }\n },\n _unbindDataSource: function () {\n var that = this;\n var dataSource = that.dataSource;\n if (dataSource) {\n dataSource.unbind(CHANGE, that._dataChangeHandler);\n }\n },\n _wrapper: function () {\n var that = this, element = that.element, wrapper = element.parent('div.k-listbox');\n if (!wrapper[0]) {\n wrapper = element.wrap('
    ').parent();\n wrapper[0].style.cssText = element[0].style.cssText;\n wrapper[0].title = element[0].title;\n $('
    ').insertBefore(element);\n }\n that.wrapper = wrapper.addClass(element[0].className).css('display', '');\n that._innerWrapper = $(wrapper[0].firstChild);\n },\n _list: function () {\n var that = this;\n $('
      ').appendTo(that._innerWrapper);\n if (that.options.navigatable) {\n that._getList().attr(TABINDEX, that._getTabIndex());\n }\n },\n _templates: function () {\n var that = this;\n var options = this.options;\n var template;\n if (options.template && typeof options.template == 'string') {\n template = kendo.template(options.template);\n } else if (!options.template) {\n template = kendo.template('${' + kendo.expr(options.dataTextField, 'data') + '}', { useWithBlock: false });\n } else {\n template = options.template;\n }\n that.templates = {\n itemTemplate: kendo.template('# var item = data.item, r = data.r; #
    • #=r(item)#
    • ', { useWithBlock: false }),\n itemContent: template,\n toolbar: '
      '\n };\n },\n refresh: function () {\n var that = this;\n var view = that.dataSource.view();\n var template = that.templates.itemTemplate;\n var html = '';\n for (var idx = 0; idx < view.length; idx++) {\n html += template({\n item: view[idx],\n r: that.templates.itemContent\n });\n }\n that._getList().html(html);\n that._setItemIds();\n that._createToolbar();\n that._syncElement();\n that._updateToolbar();\n that._updateAllToolbars();\n that.trigger(DATABOUND);\n },\n _syncElement: function () {\n var options = '';\n var view = this.dataSource.view();\n for (var idx = 0; idx < view.length; idx++) {\n options += this._option(view[idx][this.options.dataValueField] || view[idx], view[idx][this.options.dataTextField] || view[idx], true);\n }\n this.element.html(options);\n },\n _option: function (dataValue, dataText) {\n var option = ' 0) {\n var toolbarElement = $(that.templates.toolbar)[toolbarInsertion](that._innerWrapper);\n that.toolbar = new ToolBar(toolbarElement, extend({}, toolbarOptions, {\n listBox: that,\n messages: messages\n }));\n that.wrapper.addClass(TOOLBAR_CLASS + DASH + position);\n }\n },\n _destroyToolbar: function () {\n var that = this;\n if (that.toolbar) {\n that.toolbar.destroy();\n that.toolbar = null;\n }\n },\n _executeCommand: function (commandName) {\n var that = this;\n var command = CommandFactory.current.create(commandName, { listBox: that });\n if (command) {\n command.execute();\n that._updateToolbar();\n that._updateAllToolbars();\n }\n },\n _updateToolbar: function () {\n var toolbar = this.toolbar;\n if (toolbar) {\n toolbar._updateToolStates();\n }\n },\n _updateAllToolbars: function () {\n var listBoxElements = $('select[data-role=\\'listbox\\']');\n var elementsLength = listBoxElements.length;\n var listBox;\n var i;\n for (i = 0; i < elementsLength; i++) {\n listBox = $(listBoxElements[i]).data(KENDO_LISTBOX);\n if (listBox) {\n listBox._updateToolbar();\n }\n }\n }\n });\n kendo.ui.plugin(ListBox);\n var CommandFactory = Class.extend({\n init: function () {\n this._commands = [];\n },\n register: function (commandName, commandType) {\n this._commands.push({\n commandName: commandName,\n commandType: commandType\n });\n },\n create: function (commandName, options) {\n var commands = this._commands;\n var itemsLength = commands.length;\n var name = commandName ? commandName.toLowerCase() : '';\n var match;\n var command;\n var i;\n for (i = 0; i < itemsLength; i++) {\n command = commands[i];\n if (command.commandName.toLowerCase() === name) {\n match = command;\n break;\n }\n }\n if (match) {\n return new match.commandType(options);\n }\n }\n });\n CommandFactory.current = new CommandFactory();\n var ListBoxCommand = Class.extend({\n init: function (options) {\n var that = this;\n that.options = extend({}, that.options, options);\n that.listBox = that.options.listBox;\n },\n options: { listBox: null },\n getItems: function () {\n return $(this.listBox.select());\n },\n execute: noop,\n canExecute: noop\n });\n var RemoveItemsCommand = ListBoxCommand.extend({\n execute: function () {\n var that = this;\n var listBox = that.listBox;\n var items = that.getItems();\n if (!listBox.trigger(REMOVE, {\n dataItems: listBox._dataItems(items),\n items: items\n })) {\n listBox.remove(items);\n }\n },\n canExecute: function () {\n return this.listBox.select().length > 0;\n }\n });\n CommandFactory.current.register(REMOVE, RemoveItemsCommand);\n var MoveItemsCommand = ListBoxCommand.extend({\n execute: function () {\n var that = this;\n if (that.canExecute()) {\n that.moveItems();\n }\n },\n canExecute: noop,\n moveItems: function () {\n var that = this;\n var listBox = that.listBox;\n var options = that.options;\n var items = that.getItems();\n var offset = options.offset;\n var indecesInDom = getSortedDomIndices(items);\n var movedItems = $.makeArray(items.sort(that.itemComparer));\n var moveAction = options.moveAction;\n var movedItem;\n if (!listBox.trigger(REORDER, {\n dataItems: listBox._dataItems(movedItems),\n items: $(movedItems),\n offset: offset\n })) {\n while (movedItems.length > 0 && indecesInDom.length > 0) {\n movedItem = movedItems[moveAction]();\n listBox.reorder(movedItem, indecesInDom[moveAction]() + offset);\n }\n }\n },\n options: {\n offset: 0,\n moveAction: 'pop'\n },\n itemComparer: function (item1, item2) {\n var indexItem1 = $(item1).index();\n var indexItem2 = $(item2).index();\n if (indexItem1 === indexItem2) {\n return 0;\n } else {\n return indexItem1 > indexItem2 ? 1 : -1;\n }\n }\n });\n var MoveUpItemsCommand = MoveItemsCommand.extend({\n options: {\n offset: MOVE_UP_OFFSET,\n moveAction: 'shift'\n },\n canExecute: function () {\n var items = this.getItems();\n var domIndices = getSortedDomIndices(items);\n return domIndices.length > 0 && domIndices[0] > 0;\n }\n });\n CommandFactory.current.register(MOVE_UP, MoveUpItemsCommand);\n var MoveDownItemsCommand = MoveItemsCommand.extend({\n options: {\n offset: MOVE_DOWN_OFFSET,\n moveAction: 'pop'\n },\n canExecute: function () {\n var that = this;\n var items = that.getItems();\n var domIndices = getSortedDomIndices(items);\n return domIndices.length > 0 && $(domIndices).last()[0] < that.listBox.items().length - 1;\n }\n });\n CommandFactory.current.register(MOVE_DOWN, MoveDownItemsCommand);\n var TransferItemsCommand = ListBoxCommand.extend({\n options: { filter: ENABLED_ITEM_SELECTOR },\n execute: function () {\n var that = this;\n var sourceListBox = that.getSourceListBox();\n var items = that.getItems().filter(that.options.filter);\n var dataItems = sourceListBox ? sourceListBox._dataItems(items) : [];\n var destinationListBox = that.getDestinationListBox();\n var updatedSelection = that.getUpdatedSelection(items);\n if (destinationListBox && items.length > 0) {\n if (!destinationListBox.trigger(ADD, {\n dataItems: dataItems,\n items: items\n })) {\n destinationListBox.add(dataItems);\n }\n if (!sourceListBox.trigger(REMOVE, {\n dataItems: dataItems,\n items: items\n })) {\n sourceListBox.remove(items);\n that.updateSelection(updatedSelection);\n }\n }\n },\n getUpdatedSelection: function (items) {\n if (items.length !== 1) {\n return null;\n }\n var that = this;\n var itemFilter = that.options.filter;\n var sourceListBox = that.getSourceListBox();\n var lastEnabledItem = sourceListBox ? sourceListBox.items().filter(itemFilter).last() : null;\n var containsLastItem = $(items).filter(lastEnabledItem).length > 0;\n var itemToSelect = containsLastItem ? $(items).prevAll(itemFilter)[0] : $(items).nextAll(itemFilter)[0];\n if (itemToSelect) {\n return itemToSelect;\n } else {\n return null;\n }\n },\n updateSelection: function (item) {\n var sourceListBox = this.getSourceListBox();\n if (sourceListBox && item) {\n $(sourceListBox.select($(item)));\n sourceListBox._scrollIntoView(item);\n }\n },\n getSourceListBox: noop,\n getDestinationListBox: noop\n });\n var TransferItemsToCommand = TransferItemsCommand.extend({\n canExecute: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? sourceListBox.select().length > 0 : false;\n },\n getSourceListBox: function () {\n return this.listBox;\n },\n getDestinationListBox: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox && sourceListBox.options.connectWith ? $(HASH + sourceListBox.options.connectWith).data(KENDO_LISTBOX) : null;\n },\n getItems: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? $(sourceListBox.select()) : $();\n }\n });\n CommandFactory.current.register(TRANSFER_TO, TransferItemsToCommand);\n var TransferItemsFromCommand = TransferItemsCommand.extend({\n canExecute: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? sourceListBox.select().length > 0 : false;\n },\n getSourceListBox: function () {\n var destinationListBox = this.getDestinationListBox();\n return destinationListBox && destinationListBox.options.connectWith ? $(HASH + destinationListBox.options.connectWith).data(KENDO_LISTBOX) : null;\n },\n getDestinationListBox: function () {\n return this.listBox;\n },\n getItems: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? $(sourceListBox.select()) : $();\n }\n });\n CommandFactory.current.register(TRANSFER_FROM, TransferItemsFromCommand);\n var TransferAllItemsToCommand = TransferItemsToCommand.extend({\n canExecute: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? sourceListBox.wrapper.find(ENABLED_ITEMS_SELECTOR).length > 0 : false;\n },\n getItems: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? sourceListBox.items() : $();\n },\n getUpdatedSelection: noop,\n updateSelection: noop\n });\n CommandFactory.current.register(TRANSFER_ALL_TO, TransferAllItemsToCommand);\n var TransferAllItemsFromCommand = TransferItemsFromCommand.extend({\n canExecute: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? sourceListBox.wrapper.find(ENABLED_ITEMS_SELECTOR).length > 0 : false;\n },\n getItems: function () {\n var sourceListBox = this.getSourceListBox();\n return sourceListBox ? sourceListBox.items() : $();\n },\n getUpdatedSelection: noop,\n updateSelection: noop\n });\n CommandFactory.current.register(TRANSFER_ALL_FROM, TransferAllItemsFromCommand);\n var ToolBar = Class.extend({\n init: function (element, options) {\n var that = this;\n that.element = $(element).addClass(TOOLBAR_CLASS);\n that.options = extend({}, that.options, options);\n that.listBox = that.options.listBox;\n that._initTemplates();\n that._createTools();\n that._updateToolStates();\n that._attachEventHandlers();\n },\n destroy: function () {\n var that = this;\n that._detachEventHandlers();\n kendo.destroy(that.element);\n that.element.remove();\n that.element = null;\n },\n options: {\n position: RIGHT,\n tools: []\n },\n _initTemplates: function () {\n this.templates = { tool: kendoTemplate('
    • ' + '' + '' + '' + '
    • ') };\n },\n _createTools: function () {\n var that = this;\n var tools = that.options.tools;\n var toolsLength = tools.length;\n var toolsMessages = that.options.messages.tools;\n var toolList = that._createToolList();\n var tool;\n var i;\n for (i = 0; i < toolsLength; i++) {\n tool = extend({}, ToolBar.defaultTools[tools[i]], { text: toolsMessages[tools[i]] });\n if (tool) {\n toolList.append($(that.templates.tool(tool)));\n }\n }\n that.element.append(toolList);\n },\n _createToolList: function () {\n return $('