Clicking on slideshow takes to next image
This commit is contained in:
@@ -946,9 +946,7 @@ function setup() {
|
|||||||
}
|
}
|
||||||
document.onkeydown=keypressed;
|
document.onkeydown=keypressed;
|
||||||
slideshowinterval=request('auto');
|
slideshowinterval=request('auto');
|
||||||
if (slideshowinterval!=0) {
|
if (slideshowinterval!=0) { slidenextrestart(); }
|
||||||
slideshowtimer=setInterval('slidenext()',1000*Math.abs(slideshowinterval));
|
|
||||||
}
|
|
||||||
fullscreen=request('full')==1;
|
fullscreen=request('full')==1;
|
||||||
originals=request('orig')==1;
|
originals=request('orig')==1;
|
||||||
request('sort');
|
request('sort');
|
||||||
@@ -984,13 +982,17 @@ function showbigimage(i) {
|
|||||||
if (fullscreen) { height=height+200; }
|
if (fullscreen) { height=height+200; }
|
||||||
if (originals) { mediumstr=encodeURIComponent(imagelist[i]); }
|
if (originals) { mediumstr=encodeURIComponent(imagelist[i]); }
|
||||||
else { mediumstr='_med/med_'+encodeURIComponent(imagelist[i])+'.jpg'; }
|
else { mediumstr='_med/med_'+encodeURIComponent(imagelist[i])+'.jpg'; }
|
||||||
|
var linkToBig = '<a class="linktobig" href="'+encodeURIComponent(imagelist[i])+'" target="_blank">';
|
||||||
|
if (slideshowinterval!=0) {
|
||||||
|
linkToBig = '<a class="linktobig" onclick="slidenextrestart()">';
|
||||||
|
}
|
||||||
if (isHTML(imagelist[i])) {
|
if (isHTML(imagelist[i])) {
|
||||||
$('#imagecontainer').html('<div id="imagebig"><a class="linktobig" href="'+encodeURIComponent(imagelist[i])+'" target="_blank">'+
|
$('#imagecontainer').html('<div id="imagebig">'+linkToBig+
|
||||||
'<iframe id="imagesingle" src="'+encodeURIComponent(imagelist[i])+'"></a></div>');
|
'<iframe id="imagesingle" src="'+encodeURIComponent(imagelist[i])+'"></a></div>');
|
||||||
$('#imagesingle').css('width',width);
|
$('#imagesingle').css('width',width);
|
||||||
$('#imagesingle').css('height',height);
|
$('#imagesingle').css('height',height);
|
||||||
} else { // is image
|
} else { // is image
|
||||||
$('#imagecontainer').html('<div id="imagebig"><a class="linktobig" href="'+encodeURIComponent(imagelist[i])+'" target="_blank">'+
|
$('#imagecontainer').html('<div id="imagebig">'+linkToBig+
|
||||||
'<img id="imagesingle" src="'+mediumstr+'"></a></div>');
|
'<img id="imagesingle" src="'+mediumstr+'"></a></div>');
|
||||||
$('#imagesingle').css('max-width',width);
|
$('#imagesingle').css('max-width',width);
|
||||||
$('#imagesingle').css('max-height',height);
|
$('#imagesingle').css('max-height',height);
|
||||||
@@ -1499,7 +1501,6 @@ function hidethumbs() {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function slidenext() {
|
function slidenext() {
|
||||||
var imgs=$('#preloadcontainer img').length;
|
var imgs=$('#preloadcontainer img').length;
|
||||||
var completed=preloadcheckcount();
|
var completed=preloadcheckcount();
|
||||||
@@ -1514,6 +1515,12 @@ function slidenext() {
|
|||||||
showimage(currentimage);
|
showimage(currentimage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function slidenextrestart() {
|
||||||
|
if (slideshowinterval==0) { showimage(currentimage); return; }
|
||||||
|
if (slideshowtimer) { clearInterval(slideshowtimer); }
|
||||||
|
slideshowtimer=setInterval('slidenext()',1000*Math.abs(slideshowinterval));
|
||||||
|
slidenext();
|
||||||
|
}
|
||||||
function slidesetupfromconfig() {
|
function slidesetupfromconfig() {
|
||||||
var el=$('#configSlideInterval')[0];
|
var el=$('#configSlideInterval')[0];
|
||||||
var newinterval=parseInt(el.value);
|
var newinterval=parseInt(el.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user