text: var bind=function(e,t){return function(){return e.apply(t,arguments)}};!function(e,t){var n;return n=function(){function t(t,n,a){this.onEvent=bind(this.onEvent,this);var r,i,l;r=e(t),i=this,l={root:"/",script:"/files/filetree",folderEvent:"click",expandSpeed:500,collapseSpeed:500,expandEasing:"swing",collapseEasing:"swing",multiFolder:!0,loadMessage:"Loading...",errorMessage:"Unable to get file tree information",multiSelect:!1,onlyFolders:!1,onlyFiles:!1,preventLinkAction:!1,params:{}},this.jqft={container:r},this.options=e.extend(l,n),this.callback=a,this.data={},r.html('<ul class="jqueryFileTree start"><li class="wait">'+this.options.loadMessage+"<li></ul>"),i.showTree(r,escape(this.options.root),function(){return i._trigger("filetreeinitiated",{})}),r.delegate("li a",this.options.folderEvent,i.onEvent)}return t.prototype.onEvent=function(t){var n,a,r,i,l,s;return n=e(t.target),l=this.options,i=this.jqft,a=this,r=this.callback,a.data={},a.data.li=n.closest("li"),a.data.type=null!=(s=a.data.li.hasClass("directory"))?s:{directory:"file"},a.data.value=n.text(),a.data.rel=n.prop("rel"),a.data.container=i.container,l.preventLinkAction&&t.preventDefault(),n.parent().hasClass("directory")?n.parent().hasClass("collapsed")?(l.multiFolder||(n.parent().parent().find("UL").slideUp({duration:l.collapseSpeed,easing:l.collapseEasing}),n.parent().parent().find("LI.directory").removeClass("expanded").addClass("collapsed")),n.parent().removeClass("collapsed").addClass("expanded"),n.parent().find("UL").remove(),a.showTree(n.parent(),n.attr("rel"),function(){return a._trigger("filetreeexpanded",a.data),null!=r})):n.parent().find("UL").slideUp({duration:l.collapseSpeed,easing:l.collapseEasing,start:function(){return a._trigger("filetreecollapse",a.data)},complete:function(){return n.parent().removeClass("expanded").addClass("collapsed"),a._trigger("filetreecollapsed",a.data),null!=r}}):(l.multiSelect?n.parent().find("input").is(":checked")?(n.parent().find("input").prop("checked",!1),n.parent().removeClass("selected")):(n.parent().find("input").prop("checked",!0),n.parent().addClass("selected")):(i.container.find("li").removeClass("selected"),n.parent().addClass("selected")),a._trigger("filetreeclicked",a.data),"function"==typeof r?r(n.attr("rel")):void 0)},t.prototype.showTree=function(t,n,a){var r,i,l,s,o,d,p;return r=e(t),d=this.options,i=this,r.addClass("wait"),e(".jqueryFileTree.start").remove(),l={dir:n,onlyFolders:d.onlyFolders,onlyFiles:d.onlyFiles,multiSelect:d.multiSelect,params:d.params},o=function(t){var l;return r.find(".start").html(""),r.removeClass("wait").append(t),d.root===n?r.find("UL:hidden").show("undefined"!=typeof callback&&null!==callback):(void 0===jQuery.easing[d.expandEasing]&&(console.log("Easing library not loaded. Include jQueryUI or 3rd party lib."),d.expandEasing="swing"),r.find("UL:hidden").slideDown({duration:d.expandSpeed,easing:d.expandEasing,start:function(){return i._trigger("filetreeexpand",i.data)},complete:a})),l=e('[rel="'+decodeURIComponent(n)+'"]').parent(),d.multiSelect&&l.children("input").is(":checked")&&l.find("ul li input").each(function(){return e(this).prop("checked",!0),e(this).parent().addClass("selected")}),!1},s=function(){return r.find(".start").html(""),r.removeClass("wait").append("<p>"+d.errorMessage+"</p>"),!1},"function"==typeof d.script?(p=d.script(l),"string"==typeof p||p instanceof jQuery?o(p):s()):e.ajax({url:d.script,type:"POST",dataType:"HTML",data:l}).done(function(e){return o(e)}).fail(function(){return s()})},t.prototype._trigger=function(e,t){var n;return n=this.jqft.container,n.triggerHandler(e,t)},t}(),e.fn.extend({fileTree:function(t,a){return this.each(function(){var r,i;if(r=e(this),i=r.data("fileTree"),i||r.data("fileTree",i=new n(this,t,a)),"string"==typeof t)return i[option].apply(i)})}})}(window.jQuery,window);