diff --git a/css/jQueryFileTree.min.css b/css/jQueryFileTree.min.css new file mode 100644 index 0000000..b2a349c --- /dev/null +++ b/css/jQueryFileTree.min.css @@ -0,0 +1 @@ +UL.jqueryFileTree{font-family:Verdana,sans-serif;font-size:11px;line-height:18px;padding:0;margin:0;display:none}UL.jqueryFileTree LI{list-style:none;padding:0 0 0 20px;margin:0;white-space:nowrap}UL.jqueryFileTree LI.directory{background:url(jqfileImages/directory.png) left top no-repeat}UL.jqueryFileTree LI.directory-locked{background:url(jqfileImages/directory-lock.png) left top no-repeat}UL.jqueryFileTree LI.expanded{background:url(jqfileImages/folder_open.png) left top no-repeat}UL.jqueryFileTree LI.file{background:url(jqfileImages/file.png) left top no-repeat}UL.jqueryFileTree LI.file-locked{background:url(jqfileImages/file-lock.png) left top no-repeat!important}UL.jqueryFileTree LI.wait{background:url(jqfileImages/spinner.gif) left top no-repeat}UL.jqueryFileTree LI.selected>a{font-weight:700}UL.jqueryFileTree LI.ext_3gp{background:url(jqfileImages/film.png) left top no-repeat}UL.jqueryFileTree LI.ext_afp,UL.jqueryFileTree LI.ext_afpa,UL.jqueryFileTree LI.ext_asp,UL.jqueryFileTree LI.ext_aspx{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_avi{background:url(jqfileImages/film.png) left top no-repeat}UL.jqueryFileTree LI.ext_bat{background:url(jqfileImages/application.png) left top no-repeat}UL.jqueryFileTree LI.ext_bmp{background:url(jqfileImages/picture.png) left top no-repeat}UL.jqueryFileTree LI.ext_c,UL.jqueryFileTree LI.ext_cfm,UL.jqueryFileTree LI.ext_cgi{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_com{background:url(jqfileImages/application.png) left top no-repeat}UL.jqueryFileTree LI.ext_cpp{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_css{background:url(jqfileImages/css.png) left top no-repeat}UL.jqueryFileTree LI.ext_doc{background:url(jqfileImages/doc.png) left top no-repeat}UL.jqueryFileTree LI.ext_exe{background:url(jqfileImages/application.png) left top no-repeat}UL.jqueryFileTree LI.ext_gif{background:url(jqfileImages/picture.png) left top no-repeat}UL.jqueryFileTree LI.ext_fla{background:url(jqfileImages/flash.png) left top no-repeat}UL.jqueryFileTree LI.ext_h{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_htm,UL.jqueryFileTree LI.ext_html{background:url(jqfileImages/html.png) left top no-repeat}UL.jqueryFileTree LI.ext_jar{background:url(jqfileImages/java.png) left top no-repeat}UL.jqueryFileTree LI.ext_jpeg,UL.jqueryFileTree LI.ext_jpg{background:url(jqfileImages/picture.png) left top no-repeat}UL.jqueryFileTree LI.ext_js{background:url(jqfileImages/script.png) left top no-repeat}UL.jqueryFileTree LI.ext_lasso{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_log{background:url(jqfileImages/txt.png) left top no-repeat}UL.jqueryFileTree LI.ext_m4p{background:url(jqfileImages/music.png) left top no-repeat}UL.jqueryFileTree LI.ext_mov{background:url(jqfileImages/film.png) left top no-repeat}UL.jqueryFileTree LI.ext_mp3{background:url(jqfileImages/music.png) left top no-repeat}UL.jqueryFileTree LI.ext_mp4,UL.jqueryFileTree LI.ext_mpeg,UL.jqueryFileTree LI.ext_mpg{background:url(jqfileImages/film.png) left top no-repeat}UL.jqueryFileTree LI.ext_ogg{background:url(jqfileImages/music.png) left top no-repeat}UL.jqueryFileTree LI.ext_ogv{background:url(jqfileImages/film.png) left top no-repeat}UL.jqueryFileTree LI.ext_pcx{background:url(jqfileImages/picture.png) left top no-repeat}UL.jqueryFileTree LI.ext_pdf{background:url(jqfileImages/pdf.png) left top no-repeat}UL.jqueryFileTree LI.ext_php{background:url(jqfileImages/php.png) left top no-repeat}UL.jqueryFileTree LI.ext_png{background:url(jqfileImages/picture.png) left top no-repeat}UL.jqueryFileTree LI.ext_ppt{background:url(jqfileImages/ppt.png) left top no-repeat}UL.jqueryFileTree LI.ext_psd{background:url(jqfileImages/psd.png) left top no-repeat}UL.jqueryFileTree LI.ext_pl,UL.jqueryFileTree LI.ext_py{background:url(jqfileImages/script.png) left top no-repeat}UL.jqueryFileTree LI.ext_rb,UL.jqueryFileTree LI.ext_rbx,UL.jqueryFileTree LI.ext_rhtml{background:url(jqfileImages/ruby.png) left top no-repeat}UL.jqueryFileTree LI.ext_rpm{background:url(jqfileImages/linux.png) left top no-repeat}UL.jqueryFileTree LI.ext_ruby{background:url(jqfileImages/ruby.png) left top no-repeat}UL.jqueryFileTree LI.ext_sql{background:url(jqfileImages/db.png) left top no-repeat}UL.jqueryFileTree LI.ext_swf{background:url(jqfileImages/flash.png) left top no-repeat}UL.jqueryFileTree LI.ext_tif,UL.jqueryFileTree LI.ext_tiff{background:url(jqfileImages/picture.png) left top no-repeat}UL.jqueryFileTree LI.ext_txt{background:url(jqfileImages/txt.png) left top no-repeat}UL.jqueryFileTree LI.ext_vb{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_wav{background:url(jqfileImages/music.png) left top no-repeat}UL.jqueryFileTree LI.ext_webm,UL.jqueryFileTree LI.ext_wmv{background:url(jqfileImages/film.png) left top no-repeat}UL.jqueryFileTree LI.ext_xls{background:url(jqfileImages/xls.png) left top no-repeat}UL.jqueryFileTree LI.ext_xml{background:url(jqfileImages/code.png) left top no-repeat}UL.jqueryFileTree LI.ext_zip{background:url(jqfileImages/zip.png) left top no-repeat}UL.jqueryFileTree A{color:#333;text-decoration:none;display:inline-block;padding:0 2px;cursor:pointer}UL.jqueryFileTree A:hover{background:#BDF} diff --git a/css/jqfileImages/application.png b/css/jqfileImages/application.png new file mode 100755 index 0000000..1dee9e3 Binary files /dev/null and b/css/jqfileImages/application.png differ diff --git a/css/jqfileImages/code.png b/css/jqfileImages/code.png new file mode 100755 index 0000000..0c76bd1 Binary files /dev/null and b/css/jqfileImages/code.png differ diff --git a/css/jqfileImages/css.png b/css/jqfileImages/css.png new file mode 100755 index 0000000..f907e44 Binary files /dev/null and b/css/jqfileImages/css.png differ diff --git a/css/jqfileImages/db.png b/css/jqfileImages/db.png new file mode 100755 index 0000000..bddba1f Binary files /dev/null and b/css/jqfileImages/db.png differ diff --git a/css/jqfileImages/directory-lock.png b/css/jqfileImages/directory-lock.png new file mode 100644 index 0000000..211697d Binary files /dev/null and b/css/jqfileImages/directory-lock.png differ diff --git a/css/jqfileImages/directory.png b/css/jqfileImages/directory.png new file mode 100755 index 0000000..784e8fa Binary files /dev/null and b/css/jqfileImages/directory.png differ diff --git a/css/jqfileImages/doc.png b/css/jqfileImages/doc.png new file mode 100755 index 0000000..ae8ecbf Binary files /dev/null and b/css/jqfileImages/doc.png differ diff --git a/css/jqfileImages/file-lock.png b/css/jqfileImages/file-lock.png new file mode 100644 index 0000000..e909cf8 Binary files /dev/null and b/css/jqfileImages/file-lock.png differ diff --git a/css/jqfileImages/file.png b/css/jqfileImages/file.png new file mode 100755 index 0000000..8b8b1ca Binary files /dev/null and b/css/jqfileImages/file.png differ diff --git a/css/jqfileImages/film.png b/css/jqfileImages/film.png new file mode 100755 index 0000000..b0ce7bb Binary files /dev/null and b/css/jqfileImages/film.png differ diff --git a/css/jqfileImages/flash.png b/css/jqfileImages/flash.png new file mode 100755 index 0000000..5769120 Binary files /dev/null and b/css/jqfileImages/flash.png differ diff --git a/css/jqfileImages/folder_open.png b/css/jqfileImages/folder_open.png new file mode 100755 index 0000000..4e35483 Binary files /dev/null and b/css/jqfileImages/folder_open.png differ diff --git a/css/jqfileImages/html.png b/css/jqfileImages/html.png new file mode 100755 index 0000000..6ed2490 Binary files /dev/null and b/css/jqfileImages/html.png differ diff --git a/css/jqfileImages/java.png b/css/jqfileImages/java.png new file mode 100755 index 0000000..b7bfcd1 Binary files /dev/null and b/css/jqfileImages/java.png differ diff --git a/css/jqfileImages/linux.png b/css/jqfileImages/linux.png new file mode 100755 index 0000000..52699bf Binary files /dev/null and b/css/jqfileImages/linux.png differ diff --git a/css/jqfileImages/music.png b/css/jqfileImages/music.png new file mode 100755 index 0000000..a8b3ede Binary files /dev/null and b/css/jqfileImages/music.png differ diff --git a/css/jqfileImages/pdf.png b/css/jqfileImages/pdf.png new file mode 100755 index 0000000..8f8095e Binary files /dev/null and b/css/jqfileImages/pdf.png differ diff --git a/css/jqfileImages/php.png b/css/jqfileImages/php.png new file mode 100755 index 0000000..7868a25 Binary files /dev/null and b/css/jqfileImages/php.png differ diff --git a/css/jqfileImages/picture.png b/css/jqfileImages/picture.png new file mode 100755 index 0000000..4a158fe Binary files /dev/null and b/css/jqfileImages/picture.png differ diff --git a/css/jqfileImages/ppt.png b/css/jqfileImages/ppt.png new file mode 100755 index 0000000..c4eff03 Binary files /dev/null and b/css/jqfileImages/ppt.png differ diff --git a/css/jqfileImages/psd.png b/css/jqfileImages/psd.png new file mode 100755 index 0000000..73c5b3f Binary files /dev/null and b/css/jqfileImages/psd.png differ diff --git a/css/jqfileImages/ruby.png b/css/jqfileImages/ruby.png new file mode 100755 index 0000000..f59b7c4 Binary files /dev/null and b/css/jqfileImages/ruby.png differ diff --git a/css/jqfileImages/script.png b/css/jqfileImages/script.png new file mode 100755 index 0000000..63fe6ce Binary files /dev/null and b/css/jqfileImages/script.png differ diff --git a/css/jqfileImages/spinner.gif b/css/jqfileImages/spinner.gif new file mode 100755 index 0000000..85b99d4 Binary files /dev/null and b/css/jqfileImages/spinner.gif differ diff --git a/css/jqfileImages/txt.png b/css/jqfileImages/txt.png new file mode 100755 index 0000000..813f712 Binary files /dev/null and b/css/jqfileImages/txt.png differ diff --git a/css/jqfileImages/xls.png b/css/jqfileImages/xls.png new file mode 100755 index 0000000..b977d7e Binary files /dev/null and b/css/jqfileImages/xls.png differ diff --git a/css/jqfileImages/zip.png b/css/jqfileImages/zip.png new file mode 100755 index 0000000..fd4bbcc Binary files /dev/null and b/css/jqfileImages/zip.png differ diff --git a/js/jQueryFileTree.min.js b/js/jQueryFileTree.min.js new file mode 100644 index 0000000..35b874a --- /dev/null +++ b/js/jQueryFileTree.min.js @@ -0,0 +1 @@ +var bind=function(e,t){return function(){return e.apply(t,arguments)}};!function(e,t){var n;return n=function(){function t(t,n,r){this.onEvent=bind(this.onEvent,this);var a,i,l;a=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},this.jqft={container:a},this.options=e.extend(l,n),this.callback=r,this.data={},a.html('"),i.showTree(a,escape(this.options.root),function(){return i._trigger("filetreeinitiated",{})}),a.delegate("li a",this.options.folderEvent,i.onEvent)}return t.prototype.onEvent=function(t){var n,r,a,i,l,s;return n=e(t.target),l=this.options,i=this.jqft,r=this,a=this.callback,r.data={},r.data.li=n.closest("li"),r.data.type=null!=(s=r.data.li.hasClass("directory"))?s:{directory:"file"},r.data.value=n.text(),r.data.rel=n.prop("rel"),r.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(),r.showTree(n.parent(),n.attr("rel"),function(){return r._trigger("filetreeexpanded",r.data),null!=a})):n.parent().find("UL").slideUp({duration:l.collapseSpeed,easing:l.collapseEasing,start:function(){return r._trigger("filetreecollapse",r.data)},complete:function(){return n.parent().removeClass("expanded").addClass("collapsed"),r._trigger("filetreecollapsed",r.data),null!=a}}):(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")),r._trigger("filetreeclicked",r.data),"function"==typeof a?a(n.attr("rel")):void 0)},t.prototype.showTree=function(t,n,r){var a,i,l,s,o,d,p;return a=e(t),d=this.options,i=this,a.addClass("wait"),e(".jqueryFileTree.start").remove(),l={dir:n,onlyFolders:d.onlyFolders,onlyFiles:d.onlyFiles,multiSelect:d.multiSelect},o=function(t){var l;return a.find(".start").html(""),a.removeClass("wait").append(t),d.root===n?a.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"),a.find("UL:hidden").slideDown({duration:d.expandSpeed,easing:d.expandEasing,start:function(){return i._trigger("filetreeexpand",i.data)},complete:r})),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 a.find(".start").html(""),a.removeClass("wait").append("

"+d.errorMessage+"

"),!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,r){return this.each(function(){var a,i;return a=e(this),i=a.data("fileTree"),i||a.data("fileTree",i=new n(this,t,r)),"string"==typeof t?i[option].apply(i):void 0})}})}(window.jQuery,window); \ No newline at end of file