From d09ac6b0e5a33a33a3d784c2fb847d9db75425de Mon Sep 17 00:00:00 2001 From: j Date: Tue, 11 Oct 2011 18:12:00 +0530 Subject: [PATCH] test image captions --- itf/static/js/insidepage.js | 7 +++++-- itf/templates/modules/bestpractices/bestpractice.html | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index 4abe1c4..d4338a1 100755 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -32,9 +32,12 @@ $('#listLeft ul li a').live("click", function() { $('.thumbsDetails').live("click", function(e) { // alert($(this).attr("data-bigimage")); var bigImage = $(this).attr("data-bigimage"); - var $img = $('').attr("src", bigImage); + var $img = $('').attr("src", bigImage); $('#lightbox, #lightboxPanel').fadeIn(400); - $('#lightboxPanel').empty().append($img); + $('#lightboxPanel').empty().append($img); + if ($(this).hasAttr("title")) { + var $caption = $('
').addClass("lightboxCaption").text($(this).attr("title")).appendTo($('#lightBoxPanel')); + } }); diff --git a/itf/templates/modules/bestpractices/bestpractice.html b/itf/templates/modules/bestpractices/bestpractice.html index 2389510..685d3c9 100755 --- a/itf/templates/modules/bestpractices/bestpractice.html +++ b/itf/templates/modules/bestpractices/bestpractice.html @@ -12,7 +12,7 @@
{% for img in images %} {% thumbnail img.image "164x114" crop="center" as im %} - + {% endthumbnail %} {% endfor %}