diff --git a/theme/classic.html b/theme/classic.html index fba1154..a9db090 100644 --- a/theme/classic.html +++ b/theme/classic.html @@ -633,48 +633,31 @@ function showthumbnails(obj) { + images = []; var files=document.getElementsByName('filelist'); for ($i=0;$i]; if (images.indexOf(ext)>-1) { if (document.getElementById('originalpic').checked==true) { var url=files[$i].href; url=url.substr(0,url.length-8); - get_thumbnails_url(url, str, files[$i], 0); + files[$i].parentNode.parentNode.innerHTML=''+str+''; + $i--; } else { var nurl=window.location.href; if (nurl.substr(-1)!="/") nurl+="/"; var url=nurl+str+'?thumbnails'; - get_thumbnails_url(url, str, files[$i], 1); + get_thumbnails_url(url, str, files[$i]); } } } obj.disabled='disabled'; } - /*function get_thumbnails_url(str, filea) { - if (!str) return; - var nurl=window.location.href; - if (nurl.substr(-1)!="/") nurl+="/"; - var xhr = new XMLHttpRequest(); - xhr.open("GET", nurl+str+'?thumbnails', true); - //xhr.setRequestHeader('x-requested-with','XMLHttpRequest'); - xhr.send(''); - xhr.onload = function(e){ - if (xhr.status==200) { - if (xhr.responseText!='') filea.innerHTML=''+str+''; - } else console.log(xhr.status+'\n'+xhr.responseText); - } - }*/ - function get_thumbnails_url(url, name, filea, thumb) { - if (!thumb) { - filea.parentNode.parentNode.innerHTML=''+name+''; - return; - } + function get_thumbnails_url(url, name, filea) { var xhr = new XMLHttpRequest(); xhr.open("GET", url, true); xhr.send('');