diff --git a/css/elfinder.full.css b/css/elfinder.full.css index 01028bf9d..9fd510e1f 100644 --- a/css/elfinder.full.css +++ b/css/elfinder.full.css @@ -1,6 +1,6 @@ /*! * elFinder - file manager for web - * Version 2.1.6 (2.1-src Nightly: 2700893) (2016-01-25) + * Version 2.1.6 (2.1-src Nightly: f91ae3a) (2016-01-25) * http://elfinder.org * * Copyright 2009-2016, Studio 42 diff --git a/css/elfinder.min.css b/css/elfinder.min.css index bba1eb0ea..f77cf23a3 100644 --- a/css/elfinder.min.css +++ b/css/elfinder.min.css @@ -1,6 +1,6 @@ /*! * elFinder - file manager for web - * Version 2.1.6 (2.1-src Nightly: 2700893) (2016-01-25) + * Version 2.1.6 (2.1-src Nightly: f91ae3a) (2016-01-25) * http://elfinder.org * * Copyright 2009-2016, Studio 42 diff --git a/js/elfinder.full.js b/js/elfinder.full.js index f1937657d..ff470ca96 100644 --- a/js/elfinder.full.js +++ b/js/elfinder.full.js @@ -1,6 +1,6 @@ /*! * elFinder - file manager for web - * Version 2.1.6 (2.1-src Nightly: 2700893) (2016-01-25) + * Version 2.1.6 (2.1-src Nightly: f91ae3a) (2016-01-25) * http://elfinder.org * * Copyright 2009-2016, Studio 42 @@ -4768,7 +4768,7 @@ if (!Object.keys) { * * @type String **/ -elFinder.prototype.version = '2.1.6 (2.1-src Nightly: 2700893)'; +elFinder.prototype.version = '2.1.6 (2.1-src Nightly: f91ae3a)'; @@ -5037,6 +5037,10 @@ elFinder.prototype._options = { upload : { ui : 'uploadbutton' }, + // "download" command options. + download : { + maxRequests : 10 + }, // "quicklook" command options. quicklook : { autoplay : true, @@ -11449,6 +11453,7 @@ elFinder.prototype.commands.download = function() { this.getstate = function(sel) { var sel = this.hashes(sel), cnt = sel.length, + maxReq = this.options.maxRequests || 10, czipdl = fm.command('zipdl'), mixed = false, croot = ''; @@ -11463,7 +11468,7 @@ elFinder.prototype.commands.download = function() { } return (mixed || !czipdl || czipdl._disabled)? - (!this._disabled && cnt && ((!fm.UA.IE && !fm.UA.Mobile) || cnt == 1) && cnt == filter(sel).length ? 0 : -1) + (!this._disabled && cnt && cnt <= maxReq && ((!fm.UA.IE && !fm.UA.Mobile) || cnt == 1) && cnt == filter(sel).length ? 0 : -1) : (!this._disabled && cnt ? 0 : -1); }; diff --git a/js/elfinder.min.js b/js/elfinder.min.js index 70354b1a4..5a6302cfd 100644 --- a/js/elfinder.min.js +++ b/js/elfinder.min.js @@ -1,15 +1,15 @@ /*! * elFinder - file manager for web - * Version 2.1.6 (2.1-src Nightly: 2700893) (2016-01-25) + * Version 2.1.6 (2.1-src Nightly: f91ae3a) (2016-01-25) * http://elfinder.org * * Copyright 2009-2016, Studio 42 * Licensed under a 3 clauses BSD license */ !function(e){window.elFinder=function(t,n){var i,a,r,o=this,t=e(t),s=e("
").append(t.contents()),l=t.attr("style"),d=t.attr("id")||"",c="elfinder-"+(d||Math.random().toString().substr(2,7)),u="mousedown."+c,p="keydown."+c,h="keypress."+c,f=!0,m=!0,g="",v={path:"",url:"",tmbUrl:"",disabled:[],separator:"/",archives:[],extract:[],copyOverwrite:!0,uploadOverwrite:!0,uploadMaxSize:0,jpgQuality:100,tmb:!1},b={},y=[],w={},x={},k=[],C=[],T=[],I=new o.command(o),F="auto",S=400,z="./sounds/",M=e(document.createElement("audio")).hide().appendTo("body")[0],P="",D=function(t){var n,i,a={},r={};o.commandMap=t.options.uiCmdMap&&Object.keys(t.options.uiCmdMap).length?t.options.uiCmdMap:{},P!==JSON.stringify(o.commandMap)&&(P=JSON.stringify(o.commandMap),Object.keys(o.commandMap).length&&(i=o.getUI("contextmenu"),i.data("cmdMaps")||i.data("cmdMaps",{}),n=t.cwd?t.cwd.volumeid:null,n&&!i.data("cmdMaps")[n]&&(i.data("cmdMaps")[n]=o.commandMap))),t.init?b={}:(e.each(Object.keys(b),function(t,n){var i="directory"===b[n].mime,s=b[n].phash;o.res("class","navcollapse"),(!i||a[s]||!r[s]&&e("#"+o.navHash2Id(b[n].hash)).is(":hidden")&&e("#"+o.navHash2Id(s)).next(".elfinder-navbar-subtree").children().length>100)&&(i||s===g)&&-1===e.inArray(n,C)?(i&&!a[s]&&(a[s]=!0),delete b[n]):i&&(r[s]=!0)}),e.each(Object.keys(a),function(t,n){var i="elfinder-subtree-loaded "+o.res("class","navexpand");e("#"+o.navHash2Id(n)).removeClass(i).next(".elfinder-navbar-subtree").empty()})),g=t.cwd.hash,A(t.files),b[g]||A([t.cwd]),o.lastDir(g),o.autoSync()},A=function(e){var t,n,i=e.length;for(n=0;i>n;n++)if(t=e[n],t.name&&t.hash&&t.mime){if(!t.phash){var a="volume_"+t.name,r=o.i18n(a);a!=r&&(t.i18=r),t.volumeid&&(t.disabled&&(o.disabledCmds[t.volumeid]=t.disabled),t.tmbUrl&&(o.tmbUrls[t.volumeid]=t.tmbUrl),o.roots[t.volumeid]=t.hash)}b[t.hash]=t}},O=function(t){var n=t.keyCode,i=!(!t.ctrlKey&&!t.metaKey);f&&(e.each(x,function(e,a){a.type==t.type&&a.keyCode==n&&a.shiftKey==t.shiftKey&&a.ctrlKey==i&&a.altKey==t.altKey&&(t.preventDefault(),t.stopPropagation(),a.callback(t,o),o.debug("shortcut-exec",e+" : "+a.description))}),9!=n||e(t.target).is(":input")||t.preventDefault(),27==n&&o.clipboard().length&&o.clipboard([]))},U=new Date;return this.api=null,this.newAPI=!1,this.oldAPI=!1,this.netDrivers=[],this.OS=-1!==navigator.userAgent.indexOf("Mac")?"mac":-1!==navigator.userAgent.indexOf("Win")?"win":"other",this.UA=function(){var e=!document.uniqueID&&!window.opera&&!window.sidebar&&window.localStorage&&"undefined"==typeof window.orientation;return{ltIE6:"undefined"==typeof window.addEventListener&&"undefined"==typeof document.documentElement.style.maxHeight,ltIE7:"undefined"==typeof window.addEventListener&&"undefined"==typeof document.querySelectorAll,ltIE8:"undefined"==typeof window.addEventListener&&"undefined"==typeof document.getElementsByClassName,IE:document.uniqueID,Firefox:window.sidebar,Opera:window.opera,Webkit:e,Chrome:e&&window.chrome,Safari:e&&!window.chrome,Mobile:"undefined"!=typeof window.orientation,Touch:"undefined"!=typeof window.ontouchstart}}(),this.options=e.extend(!0,{},this._options,n||{}),n.ui&&(this.options.ui=n.ui),n.commands&&(this.options.commands=n.commands),n.uiOptions&&n.uiOptions.toolbar&&(this.options.uiOptions.toolbar=n.uiOptions.toolbar),n.uiOptions&&n.uiOptions.cwd&&n.uiOptions.cwd.listView&&n.uiOptions.cwd.listView.columns&&(this.options.uiOptions.cwd.listView.columns=n.uiOptions.cwd.listView.columns),n.uiOptions&&n.uiOptions.cwd&&n.uiOptions.cwd.listView&&n.uiOptions.cwd.listView.columnsCustomName&&(this.options.uiOptions.cwd.listView.columnsCustomName=n.uiOptions.cwd.listView.columnsCustomName),function(){var t,i=document.createElement("a");i.href=n.url,n.urlUpload&&n.urlUpload!==n.url&&(t=document.createElement("a"),t.href=n.urlUpload),(window.location.host!==i.host||t&&window.location.host!==t.host)&&(e.isPlainObject(o.options.customHeaders)||(o.options.customHeaders={}),e.isPlainObject(o.options.xhrFields)||(o.options.xhrFields={}),o.options.requestType="post",o.options.customHeaders["X-Requested-With"]="XMLHttpRequest",o.options.xhrFields.withCredentials=!0)}(),e.extend(this.options.contextmenu,n.contextmenu),this.requestType=/^(get|post)$/i.test(this.options.requestType)?this.options.requestType.toLowerCase():"get",this.customData=e.isPlainObject(this.options.customData)?this.options.customData:{},this.customHeaders=e.isPlainObject(this.options.customHeaders)?this.options.customHeaders:{},this.xhrFields=e.isPlainObject(this.options.xhrFields)?this.options.xhrFields:{},this.id=d,this.navPrefix="nav"+(elFinder.prototype.uniqueid?elFinder.prototype.uniqueid:"")+"-",this.cwdPrefix=elFinder.prototype.uniqueid?"cwd"+elFinder.prototype.uniqueid+"-":"",++elFinder.prototype.uniqueid,this.uploadURL=n.urlUpload||n.url,this.namespace=c,this.lang=this.i18[this.options.lang]&&this.i18[this.options.lang].messages?this.options.lang:"en",r="en"==this.lang?this.i18.en:e.extend(!0,{},this.i18.en,this.i18[this.lang]),this.direction=r.direction,this.messages=r.messages,this.dateFormat=this.options.dateFormat||r.dateFormat,this.fancyFormat=this.options.fancyDateFormat||r.fancyDateFormat,this.today=new Date(U.getFullYear(),U.getMonth(),U.getDate()).getTime()/1e3,this.yesterday=this.today-86400,a=this.options.UTCDate?"UTC":"",this.getHours="get"+a+"Hours",this.getMinutes="get"+a+"Minutes",this.getSeconds="get"+a+"Seconds",this.getDate="get"+a+"Date",this.getDay="get"+a+"Day",this.getMonth="get"+a+"Month",this.getFullYear="get"+a+"FullYear",this.cssClass="ui-helper-reset ui-helper-clearfix ui-widget ui-widget-content ui-corner-all elfinder elfinder-"+("rtl"==this.direction?"rtl":"ltr")+" "+this.options.cssClass,this.searchStatus={state:0,query:"",target:"",mime:""},this.storage=function(){try{return"localStorage"in window&&null!==window.localStorage?o.localStorage:o.cookie}catch(e){return o.cookie}}(),this.viewType=this.storage("view")||this.options.defaultView||"icons",this.sortType=this.storage("sortType")||this.options.sortType||"name",this.sortOrder=this.storage("sortOrder")||this.options.sortOrder||"asc",this.sortStickFolders=this.storage("sortStickFolders"),this.sortStickFolders=null===this.sortStickFolders?!!this.options.sortStickFolders:!!this.sortStickFolders,this.sortRules=e.extend(!0,{},this._sortRules,this.options.sortsRules),e.each(this.sortRules,function(e,t){"function"!=typeof t&&delete o.sortRules[e]}),this.compare=e.proxy(this.compare,this),this.notifyDelay=this.options.notifyDelay>0?parseInt(this.options.notifyDelay):500,this.draggingUiHelper=null,this.draggable={appendTo:"body",addClasses:!0,delay:30,distance:8,revert:!0,refreshPositions:!1,cursor:"crosshair",cursorAt:{left:50,top:47},start:function(t,n){var i,a,r=e.map(n.helper.data("files")||[],function(e){return e||null}),s=!1;for(o.draggingUiHelper=n.helper,i=r.length;i--;)if(a=r[i],b[a].locked){s=!0,n.helper.data("locked",!0);break}!s&&o.trigger("lockfiles",{files:r})},drag:function(t,n){var i=n.helper;i.data("refreshPositions")&&e(this).draggable("instance")&&(i.data("refreshPositions")>0?(e(this).draggable("option",{refreshPositions:!0}),i.data("refreshPositions",-1)):(e(this).draggable("option",{refreshPositions:!1}),i.data("refreshPositions",null)))},stop:function(t,n){var i;e(this).draggable("instance")&&e(this).draggable("option",{refreshPositions:!1}),o.draggingUiHelper=null,o.trigger("focus").trigger("dragstop"),n.helper.data("droped")||(i=e.map(n.helper.data("files")||[],function(e){return e||null}),o.trigger("unlockfiles",{files:i}),o.trigger("selectfiles",{files:i}))},helper:function(t){var n,i,a,r=this.id?e(this):e(this).parents("[id]:first"),s=e('| '+G.name+" | "+X()+"
| {0} | {1} | {2} |