/* * Kendo UI v2015.3.1111 (http://www.telerik.com/kendo-ui) * Copyright 2015 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.listview.min","./kendo.dropdownlist.min","./kendo.upload.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,o;e.on("dragenter"+k,function(){t(),o=new Date,i||(i=setInterval(function(){var e=new Date-o;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+k,function(){o=new Date})}function i(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}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 r(e,t){var n=e[t];return d(n)?n.from||n.field||t:n}var s,a,l,c,h=window.kendo,u=h.ui.Widget,d=e.isPlainObject,f=e.proxy,p=e.extend,g=h.support.placeholder,m=h.support.browser,v=h.isFunction,_=/(^\/|\/$)/g,w="change",y="apply",b="error",x="click",k=".kendoFileBrowser",C=".kendoBreadcrumbs",S=".kendoSearchBox",T="name",A="size",D="type",M={field:D,dir:"asc"},E=h.template('
  • ${text}
  • '),P='
    # if (showUpload) { #
    #=messages.uploadFile#
    # } ## if (showCreate) { ## } ## if (showDelete) { # # } #
    ').appendTo(this.element);t.breadcrumbs=n.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=n.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,n=this;n.trigger(b,e)||(t=e.xhr.status,"error"==e.status?"404"==t?n._showMessage(n.options.messages.directoryNotFound):"0"!=t&&n._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&n._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("+D+' == "d") { #',e+='
    ',e+="#}else{#",e+='
    ',e+="#}#",e+="#if("+D+' == "d") { #',e+='',e+="#}#",e+="
  • ",f(h.template(e),{sizeFormatter:o})},_itemTmpl:function(){var e='
  • ',e+="#if("+D+' == "d") { #',e+='
    ',e+="#}else{#",e+='
    ',e+="#}#",e+="${"+T+"}",e+="#if("+D+' == "f") { # ${this.sizeFormatter('+A+")} #}#",e+="
  • ",f(h.template(e),{sizeFormatter:o})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(_,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(_,"")),"/"===i||""===i?"":i+"/")}}),l=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),g&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+S,f(n._keydown,n)).on("change"+S,f(n._updateValue,n)),n.wrapper.on(x+S,"a",f(n._click,n)),g||n.element.on("focus"+S,f(n._focus,n)).on("blur"+S,f(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[w],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(S),u.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(w))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){g||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,n=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),n.length||(n=t.wrap(e('
    ')).parent(),g||e('").insertBefore(t),e('').appendTo(n)),this.wrapper=n,this.label=n.find(">label")},value:function(e){var n=this;return e!==t?(n.options.value=e,n.element.val(e),n._toggleLabel(),t):n.options.value}}),c=u.extend({init:function(e,t){var n=this;t=t||{},u.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+C,"input",f(n._focus,n)).on("blur"+C,"input",f(n._blur,n)).on("keydown"+C,"input",f(n._keydown,n)).on(x+C,"a.k-i-arrow-n:first",f(n._rootClick,n)).on(x+C,"a:not(.k-i-arrow-n)",f(n._click,n)),n.value(n.options.value)},options:{name:"Breadcrumbs",gap:50},events:[w],destroy:function(){var e=this;u.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(w))},_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,n=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(n)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,n=this.element,i=n.parents(".k-breadcrumbs");n[0].style.width="",n.addClass("k-input"),i.length||(i=n.wrap(e('
    ')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('
    ').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var n,i,o,r,s="",a=this.value();for(a!==t&&a.match(/^\//)||(a="/"+(a||"")),n=a.split("/"),o=0,r=n.length;r>o;o++)i=n[o],i&&(s||(s+='root'),s+=''+n[o]+"",s+='>');this.overlay.empty().append(e(s)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,n=this,i=n.wrapper,o=i.width()-n.options.gap,r=n.overlay.find("a");r.each(function(n){t=e(this),t.parent().width()>o&&(n==r.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("/")}}),h.ui.plugin(a),h.ui.plugin(c),h.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});