including HTML as images. creates an IFRAME for them..

This commit is contained in:
ville rantanen
2012-06-28 12:58:43 +03:00
parent 0ad99353f2
commit 7417e76587
2 changed files with 36 additions and 5 deletions

View File

@@ -984,14 +984,22 @@ function showbigimage(i) {
if (fullscreen) { height=height+200; }
if (originals) { mediumstr=encodeURIComponent(imagelist[i]); }
else { mediumstr='_med/med_'+encodeURIComponent(imagelist[i])+'.jpg'; }
$('#imagecontainer').html('<div id="imagebig"><a class="linktobig" href="'+encodeURIComponent(imagelist[i])+'" target="_blank">'+
if (isHTML(imagelist[i])) {
$('#imagecontainer').html('<div id="imagebig"><a class="linktobig" href="'+encodeURIComponent(imagelist[i])+'" target="_blank">'+
'<iframe id="imagesingle" src="'+encodeURIComponent(imagelist[i])+'"></a></div>');
$('#imagesingle').css('width',width);
$('#imagesingle').css('height',height);
} else { // is image
$('#imagecontainer').html('<div id="imagebig"><a class="linktobig" href="'+encodeURIComponent(imagelist[i])+'" target="_blank">'+
'<img id="imagesingle" src="'+mediumstr+'"></a></div>');
$('#imagesingle').css('max-width',width);
$('#imagesingle').css('max-width',width);
$('#imagesingle').css('max-height',height);
}
$('#imagecontainer').css('height',height);
$('#imagesingle').css('max-height',height);
$('#desccontainer').html(getProgressEl()+currentlink(i)+imagedesc[i]);
$('#desccontainer').css('display','block');
if (zoom) {
if (zoom & !isHTML(imagelist[i])) {
$(document).ready(function() {
var options = {
@@ -1450,6 +1458,10 @@ function getmaxthumbs() {
return Math.floor((document.body.clientWidth-30)/100)-2;
}
function isHTML(s) {
return s.match(/html$/i);
}
function hidethumbs() {
// hide all thumbnails (obsolete)
if (notsupported()) {