/** * Kendo UI v2016.1.112 (http://www.telerik.com/kendo-ui) * Copyright 2016 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("kendo.filebrowser.min",["kendo.listview.min","kendo.dropdownlist.min","kendo.upload.min"],e)}(function(){return function(e,t){function a(e,t,a){var r,o;e.on("dragenter"+S,function(){t(),o=new Date,r||(r=setInterval(function(){var e=new Date-o;e>100&&(a(),clearInterval(r),r=null)},100))}).on("dragover"+S,function(){o=new Date})}function r(e,a){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+a}function o(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}function i(e,t){var a=e[t];return p(a)?a.from||a.field||t:a}var n,s,l,d,u=window.kendo,c=u.ui.Widget,p=e.isPlainObject,f=e.proxy,h=e.extend,v=u.support.placeholder,m=u.support.browser,k=u.isFunction,_=/(^\/|\/$)/g,g="change",w="apply",b="error",y="click",S=".kendoFileBrowser",x=".kendoBreadcrumbs",B=".kendoSearchBox",T="name",D="size",F="type",C={field:F,dir:"asc"},z=u.template('
  • ${text}
  • '),H='
    # if (showUpload) { #
    #=messages.uploadFile#
    # } ## if (showCreate) { ## } ## if (showDelete) { # # } #
    ').appendTo(this.element);t.breadcrumbs=a.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=a.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,a=this;a.trigger(b,e)||(t=e.xhr.status,"error"==e.status?"404"==t?a._showMessage(a.options.messages.directoryNotFound):"0"!=t&&a._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&a._showMessage("Error! Server timeout."))},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_editTmpl:function(){var e='
  • ',e+="#if("+F+' == "d") { #',e+='
    ',e+="#}else{#",e+='
    ',e+="#}#",e+="#if("+F+' == "d") { #',e+='',e+="#}#",e+="
  • ",f(u.template(e),{sizeFormatter:o})},_itemTmpl:function(){var e='
  • ',e+="#if("+F+' == "d") { #',e+='
    ',e+="#}else{#",e+='
    ',e+="#}#",e+="${"+T+"}",e+="#if("+F+' == "f") { # ${this.sizeFormatter('+D+")} #}#",e+="
  • ",f(u.template(e),{sizeFormatter:o})},path:function(e){var a=this,r=a._path||"";return e!==t?(a._path=e.replace(_,"")+"/",a.dataSource.read({path:a._path}),t):(r&&(r=r.replace(_,"")),"/"===r||""===r?"":r+"/")}}),l=c.extend({init:function(e,t){var a=this;t=t||{},c.fn.init.call(a,e,t),v&&a.element.attr("placeholder",a.options.label),a._wrapper(),a.element.on("keydown"+B,f(a._keydown,a)).on("change"+B,f(a._updateValue,a)),a.wrapper.on(y+B,"a",f(a._click,a)),v||a.element.on("focus"+B,f(a._focus,a)).on("blur"+B,f(a._blur,a))},options:{name:"SearchBox",label:"Search",value:""},events:[g],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(B),c.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(g))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){v||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,a=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),a.length||(a=t.wrap(e('
    ')).parent(),v||e('").insertBefore(t),e('').appendTo(a)),this.wrapper=a,this.label=a.find(">label")},value:function(e){var a=this;return e!==t?(a.options.value=e,a.element.val(e),a._toggleLabel(),t):a.options.value}}),d=c.extend({init:function(e,t){var a=this;t=t||{},c.fn.init.call(a,e,t),a._wrapper(),a.wrapper.on("focus"+x,"input",f(a._focus,a)).on("blur"+x,"input",f(a._blur,a)).on("keydown"+x,"input",f(a._keydown,a)).on(y+x,"a.k-i-arrow-n:first",f(a._rootClick,a)).on(y+x,"a:not(.k-i-arrow-n)",f(a._click,a)),a.value(a.options.value)},options:{name:"Breadcrumbs",gap:50},events:[g],destroy:function(){var e=this;c.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(x)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(g))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").addBack()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,a=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(a)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,a=this.element,r=a.parents(".k-breadcrumbs");a[0].style.width="",a.addClass("k-input"),r.length||(r=a.wrap(e('
    ')).parent()),t=r.find(".k-breadcrumbs-wrap"),t.length||(t=e('
    ').appendTo(r)),this.wrapper=r,this.overlay=t},refresh:function(){var a,r,o,i,n="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),a=s.split("/"),o=0,i=a.length;i>o;o++)r=a[o],r&&(n||(n+='root'),n+=''+a[o]+"",n+='>');this.overlay.empty().append(e(n)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,a=this,r=a.wrapper,o=r.width()-a.options.gap,i=a.overlay.find("a");i.each(function(a){t=e(this),t.parent().width()>o&&(a==i.length-1?t.width(o):t.prev().addBack().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}}),u.ui.plugin(s),u.ui.plugin(d),u.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,a){(a||t)()}); //# sourceMappingURL=kendo.filebrowser.min.js.map