Progress bar for allthumbs and allmeds
This commit is contained in:
@@ -1199,6 +1199,22 @@ function getThumbStartEnd(n,maxThumb) {
|
|||||||
return {first: startI, last: endI}
|
return {first: startI, last: endI}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function allprogress() {
|
||||||
|
var imgs=document.images;
|
||||||
|
var completed=0;
|
||||||
|
for (i=0;i<imgs.length;i++) {
|
||||||
|
if (imgs[i].complete) { completed++; }
|
||||||
|
}
|
||||||
|
if (imgs.length==completed) {
|
||||||
|
$('#imagecontainer').html('');
|
||||||
|
$('#imagecontainer').css('height',0);
|
||||||
|
clearInterval($('#imagecontainer').data('preloaded'));
|
||||||
|
} else {
|
||||||
|
setProgress(completed);
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
function allthumbs() {
|
function allthumbs() {
|
||||||
// Shows all the thumbnails in the current folder
|
// Shows all the thumbnails in the current folder
|
||||||
thumbstr='<div id="thumbrow">';
|
thumbstr='<div id="thumbrow">';
|
||||||
@@ -1207,10 +1223,11 @@ function allthumbs() {
|
|||||||
}
|
}
|
||||||
thumbstr+='</div>';
|
thumbstr+='</div>';
|
||||||
$('#thumbcontainer').html(thumbstr);
|
$('#thumbcontainer').html(thumbstr);
|
||||||
$('#imagecontainer').html('');
|
$('#imagecontainer').html(getProgressEl());
|
||||||
$('#imagecontainer').css('height',0);
|
$('#imagecontainer').css('height',15);
|
||||||
$('#desccontainer').hide();
|
$('#desccontainer').hide();
|
||||||
currentimage=-1;
|
currentimage=-1;
|
||||||
|
$('#imagecontainer').data('preloaded',setInterval('allprogress()', 200));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1222,14 +1239,15 @@ function allmediums() {
|
|||||||
}
|
}
|
||||||
thumbstr+='</div>';
|
thumbstr+='</div>';
|
||||||
$('#thumbcontainer').html(thumbstr);
|
$('#thumbcontainer').html(thumbstr);
|
||||||
$('#imagecontainer').html('');
|
$('#imagecontainer').html(getProgressEl());
|
||||||
$('#imagecontainer').css('height',0);
|
$('#imagecontainer').css('height',15);
|
||||||
$('#desccontainer').hide();
|
$('#desccontainer').hide();
|
||||||
for (i=0; i<imagelist.length; i++) {
|
for (i=0; i<imagelist.length; i++) {
|
||||||
$('#img'+i).css('max-height',document.body.clientHeight);
|
$('#img'+i).css('max-height',document.body.clientHeight);
|
||||||
$('#img'+i).css('max-width',document.body.clientWidth);
|
$('#img'+i).css('max-width',document.body.clientWidth);
|
||||||
}
|
}
|
||||||
currentimage=-1;
|
currentimage=-1;
|
||||||
|
$('#imagecontainer').data('preloaded',setInterval('allprogress()', 200));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user