{"version":3,"sources":["kendo.filemanager.js"],"names":["f","define","$","undefined","kendo","window","extend","Class","Command","init","options","this","filemanager","CreateFolderCommand","fn","call","exec","that","dataSource","_viewDataSource","add","RenameCommand","target","viewItem","_view","widgetComponent","dataItem","edit","_renameTreeViewItem","uid","data","item","treeView","getByUid","realItem","get","id","_prompt","type","defaultInput","name","done","newName","set","DeleteCommand","itemsToRemove","items","getSelected","is","length","_confirm","removeItems","i","Array","isArray","remove","CopyCommand","targetDataSource","children","toJSON","fileManagerNewItem","MoveCommand","cloning","SortCommand","sortOptions","defaultSortOption","dir","field","sort","folderSortOption","SearchCommand","filter","operator","value","ChangeViewCommand","view","resize","OpenDialogCommand","dialog","open","console","warn","format","TogglePaneCommand","pane","resizable","getResizable","toggle","wrapper","find","handle","_resizeDraggable","ui","FileManagerCommand","commands","jQuery","amd","a1","a2","a3","ListView","TreeView","Grid","Observable","proxy","keys","NAVIGATE","SELECT","EXPAND","CHANGE","OPEN","LOAD","KEYDOWN","KEYDOWNACTION","NS","fileManagerDraggables","fileManagerDragOrigin","registerViewComponent","componentName","component","ViewComponents","getViewComponent","Component","widget","element","Error","_bindEvents","bind","_binding","_bound","ev","trigger","preventDefault","_setDSOptions","dataSourceOptions","_initDragAndDrop","dropFilter","draggable","kendoDraggable","hint","_hint","cursorOffset","top","left","holdToDrag","ignore","hold","_hold","userEvents","minHold","droptarget","kendoDropTargetArea","drop","_onDrop","dragenter","dropTarget","addClass","dragleave","removeClass","currentTarget","selectable","clear","select","cancel","selectedItems","messages","isDirectory","targetId","itemIds","push","refresh","setDataSource","destroy","ViewComponent","explicitOptions","defaultOptions","kendoKeydown","_kendoKeydown","listView","isLocalBinding","layout","flex","direction","wrap","support","mobileOS","template","editTemplate","navigatable","_select","on","_dblClick","_mousedown","_keydown","_keydownAction","sender","_closeEditable","dataItems","entries","keyCode","ESC","node","closest","which","current","ENTER","preventKendoKeydown","_triggerOpen","entry","addFolder","selected","off","dataTextField","_refreshDataSource","existingItem","action","parentNode","map","guid","hasChildren","findByUid","_progress","each","index","append","_shouldFocus","focus","_remove","_nextVisible","_navigate","_expand","entryId","path","noop","selectedItem","reload","read","_setupColumns","grid","editable","mode","confirmation","sortable","columns","title","nameField","icon","getFileGroup","extension","dateCreatedField","sizeField","size","getFileSizeMessage","table","_toggleFocusable","saveRow","setTimeout","_tryCancel","cancelChanges","container","_editContainer","val","state","addBack","toggleClass","model","dirty","_destroyEditable","_displayRow","addRow","editRow","FileManagerDetailsToggle","ToolBar","Item","toolbar","CLICK","TOGGLE","CLOSE","ACTION","FileManagerToolBar","_extendOptions","_attachEvents","events","concat","defaultTools","createFolder","text","command","rules","upload","sortDirection","buttons","togglable","group","sortField","menuButtons","changeView","spacer","details","overflow","search","_click","_change","tools","Object","_extendToolsOptions","tool","toolOptions","toolRules","isBuiltInTool","isPlainObject","JSON","parse","deepExtend","attributes","aria-label","data-command","data-options","_mapButtonGroups","_mapMenuButtons","remote","hidden","button","initialView","isToolEnabled","toolName","found","args","fileManagerSearch","SearchTool","input","iconWrapper","renderIcon","addUidAttr","addIdAttr","addOverflowAttr","attr","placeholder","_inputHandler","_input","registerComponent","label","switchElement","switchInstance","Switch","change","checked","detailsChecked","unchecked","detailsUnchecked","fileManagerDetailsToggle","parent","FileEntry","FileManagerDataSource","Node","HierarchicalDataSource","DataSource","schemas","fields","defaultValue","hasDirectories","created","createdUtc","modified","modifiedUtc","isDirectoryObject","getter","isFunction","_initChildren","transport","parameterMap","_childrenOptions","e","collection","_updateChildrenField","isNew","_defaultId","fileEntry","serverFiltering","_hierarchicalFilter","schema","modelBase","LocalTransport","_attachBubbleHandlers","insert","result","_hasDirectories","create","_dataSource","ContextMenu","FileManagerContextMenu","_overrideTemplates","_extendItems","_onSelect","templates","sprite","defaultItems","rename","spriteCssClass","delete","key","_extendItem","DataBoundWidget","outerHeight","_outerHeight","ERROR","UPLOAD","SUCCESS","HIDE","DATABINDING","DATABOUND","DROP","EXECUTE","TREE_TYPE","DOT","fileManagerStyles","header","navigation","contentContainer","content","preview","treeview","breadcrumb","list","uploadDialog","splitBar","splitBarHorizontal","splitBarHover","splitBarIcon","splitBarNavigation","splitBarPreview","fileManagerTemplateStyles","filePreview","fileInfo","fileName","fileMeta","metaLabel","metaValue","viewTypes","NO_FILE_PREVIEW_TEMPLATE","SINGLE_FILES_PREVIEW_TEMPLATE","MULTIPLE_FILES_PREVIEW_TEMPLATE","FileManager","_wrapper","_renderHeader","_renderContentContainer","_initContextMenu","_renderNavigation","_renderContent","_renderPreview","_initUploadDialog","_resizable","notify","height","contextMenu","uploadUrl","views","dialogs","width","moveConfirm","closable","deleteConfirm","renamePrompt","previewPane","metaFields","noFileTemplate","singleFileTemplate","multipleFilesTemplate","sortDirectionAsc","sortDirectionDesc","typeField","dateModifiedField","gridView","okText","close","noFileSelected","typeSortOrder","nameSortOrder","autoSync","_errorHandler","unbind","_changeHandler","_error","xhr","status","statusText","_resizeHandler","onResize","_initToolbar","menuOptions","executeCommand","_cacheFocus","_initTreeView","_initBreadcrumb","_initView","_initUpload","hide","enablePreview","previewContainer","_setPreviewPaneContent","previewTemplate","previewPaneMessages","previewPaneOptions","selection","styles","html","toolbarElement","toolbarOptions","treeViewElement","_load","_drop","indexOf","fail","DELETE","F2","_viewType","confirm","kendoConfirm","_restoreFocus","prompt","kendoPrompt","activeElement","document","popup","visible","hasClass","_focusElement","viewWrapper","breadcrumbElement","breadcrumbOptions","_breadcrumbChange","Breadcrumb","uploadInstance","dialogMessages","dialogElement","dialogOptions","modal","actions","_clearUploadFilesList","primary","_shouldInitUpload","Dialog","_toggleUploadDropZone","shouldInit","async","saveUrl","uploadElement","uploadOptions","autoUpload","dropZone","Upload","_sendUploadPathParameter","_success","clearAllFiles","zone","setOptions","source","_createResizableSplitBar","cssClass","hover","_initResizableNavigation","contentWrapperWidth","navigationWrapperWidth","contentWrapper","navigationWrapper","insertAfter","end","kendoResizable","start","delta","x","initialDelta","isRtl","getKendoResizable","_initResizablePreview","previewWrapperWidth","previewWrapper","insertBefore","empty","_open","el","join","commandName","commandOptions","navigate","load","sync","_navigateToParent","loaded","parentNodePath","_buildBreadcrumbPath","values","reverse","_adjustDimensions","gridSelector","listViewSelector","totalHeight","toolbarHeight","breadcrumbHeight","_resize","getSize","dimensions","_path","replace","unbindResize","plugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,wBAAyB,cAAeD,IACjD,WA8LE,MA7LC,UAAUE,EAAGC,GAAb,GACOC,GAAQC,OAAOD,MAAOE,EAASJ,EAAEI,OAAQC,EAAQH,EAAMG,MACvDC,EAAUD,EAAMD,QAChBG,KAAM,SAAUC,GACZC,KAAKD,QAAUA,EACfC,KAAKC,YAAcF,EAAQE,eAG/BC,EAAsBL,EAAQF,QAC9BG,KAAM,SAAUC,GACZF,EAAQM,GAAGL,KAAKM,KAAKJ,KAAMD,IAE/BM,KAAM,WACF,GAAIC,GAAON,KAAMC,EAAcK,EAAKL,YAAaM,EAAaN,EAAYO,iBAAmBP,EAAYM,UACzGA,GAAWE,SAGfC,EAAgBb,EAAQF,QACxBG,KAAM,SAAUC,GACZF,EAAQM,GAAGL,KAAKM,KAAKJ,KAAMD,IAE/BM,KAAM,WACF,GAAIC,GAAON,KAAMW,EAASL,EAAKP,QAAQY,OAAQC,EAAWN,EAAKL,YAAYY,MAAMC,gBAAgBC,SAASJ,EACtGA,IAAUC,EACVN,EAAKL,YAAYY,MAAMG,KAAKL,GAE5BL,EAAKW,oBAAoBN,IAGjCM,oBAAqB,SAAUN,GAC3B,GAAIL,GAAON,KAAMkB,EAAMP,EAAOQ,KAAK,OAAQC,EAAOd,EAAKL,YAAYoB,SAASP,gBAAgBP,WAAWe,SAASJ,GAAMK,EAAWjB,EAAKL,YAAYM,WAAWiB,IAAIJ,EAAKK,GACtKnB,GAAKL,YAAYyB,SACbC,KAAM,SACNC,aAAcL,EAASM,KACvBlB,OAAQA,IACTmB,KAAK,SAAUC,GACdR,EAASS,IAAI,OAA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n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('filemanager/commands', ['kendo.core'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, Class = kendo.Class;\n var Command = Class.extend({\n init: function (options) {\n this.options = options;\n this.filemanager = options.filemanager;\n }\n });\n var CreateFolderCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, filemanager = that.filemanager, dataSource = filemanager._viewDataSource || filemanager.dataSource;\n dataSource.add();\n }\n });\n var RenameCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, target = that.options.target, viewItem = that.filemanager._view.widgetComponent.dataItem(target);\n if (target && viewItem) {\n that.filemanager._view.edit(target);\n } else {\n that._renameTreeViewItem(target);\n }\n },\n _renameTreeViewItem: function (target) {\n var that = this, uid = target.data('uid'), item = that.filemanager.treeView.widgetComponent.dataSource.getByUid(uid), realItem = that.filemanager.dataSource.get(item.id);\n that.filemanager._prompt({\n type: 'rename',\n defaultInput: realItem.name,\n target: target\n }).done(function (newName) {\n realItem.set('name', newName);\n });\n }\n });\n var DeleteCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, target = that.options.target, filemanager = that.filemanager, items = filemanager.getSelected(), viewItem = that.filemanager._view.widgetComponent.dataItem(target), itemsToRemove;\n if (target && target.is('.k-state-selected') && items && items.length) {\n itemsToRemove = items;\n } else if (target && viewItem) {\n itemsToRemove = viewItem;\n } else if (target) {\n var uid = target.data('uid');\n var item = that.filemanager.treeView.widgetComponent.dataSource.getByUid(uid);\n var realItem = that.filemanager.dataSource.get(item.id);\n itemsToRemove = realItem;\n }\n filemanager._confirm({\n type: 'delete',\n target: target\n }).done(function () {\n that.removeItems(itemsToRemove);\n });\n },\n removeItems: function (items) {\n var itemsToRemove = Array.isArray(items) ? items : [items];\n for (var i = 0; i < itemsToRemove.length; i++) {\n this.filemanager.dataSource.remove(itemsToRemove[i]);\n }\n }\n });\n var CopyCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, filemanager = that.filemanager, dataSource = filemanager.dataSource, items = that.options.items, target = dataSource.get(that.options.target), targetDataSource = target.children;\n for (var i = 0; i < items.length; i++) {\n var item = dataSource.get(items[i]).toJSON();\n item.fileManagerNewItem = true;\n targetDataSource.add(item);\n }\n }\n });\n var MoveCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, filemanager = that.filemanager, dataSource = filemanager.dataSource, items = that.options.items, target = dataSource.get(that.options.target), targetDataSource = target.children;\n for (var i = 0; i < items.length; i++) {\n var item = dataSource.get(items[i]);\n var cloning = item.toJSON();\n cloning.fileManagerNewItem = true;\n targetDataSource.add(cloning);\n dataSource.remove(item);\n }\n }\n });\n var SortCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, options = that.options, filemanager = that.filemanager, sortOptions = filemanager.defaultSortOption;\n extend(sortOptions, {\n dir: options.dir,\n field: options.field\n });\n filemanager._view.widgetComponent.dataSource.sort([\n filemanager.folderSortOption,\n sortOptions\n ]);\n }\n });\n var SearchCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, options = that.options, filemanager = that.filemanager, filter = {\n field: options.field,\n operator: options.operator,\n value: options.value\n };\n filemanager._view.widgetComponent.dataSource.filter(filter);\n }\n });\n var ChangeViewCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, options = that.options, filemanager = that.filemanager;\n filemanager.view(options.value);\n filemanager.resize(true);\n }\n });\n var OpenDialogCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, filemanager = that.filemanager, dialog = filemanager[that.options.type];\n if (dialog) {\n dialog.open();\n } else {\n window.console.warn(kendo.format('The {0} dialog is not available!', that.options.type));\n }\n }\n });\n var TogglePaneCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this, filemanager = that.filemanager, pane = filemanager[that.options.type], resizable = that.getResizable();\n if (pane) {\n pane.toggle();\n if (resizable) {\n filemanager.wrapper.find(resizable.options.handle).toggle();\n }\n }\n },\n getResizable: function () {\n var that = this, filemanager = that.filemanager, type = that.options.type;\n if (!filemanager._resizeDraggable) {\n return;\n }\n return filemanager._resizeDraggable[type];\n }\n });\n extend(kendo.ui, {\n filemanager: {\n FileManagerCommand: Command,\n commands: {\n CreateFolderCommand: CreateFolderCommand,\n RenameCommand: RenameCommand,\n DeleteCommand: DeleteCommand,\n MoveCommand: MoveCommand,\n CopyCommand: CopyCommand,\n SortCommand: SortCommand,\n SearchCommand: SearchCommand,\n ChangeViewCommand: ChangeViewCommand,\n OpenDialogCommand: OpenDialogCommand,\n TogglePaneCommand: TogglePaneCommand\n }\n }\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('filemanager/view', [\n 'kendo.listview',\n 'kendo.treeview'\n ], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, ui = kendo.ui, Observable = kendo.Observable, extend = $.extend, proxy = $.proxy, keys = kendo.keys, NAVIGATE = 'navigate', SELECT = 'select', EXPAND = 'expand', CHANGE = 'change', OPEN = 'open', LOAD = 'load', KEYDOWN = 'keydown', KEYDOWNACTION = 'keydownAction', NS = '.kendoFileManagerViewComponent', fileManagerDraggables = [], fileManagerDragOrigin = null;\n var registerViewComponent = function (componentName, component) {\n ui.filemanager.ViewComponents[componentName] = component;\n };\n var getViewComponent = function (componentName) {\n return ui.filemanager.ViewComponents[componentName] || null;\n };\n var Component = Observable.extend({\n init: function (widget, element, options) {\n var that = this;\n that.element = element;\n that.options = options;\n if (widget) {\n that.widgetComponent = new widget(element, options);\n } else {\n throw new Error('The widget for the ViewComponent is not available! Please add the corresponding scripts!');\n }\n Observable.fn.init.call(that);\n },\n _bindEvents: function () {\n this.widgetComponent.bind('dataBinding', proxy(this._binding, this));\n this.widgetComponent.bind('dataBound', proxy(this._bound, this));\n },\n _binding: function (ev) {\n if (this.trigger('dataBinding', ev)) {\n ev.preventDefault();\n }\n },\n _bound: function () {\n this.trigger('dataBound');\n },\n _setDSOptions: function (options, dataSourceOptions) {\n if (!options.dataSource && dataSourceOptions) {\n options.dataSource = dataSourceOptions;\n }\n },\n _initDragAndDrop: function (element, filter) {\n var that = this;\n filter = filter || that.options.dropFilter;\n element = element || that.element;\n that.draggable = element.kendoDraggable({\n filter: filter,\n hint: proxy(that._hint, that),\n cursorOffset: {\n top: -10,\n left: -50\n },\n holdToDrag: true,\n ignore: 'input, .k-focusable',\n hold: proxy(that._hold, that)\n }).data('kendoDraggable');\n that.draggable.userEvents.minHold = 150;\n that.droptarget = element.kendoDropTargetArea({\n filter: filter,\n drop: proxy(that._onDrop, that),\n dragenter: function (ev) {\n ev.dropTarget.addClass('k-filemanager-drop-target');\n },\n dragleave: function (ev) {\n ev.dropTarget.removeClass('k-filemanager-drop-target');\n }\n }).data('kendoDraggable');\n },\n _hold: function (ev) {\n var that = this, target = ev.currentTarget;\n if (!target.is('.k-state-selected')) {\n if (that.widgetComponent.selectable) {\n that.widgetComponent.selectable.clear();\n }\n that.widgetComponent.select(target);\n }\n if (that.widgetComponent.selectable) {\n that.widgetComponent.selectable.userEvents.cancel();\n }\n },\n _hint: function (target) {\n var that = this, item = that.widgetComponent.dataItem(target), selectedItems = that.widgetComponent.select();\n fileManagerDragOrigin = that.widgetComponent;\n fileManagerDraggables = selectedItems;\n if (selectedItems.length > 1) {\n return kendo.format('
{1} {2}
', 'file', selectedItems.length, that.options.messages.items);\n }\n return kendo.format('
{1}
', item.isDirectory ? 'folder' : 'file', item.name);\n },\n _onDrop: function (ev) {\n var that = this, target = that.widgetComponent.dataItem(ev.dropTarget), targetId = target.id, itemIds = [];\n if (!target.isDirectory) {\n return;\n }\n for (var i = 0; i < fileManagerDraggables.length; i++) {\n var id = fileManagerDragOrigin.dataItem(fileManagerDraggables[i]).id;\n itemIds.push(id);\n }\n this.trigger('drop', {\n target: targetId,\n items: itemIds\n });\n },\n getSelected: function () {\n throw new Error('Not Implemented!');\n },\n refresh: function (dataSource) {\n this.widgetComponent.setDataSource(dataSource);\n },\n destroy: function () {\n kendo.destroy(this.element);\n }\n });\n extend(kendo.ui.filemanager, {\n ViewComponent: Component,\n ViewComponents: {},\n registerViewComponent: registerViewComponent,\n getViewComponent: getViewComponent\n });\n var ListView = Component.extend({\n init: function (element, options, explicitOptions) {\n var that = this, dataSourceOptions = explicitOptions.dataSource, messages = explicitOptions.messages;\n options = extend({}, that.defaultOptions, options, { messages: messages });\n that._setDSOptions(options, dataSourceOptions);\n options.kendoKeydown = options.kendoKeydown || proxy(that._kendoKeydown, that);\n Component.fn.init.call(this, ui.ListView, element, options);\n that.listView = that.widgetComponent;\n that._bindEvents();\n if (explicitOptions.draggable !== false && !dataSourceOptions.isLocalBinding) {\n that._initDragAndDrop();\n }\n },\n defaultOptions: {\n layout: 'flex',\n flex: {\n direction: 'row',\n wrap: 'wrap'\n },\n selectable: kendo.support.mobileOS ? 'row' : 'multiple',\n template: '
' + '
' + '
#:name##:extension#
' + '
',\n editTemplate: '
' + '
' + '
' + '
',\n dropFilter: '.k-listview-item',\n navigatable: true\n },\n _bindEvents: function () {\n var that = this, listView = that.listView;\n listView.bind(CHANGE, proxy(that._select, that));\n listView.element.on('dblclick' + NS, proxy(that._dblClick, that));\n listView.element.on('mousedown' + NS, '.k-listview-item:not(.k-edit-item)', proxy(that._mousedown, that));\n listView.element.on(KEYDOWN + NS, '.k-edit-item', proxy(that._keydown, that));\n listView.element.on(KEYDOWN + NS, proxy(that._keydownAction, that));\n listView.bind('edit', function (ev) {\n var sender = ev.sender;\n ev.item.find('input').on('blur', function () {\n sender._closeEditable();\n });\n });\n Component.fn._bindEvents.call(this);\n },\n _select: function () {\n var that = this, dataItems = that.getSelected();\n that.trigger(SELECT, { entries: dataItems });\n },\n _keydown: function (ev) {\n var that = this;\n if (ev.keyCode === kendo.keys.ESC) {\n that.listView._closeEditable();\n }\n },\n _keydownAction: function (ev) {\n var that = this, target = $(ev.target).find('.k-state-focused');\n if (target.length && !target.is('.k-edit-item')) {\n that.trigger(KEYDOWNACTION, {\n target: target,\n keyCode: ev.keyCode\n });\n }\n },\n _mousedown: function (ev) {\n var that = this, node = $(ev.target).closest('.k-listview-item');\n if (ev.which === 3 && !node.is('.k-state-selected')) {\n that.listView.selectable.clear();\n that.listView.select(node);\n }\n },\n _kendoKeydown: function (ev) {\n var that = this, node = that.listView.current();\n if (ev.keyCode === keys.ENTER && !ev.preventKendoKeydown) {\n that._triggerOpen(node);\n ev.preventKendoKeydown = true;\n }\n },\n _dblClick: function (ev) {\n var that = this, node = $(ev.target).closest('.k-listview-item');\n that._triggerOpen(node);\n },\n _triggerOpen: function (node) {\n var that = this;\n if (node.is('.k-edit-item')) {\n return;\n }\n var item = that.listView.dataItem(node);\n if (item) {\n that.trigger(OPEN, { entry: item });\n }\n },\n addFolder: function () {\n this.listView.add();\n },\n edit: function (target) {\n var that = this, selected = that.listView.select();\n that.listView.edit(target || selected);\n },\n getSelected: function () {\n var that = this, items = that.listView.select(), dataItems = [];\n for (var i = 0; i < items.length; i++) {\n var item = that.listView.dataItem(items[i]);\n if (item) {\n dataItems.push(item);\n }\n }\n return dataItems;\n },\n destroy: function () {\n this.listView.element.off(NS);\n Component.fn.destroy.call(this);\n }\n });\n ui.filemanager.registerViewComponent('list', ListView);\n var TreeView = Component.extend({\n init: function (element, options, explicitOptions) {\n var that = this, messages = explicitOptions.messages;\n options = extend({}, that.defaultOptions, options, { messages: messages });\n Component.fn.init.call(this, ui.TreeView, element, options);\n that.treeView = that.widgetComponent;\n that._bindEvents();\n if (explicitOptions.draggable !== false && !explicitOptions.isLocalBinding) {\n that._initDragAndDrop();\n }\n },\n defaultOptions: {\n dataTextField: 'name',\n dropFilter: '.k-item'\n },\n _refreshDataSource: function (ev) {\n var that = this, treeView = that.treeView, action = ev.action, node = ev.node, parentNode = null, items = ev.items.filter(function (item) {\n return item.isDirectory;\n }).map(function (item) {\n return extend({}, item.toJSON(), {\n id: item.id || kendo.guid(),\n hasChildren: item.hasChildren,\n items: []\n });\n });\n if (node) {\n parentNode = treeView.findByUid(treeView.dataSource.get(node.id).uid);\n treeView._progress(parentNode, false);\n }\n if (!items.length) {\n return;\n }\n if (action == 'itemloaded' || parentNode && action === 'sync') {\n parentNode.find('.k-item').each(function (index, item) {\n treeView.remove(item);\n });\n treeView.append(items, parentNode);\n if (that._shouldFocus) {\n treeView.current(parentNode);\n treeView.focus();\n }\n } else if (action == 'remove') {\n this._remove(items[0].id);\n } else if (action == 'itemchange') {\n var existingItem = treeView.dataSource.get(items[0].id);\n if (existingItem) {\n existingItem.set(ev.field, items[0][ev.field]);\n } else {\n treeView.append(items[0], parentNode);\n }\n } else if (!treeView.dataSource.data().length) {\n treeView.append(items);\n } else if (action === 'sync' || action === undefined && !parentNode) {\n treeView.items().each(function (index, item) {\n treeView.remove(item);\n });\n treeView.append(items);\n if (that._shouldFocus) {\n treeView.current(treeView._nextVisible($()));\n treeView.focus();\n }\n }\n },\n _remove: function (id) {\n var that = this, treeView = that.treeView, dataSource = treeView.dataSource, item = dataSource.get(id), node;\n if (item) {\n node = treeView.findByUid(item.uid);\n treeView.remove(node);\n }\n },\n _bindEvents: function () {\n var that = this;\n that.treeView.bind(SELECT, proxy(that._navigate, that));\n that.treeView.bind(EXPAND, proxy(that._expand, that));\n that.treeView.element.bind(KEYDOWN, proxy(that._keydownAction, that));\n },\n _keydownAction: function (ev) {\n var that = this, target = $(ev.target).find('.k-state-focused').closest('.k-item');\n that.trigger(KEYDOWNACTION, {\n target: target,\n keyCode: ev.keyCode\n });\n },\n _expand: function (ev) {\n var that = this, treeView = that.treeView, entry = treeView.dataItem(ev.node);\n ev.preventDefault();\n that.trigger(LOAD, { entryId: entry.id });\n },\n _navigate: function (ev) {\n var that = this, node = ev.node, entry = that.treeView.dataItem(node), path = entry.id;\n ev.preventDefault();\n that.trigger(NAVIGATE, {\n path: path,\n entry: entry.toJSON()\n });\n },\n _hold: $.noop,\n getSelected: function () {\n var that = this, selectedItem = that.treeView.element.find('.k-state-selected').closest('.k-item'), item = that.treeView.dataItem(selectedItem);\n return item;\n },\n refresh: function (id) {\n var that = this, treeView = that.treeView, entry = treeView.dataSource.get(id), node = entry && treeView.findByUid(entry.uid);\n if (entry && node) {\n treeView.element.find('.k-state-selected').removeClass('k-state-selected');\n node.find('> div .k-in').removeClass('k-state-hover').addClass('k-state-selected');\n }\n },\n reload: function () {\n this.treeView.dataSource.read();\n }\n });\n ui.filemanager.registerViewComponent('tree', TreeView);\n if (kendo.ui.Grid) {\n var Grid = Component.extend({\n init: function (element, options, explicitOptions) {\n var that = this, dataSourceOptions = explicitOptions.dataSource, messages = explicitOptions.messages;\n options = extend({}, that.defaultOptions, options, { messages: messages });\n that._setDSOptions(options, dataSourceOptions);\n that._setupColumns(options, messages);\n options.kendoKeydown = options.kendoKeydown || proxy(that._kendoKeydown, that);\n Component.fn.init.call(this, ui.Grid, element, options);\n that.grid = that.widgetComponent;\n that._bindEvents();\n if (explicitOptions.draggable !== false && !dataSourceOptions.isLocalBinding) {\n that._initDragAndDrop();\n }\n },\n defaultOptions: {\n selectable: kendo.support.mobileOS ? 'row' : 'multiple',\n editable: {\n mode: 'inline',\n confirmation: false\n },\n sortable: true,\n dropFilter: 'tr:not(.k-grid-edit-row)',\n navigatable: true\n },\n _setupColumns: function (options, messages) {\n if (!options.columns) {\n options.columns = [\n {\n field: 'name',\n title: messages.nameField || 'Name',\n template: function (item) {\n var icon = !item.isDirectory ? kendo.getFileGroup(item.extension, true) : 'folder';\n var template = '
' + '' + '
' + '
' + item.name + item.extension + '
';\n return template;\n }\n },\n {\n field: 'created',\n title: messages.dateCreatedField,\n format: '{0:G}'\n },\n {\n field: 'size',\n title: messages.sizeField,\n template: function (item) {\n if (item.size > 0) {\n return kendo.getFileSizeMessage(item.size);\n } else {\n return '';\n }\n }\n }\n ];\n }\n },\n _bindEvents: function () {\n var that = this, grid = that.grid;\n grid.bind(CHANGE, proxy(that._select, that));\n grid.table.on('dblclick' + NS, proxy(that._dblClick, that));\n grid.table.on('mousedown' + NS, 'tr:not(.k-grid-edit-row)', proxy(that._mousedown, that));\n grid.table.on(KEYDOWN + NS, '.k-grid-edit-row', proxy(that._keydown, that));\n grid.table.on(KEYDOWN + NS, proxy(that._keydownAction, that));\n grid.bind('edit', function () {\n that._toggleFocusable(true);\n });\n grid.saveRow = $.noop;\n Component.fn._bindEvents.call(this);\n },\n _kendoKeydown: function (ev) {\n var that = this, current = that.grid.current(), node = current ? current.closest('tr[data-uid]') : null;\n if (node && ev.keyCode === keys.ENTER && !ev.preventKendoKeydown) {\n that._triggerOpen(node);\n ev.preventKendoKeydown = true;\n }\n },\n _keydownAction: function (ev) {\n var that = this, target = $(ev.target).find('.k-state-focused').closest('tr');\n if (target.length && !target.is('.k-grid-edit-row')) {\n that.trigger(KEYDOWNACTION, {\n target: target,\n keyCode: ev.keyCode\n });\n }\n },\n _keydown: function (ev) {\n var that = this, grid = that.grid;\n if (!$(ev.target).closest('.k-grid-edit-row').length) {\n return;\n }\n if (ev.keyCode === kendo.keys.ENTER) {\n setTimeout(function () {\n that._closeEditable();\n });\n that._tryCancel();\n }\n if (ev.keyCode === kendo.keys.ESC) {\n grid.cancelChanges();\n }\n },\n _mousedown: function (ev) {\n var that = this, node = $(ev.target).closest('tr[data-uid]');\n if (ev.which === 1 && that.grid.editable) {\n setTimeout(function () {\n that._closeEditable();\n });\n that._tryCancel();\n }\n if (ev.which === 3 && !node.is('.k-state-selected')) {\n that.grid.selectable.clear();\n that.grid.select(node);\n }\n },\n _tryCancel: function () {\n var that = this, grid = that.grid, container;\n if (grid.editable) {\n container = grid._editContainer;\n if (!container.find('input').val()) {\n grid.cancelChanges();\n }\n }\n setTimeout(function () {\n that._toggleFocusable(false);\n });\n },\n _toggleFocusable: function (state) {\n var that = this, grid = that.grid;\n grid.table.find('tr,td').children().addBack().toggleClass('k-focusable', state);\n },\n _closeEditable: function () {\n var that = this, container;\n if (that.grid.editable && !that.grid.editable.options.model.dirty) {\n container = that.grid._editContainer;\n that.grid._destroyEditable();\n that.grid._displayRow(container);\n }\n },\n _select: function () {\n var that = this, dataItems = that.getSelected();\n that.trigger(SELECT, { entries: dataItems });\n },\n _dblClick: function (ev) {\n var that = this, node = $(ev.target).closest('tr[data-uid]');\n that._triggerOpen(node);\n },\n _triggerOpen: function (node) {\n var that = this;\n if (node.is('.k-grid-edit-row')) {\n return;\n }\n var item = that.grid.dataItem(node);\n if (item) {\n that.trigger(OPEN, { entry: item });\n }\n },\n getSelected: function () {\n var that = this, items = that.grid.select(), dataItems = [];\n for (var i = 0; i < items.length; i++) {\n dataItems.push(that.grid.dataItem(items[i]));\n }\n return dataItems;\n },\n addFolder: function () {\n this.grid.addRow();\n },\n edit: function (target) {\n var that = this, selected = that.grid.select();\n that.grid.editRow(target || selected);\n },\n destroy: function () {\n this.grid.table.off(NS);\n this.grid.element.off(NS);\n Component.fn.destroy.call(this);\n }\n });\n ui.filemanager.registerViewComponent('grid', Grid);\n }\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('filemanager/toolbar', [\n 'kendo.toolbar',\n 'kendo.switch'\n ], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, proxy = $.proxy, ToolBar = kendo.ui.ToolBar, Item = kendo.toolbar.Item, CLICK = 'click', TOGGLE = 'toggle', CLOSE = 'close', ACTION = 'action', CHANGE = 'change', NS = '.fileManagerToolbar';\n var FileManagerToolBar = ToolBar.extend({\n init: function (element, options) {\n var that = this;\n that._extendOptions(options);\n ToolBar.fn.init.call(that, element, options);\n that._attachEvents();\n },\n events: ToolBar.fn.events.concat([ACTION]),\n defaultTools: {\n createFolder: {\n type: 'button',\n text: 'New Folder',\n name: 'createFolder',\n command: 'CreateFolderCommand',\n rules: '{ \"remote\": true }'\n },\n upload: {\n type: 'button',\n text: 'Upload',\n name: 'upload',\n command: 'OpenDialogCommand',\n options: '{ \"type\": \"uploadDialog\" }',\n rules: '{ \"remote\": true }'\n },\n sortDirection: {\n type: 'buttonGroup',\n text: 'Sort Direction',\n name: 'sortDirection',\n buttons: [\n {\n name: 'sortDirectionAsc',\n icon: 'sort-asc-sm',\n togglable: true,\n group: 'sortDirection',\n command: 'SortCommand',\n options: '{ \"dir\": \"asc\" }',\n selected: true\n },\n {\n name: 'sortDirectionDesc',\n icon: 'sort-desc-sm',\n togglable: true,\n group: 'sortDirection',\n command: 'SortCommand',\n options: '{ \"dir\": \"desc\" }'\n }\n ]\n },\n sortField: {\n type: 'splitButton',\n text: 'Sort By',\n name: 'sortField',\n command: 'SortCommand',\n menuButtons: [\n {\n name: 'nameField',\n text: 'Name',\n options: '{\"field\": \"name\"}',\n command: 'SortCommand'\n },\n {\n name: 'typeField',\n text: 'Type',\n options: '{\"field\": \"extension\"}',\n command: 'SortCommand'\n },\n {\n name: 'sizeField',\n text: 'Size',\n options: '{\"field\": \"size\"}',\n command: 'SortCommand'\n },\n {\n name: 'dateCreatedField',\n text: 'Date created',\n options: '{\"field\": \"createdUtc\"}',\n command: 'SortCommand'\n },\n {\n name: 'dateModifiedField',\n text: 'Date modified',\n options: '{\"field\": \"modifiedUtc\"}',\n command: 'SortCommand'\n }\n ]\n },\n changeView: {\n type: 'buttonGroup',\n text: 'Change View',\n name: 'changeView',\n buttons: [\n {\n name: 'gridView',\n icon: 'grid-layout',\n togglable: true,\n group: 'changeView',\n command: 'ChangeViewCommand',\n options: 'grid'\n },\n {\n name: 'listView',\n icon: 'grid',\n togglable: true,\n group: 'changeView',\n command: 'ChangeViewCommand',\n options: 'list'\n }\n ]\n },\n spacer: { type: 'spacer' },\n details: {\n type: 'fileManagerDetailsToggle',\n text: 'View Details',\n name: 'details',\n overflow: 'never',\n command: 'TogglePaneCommand',\n options: '{ \"type\": \"preview\" }'\n },\n search: {\n type: 'fileManagerSearch',\n text: 'Search',\n name: 'search',\n command: 'SearchCommand',\n icon: 'search',\n overflow: 'never',\n options: '{ \"field\": \"name\", \"operator\": \"startswith\" }'\n }\n },\n _attachEvents: function () {\n var that = this;\n that.bind(TOGGLE, proxy(that._click, that));\n that.bind(CLOSE, proxy(that._click, that));\n that.bind(CLICK, proxy(that._click, that));\n that.bind(CHANGE, proxy(that._change, that));\n },\n _extendOptions: function (options) {\n var that = this, tools = options.items ? options.items : Object.keys(that.defaultTools);\n that.options = options;\n that.options.items = that._extendToolsOptions(tools);\n },\n _extendToolsOptions: function (tools) {\n var that = this, messages = that.options.messages;\n if (!tools.length) {\n return;\n }\n return tools.map(function (tool) {\n var isBuiltInTool = $.isPlainObject(tool) && Object.keys(tool).length === 1 && tool.name, toolOptions, toolRules;\n tool = isBuiltInTool ? tool.name : tool;\n toolOptions = $.isPlainObject(tool) ? tool : extend({}, that.defaultTools[tool]);\n toolRules = toolOptions.rules ? JSON.parse(toolOptions.rules) : {};\n kendo.deepExtend(toolOptions, {\n id: toolOptions.name + '-' + kendo.guid(),\n name: toolOptions.name,\n text: messages[toolOptions.name],\n attributes: {\n 'aria-label': messages[toolOptions.name],\n 'title': messages[toolOptions.name],\n 'data-command': toolOptions.command,\n 'data-options': toolOptions.options\n },\n overflow: toolOptions.overflow\n });\n if (toolOptions.type === 'buttonGroup') {\n toolOptions.buttons = toolOptions.buttons.map(proxy(that._mapButtonGroups, that));\n }\n if (toolOptions.type === 'splitButton') {\n toolOptions.menuButtons = toolOptions.menuButtons.map(proxy(that._mapMenuButtons, that));\n }\n if (toolRules.remote && that.options.filemanager.dataSource.isLocalBinding) {\n toolOptions.hidden = true;\n }\n return toolOptions;\n }, that);\n },\n _mapButtonGroups: function (button) {\n var that = this, messages = that.options.messages;\n if (button.group === 'changeView' && button.options === that.options.filemanager.options.initialView) {\n button.selected = true;\n }\n return kendo.deepExtend(button, {\n attributes: extend({}, button.attributes, {\n 'aria-label': messages[button.name],\n 'title': messages[button.name],\n 'data-command': button.command,\n 'data-options': button.options\n })\n });\n },\n _mapMenuButtons: function (button) {\n var that = this, messages = that.options.messages;\n return kendo.deepExtend(button, {\n text: messages[button.name],\n attributes: extend({}, button.attributes, {\n 'aria-label': messages[button.name],\n 'title': messages[button.name],\n 'data-command': button.command,\n 'data-options': button.options\n })\n });\n },\n _click: function (ev) {\n var command = $(ev.target).data('command'), options = $(ev.target).data('options');\n if (!command) {\n return;\n }\n this.action({\n command: command,\n options: options\n });\n },\n _change: function (ev) {\n var command = $(ev.target).data('command'), options = $(ev.target).data('options');\n options = extend({}, options, { value: $(ev.target).val() });\n if (!command) {\n return;\n }\n this.action({\n command: command,\n options: options\n });\n },\n isToolEnabled: function (toolName) {\n var that = this, options = that.options, found = false;\n for (var i = 0; i < options.items.length; i++) {\n if (options.items[i].name == toolName) {\n found = true;\n break;\n }\n }\n return options.items[toolName] || found;\n },\n action: function (args) {\n this.trigger(ACTION, args);\n },\n destroy: function () {\n if (this.fileManagerSearch) {\n this.fileManagerSearch.destroy();\n }\n ToolBar.fn.destroy.call(this);\n }\n });\n var SearchTool = Item.extend({\n init: function (options, toolbar) {\n var that = this, element = $('
'), input = $(''), iconWrapper = $(''), icon = $('');\n that.element = element;\n that.input = input;\n that.iconWrapper = iconWrapper;\n that.icon = icon;\n that.options = options;\n that.options.type = 'fileManagerSearch';\n that.toolbar = toolbar;\n that.attributes();\n that.renderIcon();\n that.addUidAttr();\n that.addIdAttr();\n that.addOverflowAttr();\n that.input.attr({\n placeholder: that.options.text,\n title: that.options.text\n });\n that.iconWrapper.append(icon);\n that.element.append(that.input).append(iconWrapper);\n that._bindEvents();\n that.toolbar.fileManagerSearch = that;\n },\n attributes: function () {\n if (this.options.attributes) {\n this.input.attr(this.options.attributes);\n }\n },\n renderIcon: function () {\n if (this.options.icon) {\n this.icon.addClass('k-icon k-i-' + this.options.icon);\n }\n },\n _bindEvents: function () {\n this._inputHandler = proxy(this._input, this);\n this.input.on('input' + NS, this._inputHandler);\n },\n _input: function (ev) {\n this.toolbar.trigger(CHANGE, { target: ev.target });\n },\n destroy: function () {\n this.element.off(NS);\n }\n });\n kendo.toolbar.registerComponent('fileManagerSearch', SearchTool);\n var FileManagerDetailsToggle = Item.extend({\n init: function (options, toolbar) {\n var that = this, element = $('
'), label = $(''), switchElement = $('');\n that.element = element;\n that.input = switchElement;\n that.label = label;\n that.options = options;\n that.toolbar = toolbar;\n that.attributes();\n that.addUidAttr();\n that.addIdAttr();\n that.addOverflowAttr();\n that.element.append(that.label);\n that.element.append(that.input);\n that.switchInstance = new kendo.ui.Switch(that.input, {\n change: proxy(that._change, that),\n messages: {\n checked: toolbar.options.messages.detailsChecked,\n unchecked: toolbar.options.messages.detailsUnchecked\n }\n });\n that.label.on(CLICK + NS, proxy(that._click, that));\n that.toolbar.fileManagerDetailsToggle = that;\n },\n _change: function (ev) {\n this.toolbar.trigger(CHANGE, { target: ev.sender.wrapper.parent() });\n },\n _click: function (ev) {\n this.switchInstance.toggle();\n this.toolbar.trigger(CHANGE, { target: $(ev.target).parent() });\n },\n destroy: function () {\n this.element.off(NS);\n }\n });\n kendo.toolbar.registerComponent('fileManagerDetailsToggle', FileManagerDetailsToggle);\n extend(kendo.ui.filemanager, { ToolBar: FileManagerToolBar });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('filemanager/data', ['kendo.data'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, data = kendo.data, Node = data.Node, HierarchicalDataSource = data.HierarchicalDataSource, DataSource = data.DataSource;\n extend(true, kendo.data, {\n schemas: {\n 'filemanager': {\n data: function (data) {\n return data.items || data || [];\n },\n model: {\n id: 'path',\n hasChildren: 'hasDirectories',\n fields: {\n name: {\n editable: true,\n type: 'String',\n defaultValue: 'New Folder'\n },\n size: {\n editable: false,\n type: 'Number'\n },\n path: {\n editable: false,\n type: 'String'\n },\n extension: {\n editable: false,\n type: 'String'\n },\n isDirectory: {\n editable: false,\n defaultValue: true,\n type: 'Boolean'\n },\n hasDirectories: {\n editable: false,\n defaultValue: false,\n type: 'Boolean'\n },\n created: {\n type: 'Date',\n editable: false\n },\n createdUtc: {\n type: 'Date',\n editable: false\n },\n modified: {\n type: 'Date',\n editable: false\n },\n modifiedUtc: {\n type: 'Date',\n editable: false\n }\n }\n }\n }\n }\n });\n var FileEntry = Node.define({\n init: function (value) {\n var that = this, isDirectory = this.isDirectory;\n Node.fn.init.call(this, value);\n if (typeof isDirectory === 'string') {\n isDirectory = kendo.getter(isDirectory);\n }\n if (kendo.isFunction(isDirectory)) {\n var isDirectoryObject = isDirectory.call(that, that);\n if (isDirectoryObject && isDirectoryObject.length === 0) {\n that.isDirectory = false;\n } else {\n that.isDirectory = !!isDirectoryObject;\n }\n }\n if (that.isDirectory) {\n that._initChildren();\n }\n },\n _initChildren: function () {\n var that = this;\n var children, transport, parameterMap;\n if (!(that.children instanceof kendo.data.FileManagerDataSource)) {\n children = that.children = new kendo.data.FileManagerDataSource(that._childrenOptions);\n transport = children.transport;\n parameterMap = transport.parameterMap;\n transport.parameterMap = function (data, type) {\n if (type === 'read' || type === 'create') {\n data.target = that.id;\n }\n if (parameterMap) {\n data = parameterMap.call(that, data, type);\n }\n return data;\n };\n children.parent = function () {\n return that;\n };\n children.bind('change', function (e) {\n e.node = e.node || that;\n that.trigger('change', e);\n });\n children.bind('error', function (e) {\n var collection = that.parent();\n if (collection) {\n e.node = e.node || that;\n collection.trigger('error', e);\n }\n });\n that._updateChildrenField();\n }\n },\n isNew: function () {\n if (this.fileManagerNewItem) {\n delete this.fileManagerNewItem;\n return true;\n }\n return this.id === this._defaultId;\n }\n });\n var FileManagerDataSource = HierarchicalDataSource.extend({\n init: function (options) {\n var fileEntry = FileEntry.define({ children: options });\n if (options.filter && !options.serverFiltering) {\n this._hierarchicalFilter = options.filter;\n options.filter = null;\n }\n DataSource.fn.init.call(this, $.extend(true, {}, {\n schema: {\n modelBase: fileEntry,\n model: fileEntry\n }\n }, options));\n this.isLocalBinding = this.transport instanceof kendo.data.LocalTransport;\n this._attachBubbleHandlers();\n },\n insert: function (index, model) {\n var parentNode = this.parent();\n if (parentNode && parentNode._initChildren) {\n if (model && model.isDirectory) {\n parentNode.hasDirectories = true;\n }\n parentNode.hasChildren = true;\n parentNode._initChildren();\n }\n return DataSource.fn.insert.call(this, index, model);\n },\n remove: function (node) {\n var parentNode = node.parentNode(), dataSource = this, result;\n if (parentNode && parentNode._initChildren) {\n dataSource = parentNode.children;\n }\n result = DataSource.fn.remove.call(dataSource, node);\n if (parentNode && (dataSource.data() && !dataSource.data().length)) {\n parentNode.hasChildren = false;\n } else if (parentNode && !this._hasDirectories(parentNode)) {\n parentNode.hasDirectories = false;\n }\n return result;\n },\n _hasDirectories: function (node) {\n var result;\n if (!node.children.data()) {\n return false;\n }\n result = node.children.data().filter(function (item) {\n return item.isDirectory;\n });\n return !!result.length;\n }\n });\n FileManagerDataSource.create = function (options) {\n options = options && options.push ? { data: options } : options;\n var dataSource = options || {}, data = dataSource.data;\n if (data && data._dataSource) {\n return data._dataSource;\n }\n dataSource.data = data;\n return dataSource instanceof FileManagerDataSource ? dataSource : new FileManagerDataSource(dataSource);\n };\n extend(kendo.data, {\n FileManagerDataSource: FileManagerDataSource,\n FileEntry: FileEntry\n });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('filemanager/contextmenu', ['kendo.menu'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, proxy = $.proxy, template = kendo.template, ContextMenu = kendo.ui.ContextMenu, ACTION = 'action';\n var FileManagerContextMenu = ContextMenu.extend({\n init: function (element, options) {\n var that = this;\n ContextMenu.fn.init.call(that, element, options);\n that._overrideTemplates();\n that._extendItems();\n that.bind('select', proxy(that._onSelect, that));\n },\n _overrideTemplates: function () {\n this.templates.sprite = template('#if(spriteCssClass) {##}#');\n },\n defaultItems: {\n 'rename': {\n text: 'Rename',\n spriteCssClass: 'k-icon k-i-edit',\n command: 'RenameCommand'\n },\n 'delete': {\n text: 'Delete',\n spriteCssClass: 'k-icon k-i-delete',\n command: 'DeleteCommand'\n }\n },\n events: ContextMenu.fn.events.concat([ACTION]),\n _extendItems: function () {\n var that = this, items = that.options.items, item, isBuiltInTool;\n if (items && items.length) {\n for (var i = 0; i < items.length; i++) {\n item = items[i];\n isBuiltInTool = $.isPlainObject(item) && Object.keys(item).length === 1 && item.name;\n if (isBuiltInTool) {\n item = item.name;\n }\n if ($.isPlainObject(item)) {\n that._extendItem(item);\n that.append(item);\n } else if (that.defaultItems[item]) {\n item = that.defaultItems[item];\n that._extendItem(item);\n that.append(item);\n }\n }\n } else {\n for (var key in that.defaultItems) {\n item = that.defaultItems[key];\n that._extendItem(item);\n that.append(item);\n }\n }\n },\n _extendItem: function (item) {\n var that = this, messages = that.options.messages;\n extend(item, {\n text: messages[item.text],\n spriteCssClass: item.spriteCssClass || '',\n attr: { 'data-command': item.command }\n });\n },\n _onSelect: function (ev) {\n var command = $(ev.item).data('command');\n var target = $(ev.target);\n if (!command) {\n return;\n }\n this.action({\n command: command,\n options: { target: target }\n });\n },\n action: function (args) {\n this.trigger(ACTION, args);\n }\n });\n extend(kendo.ui.filemanager, { ContextMenu: FileManagerContextMenu });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.filemanager', [\n 'filemanager/commands',\n 'filemanager/view',\n 'filemanager/toolbar',\n 'filemanager/data',\n 'filemanager/contextmenu',\n 'kendo.breadcrumb',\n 'kendo.upload',\n 'kendo.dialog',\n 'kendo.resizable'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'filemanager',\n name: 'FileManager',\n category: 'web',\n description: 'The FileManager widget displays offers file management functionality.',\n depends: [\n 'core',\n 'data',\n 'listview',\n 'toolbar',\n 'breadcrumb',\n 'menu',\n 'treeview',\n 'upload',\n 'dialog',\n 'switch',\n 'resizable',\n 'selectable',\n 'editable'\n ],\n features: [{\n id: 'filemanager-grid-view',\n name: 'GridView',\n description: 'Support for GridView',\n depends: ['grid']\n }]\n };\n (function ($, undefined) {\n var ui = kendo.ui, extend = $.extend, isPlainObject = $.isPlainObject, isArray = $.isArray, DataBoundWidget = ui.DataBoundWidget, proxy = $.proxy, template = kendo.template, outerHeight = kendo._outerHeight, NAVIGATE = 'navigate', SELECT = 'select', OPEN = 'open', ERROR = 'error', CHANGE = 'change', UPLOAD = 'upload', SUCCESS = 'success', CLOSE = 'close', HIDE = 'hide', LOAD = 'load', DATABINDING = 'dataBinding', DATABOUND = 'dataBound', DROP = 'drop', EXECUTE = 'execute', KEYDOWNACTION = 'keydownAction', TREE_TYPE = 'tree', DOT = '.';\n var fileManagerStyles = {\n wrapper: 'k-widget k-filemanager',\n header: 'k-filemanager-header',\n navigation: 'k-filemanager-navigation',\n contentContainer: 'k-filemanager-content-container',\n content: 'k-filemanager-content',\n preview: 'k-filemanager-preview',\n toolbar: 'k-filemanager-toolbar',\n treeview: 'k-filemanager-treeview',\n breadcrumb: 'k-filemanager-breadcrumb',\n view: 'k-filemanager-view',\n grid: 'k-filemanager-grid',\n list: 'k-filemanager-listview',\n upload: 'k-filemanager-upload',\n uploadDialog: 'k-filemanager-upload-dialog',\n splitBar: 'k-splitbar',\n splitBarHorizontal: 'k-splitbar-horizontal k-splitbar-draggable-horizontal',\n splitBarHover: 'k-splitbar-horizontal-hover',\n splitBarIcon: 'k-icon k-resize-handle',\n splitBarNavigation: 'k-filemanager-splitbar-navigation',\n splitBarPreview: 'k-filemanager-splitbar-preview',\n resizable: 'k-filemanager-resizable'\n };\n var fileManagerTemplateStyles = {\n filePreview: 'k-file-preview',\n fileInfo: 'k-file-info',\n fileName: 'k-file-name',\n fileMeta: 'k-file-meta',\n metaLabel: 'k-file-meta-label',\n metaValue: 'k-file-meta-value',\n extension: 'k-file-type',\n size: 'k-file-size',\n created: 'k-file-created',\n modified: 'k-file-modified'\n };\n var viewTypes = {\n grid: 'grid',\n list: 'list'\n };\n var NO_FILE_PREVIEW_TEMPLATE = '' + '
' + '
' + '' + '
' + '#= messages.noFileSelected #' + '
';\n var SINGLE_FILES_PREVIEW_TEMPLATE = '' + '
' + '
' + '' + '
' + '#=selection[0].name#' + '#if(metaFields){#' + '
' + '#for(var i = 0; i < metaFields.length; i+=1){#' + '#var field = metaFields[i]#' + '
#=messages[field]#:
' + '
' + '#if(field == \"size\"){#' + ' #=kendo.getFileSizeMessage(selection[0][field])#' + '#} else if(selection[0][field] instanceof Date) {#' + ' #=kendo.toString(selection[0][field], \"G\")#' + '#} else if(field == \"extension\") {#' + ' #= !selection[0].isDirectory ? kendo.getFileGroup(selection[0].extension) : \"folder\"#' + '#} else {#' + ' #=selection[0][field]#' + '#}#' + '
' + '
' + '# } #' + '
' + '#}#' + '
';\n var MULTIPLE_FILES_PREVIEW_TEMPLATE = '' + '
' + '
' + '' + '
' + '' + '#=selection.length# ' + '#=messages.items#' + '' + '
';\n var FileManager = DataBoundWidget.extend({\n init: function (element, options) {\n var that = this;\n DataBoundWidget.fn.init.call(that, element, options);\n that.options = kendo.deepExtend({}, that.options, options);\n that.defaultSortOption = {\n field: 'name',\n dir: 'asc'\n };\n that.folderSortOption = {\n field: 'isDirectory',\n dir: 'desc'\n };\n that._dataSource();\n that._wrapper();\n that._renderHeader();\n that._renderContentContainer();\n that._initContextMenu();\n that._renderNavigation();\n that._renderContent();\n that._renderPreview();\n that._initUploadDialog();\n that._resizable();\n that.resize();\n kendo.notify(that, kendo.ui);\n },\n options: {\n name: 'FileManager',\n height: 500,\n resizable: true,\n initialView: 'list',\n toolbar: { resizable: true },\n contextMenu: {},\n upload: {},\n uploadUrl: '',\n views: {},\n breadcrumb: {},\n draggable: true,\n dialogs: {\n upload: { width: 530 },\n moveConfirm: {\n width: 350,\n closable: true\n },\n deleteConfirm: {\n width: 360,\n closable: true\n },\n renamePrompt: {\n width: 350,\n closable: true\n }\n },\n previewPane: {\n metaFields: [\n 'extension',\n 'size',\n 'created',\n 'modified'\n ],\n noFileTemplate: NO_FILE_PREVIEW_TEMPLATE,\n singleFileTemplate: SINGLE_FILES_PREVIEW_TEMPLATE,\n multipleFilesTemplate: MULTIPLE_FILES_PREVIEW_TEMPLATE\n },\n messages: {\n toolbar: {\n createFolder: 'New Folder',\n upload: 'Upload',\n sortDirection: 'Sort Direction',\n sortDirectionAsc: 'Sort Direction Ascending',\n sortDirectionDesc: 'Sort Direction Descending',\n sortField: 'Sort By',\n nameField: 'Name',\n sizeField: 'File Size',\n typeField: 'Type',\n dateModifiedField: 'Date Modified',\n dateCreatedField: 'Date Created',\n listView: 'List View',\n gridView: 'Grid View',\n search: 'Search',\n details: 'View Details',\n detailsChecked: 'On',\n detailsUnchecked: 'Off',\n 'delete': 'Delete',\n rename: 'Rename'\n },\n views: {\n nameField: 'Name',\n sizeField: 'File Size',\n typeField: 'Type',\n dateModifiedField: 'Date Modified',\n dateCreatedField: 'Date Created',\n items: 'items'\n },\n dialogs: {\n upload: {\n title: 'Upload Files',\n clear: 'Clear List',\n done: 'Done'\n },\n moveConfirm: {\n title: 'Confirm',\n content: '

Do you want to move or copy?

',\n okText: 'Copy',\n cancel: 'Move',\n close: 'close'\n },\n deleteConfirm: {\n title: 'Confirm',\n content: '

Are you sure you want to delete the selected file(s)?
You cannot undo this action.

',\n okText: 'Delete',\n cancel: 'Cancel',\n close: 'close'\n },\n renamePrompt: {\n title: 'Prompt',\n content: '

Enter new name for the file.

',\n okText: 'Rename',\n cancel: 'Cancel',\n close: 'close'\n }\n },\n previewPane: {\n noFileSelected: 'No File Selected',\n extension: 'Type',\n size: 'Size',\n created: 'Date Created',\n createdUtc: 'Date Created UTC',\n modified: 'Date Modified',\n modifiedUtc: 'Date Modified UTC',\n items: 'items'\n }\n }\n },\n events: [\n NAVIGATE,\n SELECT,\n OPEN,\n DATABINDING,\n DATABOUND,\n ERROR,\n DROP,\n EXECUTE\n ],\n _dataSource: function () {\n var that = this, options = that.options, dataSourceOptions = options.dataSource || {}, typeSortOrder = that.folderSortOption, nameSortOrder = that.defaultSortOption, dataSource;\n if (!(dataSourceOptions instanceof kendo.data.FileManagerDataSource)) {\n if (isArray(dataSourceOptions)) {\n dataSource = {\n data: dataSourceOptions,\n autoSync: false,\n sort: [\n typeSortOrder,\n nameSortOrder\n ]\n };\n } else {\n dataSource = extend(true, dataSourceOptions, {\n autoSync: false,\n sort: [\n typeSortOrder,\n nameSortOrder\n ]\n });\n }\n if (dataSourceOptions && isPlainObject(dataSourceOptions.schema)) {\n dataSource.schema = dataSourceOptions.schema;\n } else if (isPlainObject(kendo.data.schemas.filemanager)) {\n dataSource.schema = kendo.data.schemas.filemanager;\n }\n } else {\n dataSource = dataSourceOptions;\n }\n if (that.dataSource && that._errorHandler) {\n that.dataSource.unbind(ERROR, that._errorHandler);\n that.dataSource.unbind(CHANGE, that._changeHandler);\n } else {\n that._errorHandler = proxy(that._error, that);\n that._changeHandler = proxy(that._change, that);\n }\n that.dataSource = kendo.data.FileManagerDataSource.create(dataSource).bind(ERROR, that._errorHandler).bind(CHANGE, that._changeHandler);\n },\n _error: function (ev) {\n if (!this.trigger(ERROR, ev)) {\n throw new Error('Error! The requested URL returned ' + ev.xhr.status + ' - ' + ev.xhr.statusText);\n }\n },\n _wrapper: function () {\n var that = this, options = that.options, width = options.width, height = options.height;\n that.wrapper = that.element.addClass(fileManagerStyles.wrapper);\n if (width) {\n that.wrapper.width(width);\n }\n if (height) {\n that.wrapper.height(height);\n }\n that._resizeHandler = kendo.onResize(function () {\n that.resize(true);\n });\n },\n _renderHeader: function () {\n var that = this, options = that.options;\n if (options.toolbar) {\n that.header = $('
').addClass(fileManagerStyles.header);\n that.header.append(that._initToolbar().element);\n }\n that.wrapper.append(that.header);\n },\n _renderContentContainer: function () {\n var that = this, container = $('
').addClass(fileManagerStyles.contentContainer);\n that.contentContainer = container;\n that.wrapper.append(that.contentContainer);\n },\n _initContextMenu: function () {\n var that = this, options = that.options, menuOptions = extend({}, options.contextMenu, {\n filemanager: that,\n messages: options.messages.toolbar,\n target: that.contentContainer,\n filter: '[data-uid]',\n action: that.executeCommand.bind(that)\n });\n if (that.options.contextMenu === false || that.dataSource.isLocalBinding) {\n return;\n }\n that.contextMenu = new ui.filemanager.ContextMenu('
    ', menuOptions);\n that.contextMenu.bind(OPEN, proxy(that._cacheFocus, that));\n },\n _renderNavigation: function () {\n var that = this;\n that.navigation = $('
    ').addClass(fileManagerStyles.navigation);\n that.navigation.append(that._initTreeView().element);\n that.contentContainer.append(that.navigation);\n },\n _renderContent: function () {\n var that = this, options = that.options, toolbar = that.toolbar;\n that.content = $('
    ').addClass(fileManagerStyles.content);\n if (options.breadcrumb) {\n that.content.append(that._initBreadcrumb().element);\n }\n that.content.append(that._initView());\n if (!toolbar || !toolbar.isToolEnabled(toolbar.defaultTools.upload.name)) {\n that.content.append(that._initUpload().wrapper.hide());\n }\n that.contentContainer.append(that.content);\n },\n _renderPreview: function () {\n var that = this, enablePreview = that.options.previewPane;\n if (!enablePreview) {\n return;\n }\n that.preview = $('
    ').addClass(fileManagerStyles.preview);\n that.previewContainer = $('
    ').addClass(fileManagerStyles.previewContainer);\n that.preview.append(that.previewContainer);\n that._setPreviewPaneContent();\n that.contentContainer.append(that.preview.hide());\n },\n _setPreviewPaneContent: function () {\n var that = this, options = that.options, previewPaneMessages = options.messages.previewPane, previewPaneOptions = options.previewPane, selection = that.getSelected(), previewTemplate;\n if (!selection) {\n previewTemplate = template(previewPaneOptions.noFileTemplate)({\n styles: fileManagerTemplateStyles,\n messages: previewPaneMessages\n });\n that.previewContainer.html(previewTemplate);\n return;\n }\n previewTemplate = selection.length === 1 ? previewPaneOptions.singleFileTemplate : previewPaneOptions.multipleFilesTemplate;\n previewTemplate = template(previewTemplate)({\n styles: fileManagerTemplateStyles,\n messages: previewPaneMessages,\n selection: selection,\n metaFields: previewPaneOptions.metaFields\n });\n that.previewContainer.html(previewTemplate);\n },\n _initToolbar: function () {\n var that = this, options = that.options, toolbarElement = $('
    ').addClass(fileManagerStyles.toolbar), toolbarOptions = extend({}, options.toolbar, {\n filemanager: this,\n messages: options.messages.toolbar,\n action: that.executeCommand.bind(that)\n });\n that.toolbar = new ui.filemanager.ToolBar(toolbarElement, toolbarOptions);\n return that.toolbar;\n },\n _initTreeView: function () {\n var that = this, treeViewElement = $('
    ').addClass(fileManagerStyles.treeview), options = that.options.views[TREE_TYPE], explicitOptions = extend(true, {}, {\n dataSource: that.options.dataSource,\n messages: that.options.messages.views,\n draggable: that.options.draggable,\n isLocalBinding: that.dataSource.isLocalBinding\n });\n that.treeView = new ui.filemanager.ViewComponents[TREE_TYPE](treeViewElement, options, explicitOptions);\n that.treeView.bind(NAVIGATE, proxy(that._navigate, that)).bind(LOAD, proxy(that._load, that)).bind(DROP, proxy(that._drop, that)).bind(KEYDOWNACTION, proxy(that._keydownAction, that));\n return that.treeView;\n },\n _drop: function (ev) {\n var that = this;\n if (!that.trigger(DROP, ev) && ev.items.indexOf(ev.target) < 0) {\n that._confirm({\n type: 'move',\n target: ev.target\n }).done(function () {\n that.executeCommand({\n command: 'CopyCommand',\n options: ev\n });\n }).fail(function () {\n that.executeCommand({\n command: 'MoveCommand',\n options: ev\n });\n });\n }\n },\n _keydownAction: function (ev) {\n var that = this, keyCode = ev.keyCode, keys = kendo.keys;\n if (keyCode === keys.DELETE) {\n that.executeCommand({\n command: 'DeleteCommand',\n options: { target: ev.target }\n });\n }\n if (keyCode === keys.F2 && that._viewType !== viewTypes.grid) {\n that.executeCommand({\n command: 'RenameCommand',\n options: { target: ev.target }\n });\n }\n },\n _confirm: function (options) {\n var that = this, messages = that.options.messages.dialogs[options.type + 'Confirm'];\n var confirm = $('
    ').kendoConfirm(extend({}, {\n title: messages.title,\n content: messages.content,\n messages: messages\n }, that.options.dialogs[options.type + 'Confirm'])).data('kendoConfirm');\n confirm.bind(OPEN, proxy(that._cacheFocus, that));\n confirm.bind(HIDE, proxy(that._restoreFocus, that, options.target));\n confirm.open();\n confirm.wrapper.removeClass('k-confirm');\n return confirm.result;\n },\n _prompt: function (options) {\n var that = this, messages = this.options.messages.dialogs[options.type + 'Prompt'];\n var prompt = $('
    ').kendoPrompt(extend({}, {\n title: messages.title,\n content: messages.content,\n messages: messages,\n value: options.defaultInput\n }, this.options.dialogs[options.type + 'Prompt'])).data('kendoPrompt');\n prompt.bind(OPEN, proxy(that._cacheFocus, that));\n prompt.bind(CLOSE, proxy(that._restoreFocus, that, options.target));\n prompt.open();\n prompt.wrapper.removeClass('k-prompt');\n return prompt.result;\n },\n _cacheFocus: function () {\n var that = this, activeElement = $(document.activeElement), view = that.view(), treeView = that.treeView.widgetComponent;\n if (that.contextMenu && that.contextMenu.popup.visible()) {\n return;\n }\n that.treeView._shouldFocus = false;\n if (treeView.current() && treeView.current().find('.k-state-focused').length || activeElement.hasClass(fileManagerStyles.treeview)) {\n that.treeView._shouldFocus = true;\n view._focusElement = activeElement;\n return;\n }\n view._focusElement = activeElement.hasClass(fileManagerStyles[that._viewType]) ? activeElement : null;\n },\n _restoreFocus: function (target) {\n var that = this, view = that.view();\n if (!target) {\n return;\n }\n if (view._focusElement) {\n view._focusElement.focus();\n } else if (target.closest && target.closest(':kendoFocusable').length) {\n target.closest(':kendoFocusable').focus();\n }\n },\n _initView: function () {\n var that = this, viewWrapper = $('
    ').addClass(fileManagerStyles.view), initialView = that.options.initialView;\n that.viewWrapper = viewWrapper;\n that.viewWrapper.append(that.view(initialView));\n return viewWrapper;\n },\n _initBreadcrumb: function () {\n var that = this, options = that.options, breadcrumbElement = $('