new feature select all download
Hi i love your project, and im developing your project to, im add new feature! Download all Selected file This feature support for all browser. screenshot
I will happy if u using this code for your project!!
<button onClick="downloadAllSelected()">Download</button>
<script>
function downloadAllSelected() {
parent=$( "input:checked" ).closest("tr");
child=parent.find("a[title=Download]");
var a = child;
for (var i=0, iLen=a.length; i<iLen; i++) {
url = a[i].getAttribute("href");
akhir = url.substring(url.lastIndexOf('/')+1);
nama=akhir.substring(akhir.lastIndexOf('=')+1);
if ('download' in a[i]) {
a[i].download = nama;
}
if (a[i].click) {
a[i].click();
} else {
$(a[i]).click();
}
}
}
</script>
Looks nice, maybe you should open a PR for this feature.
The above code doesnt function in my web-installation under Plesk in a subdomain....? Bit i have the similar problem that its zips(tar's) only one folder of x selected - can You expand this script so far please... (except that it zips big folders only partially - max 1.2GB - under plesk)
At https://github.com/g7sim/cmsimple-XH-CL/blob/master/cmsimple/userfuncs.php You find an GPL3 - Algorythm for recursive file-zip or also https://learncodeweb.com/php/select-and-download-multi-files-in-zip-format-with-php/