From 5987e956a368f3324db364fe219b80c0c9c704d0 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 14 Dec 2011 02:57:45 +0530 Subject: [PATCH] image gallery sizing done --- itf/static/js/insidepage.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index d4a50f2..922a369 100755 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -76,7 +76,13 @@ $('.thumbsDetails').live("click", function(e) { $lbox.height(lightboxHeight); var viewportWidth = $(window).width(); var viewportHeight = $(window).height(); - //FIXME: Add conditionals for if image bigger than viewport + if (viewportHeight < lightboxHeight) { + $lbox.height(viewportHeight - 40); + } + var lightboxTop = parseInt((viewportHeight - $lbox.height()) / 2); + $lbox.css({'top': lightboxTop + "px"}); + + // showLightbox($img); var title = $(this).hasAttr("title") ? $(this).attr("title") : '';