From 267bc56c70b53e0ea298afc71fdcb2718769c894 Mon Sep 17 00:00:00 2001 From: Sanj Date: Thu, 6 Oct 2011 16:42:20 +0530 Subject: [PATCH 01/11] gallery --- itf/static/js/insidepage.js | 7 +++++++ itf/templates/modules/bestpractices/bestpractice.html | 2 +- itf/templates/noel/insidepage.html | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index a1232e8..4aa2680 100644 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -29,6 +29,13 @@ $('#listLeft ul li a').live("click", function() { }); +$('.thumbsDetails').live("click", function(e) { +// alert($(this).attr("data-bigimage")); + var bigImge = $(this).attr("data-bigimage"); + var $img = $('').attr("src", bigImage); + $('#lightboxContent').empty().append($img); +}); + $('.toggleNext').live("click", function(e) { e.preventDefault(); var $next = $(this).next(); diff --git a/itf/templates/modules/bestpractices/bestpractice.html b/itf/templates/modules/bestpractices/bestpractice.html index 4e20b6c..9463c14 100644 --- a/itf/templates/modules/bestpractices/bestpractice.html +++ b/itf/templates/modules/bestpractices/bestpractice.html @@ -22,7 +22,7 @@
{% for img in images %} {% thumbnail img.image "100x100" crop="center" as im %} - + {% endthumbnail %} {% endfor %}
diff --git a/itf/templates/noel/insidepage.html b/itf/templates/noel/insidepage.html index 1efb8ab..588ed84 100644 --- a/itf/templates/noel/insidepage.html +++ b/itf/templates/noel/insidepage.html @@ -15,6 +15,11 @@ {% block content %} +
From 21647a0044a854fdbe8dcff8d63df81eb518804e Mon Sep 17 00:00:00 2001 From: Sanj Date: Thu, 6 Oct 2011 16:48:42 +0530 Subject: [PATCH 02/11] default lightbox code --- itf/static/css/noel/inner.css | 32 ++++++++++++++++++++++++++++++ itf/static/js/insidepage.js | 7 ++++++- itf/templates/noel/insidepage.html | 6 +++--- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/itf/static/css/noel/inner.css b/itf/static/css/noel/inner.css index b27c579..a5464ed 100644 --- a/itf/static/css/noel/inner.css +++ b/itf/static/css/noel/inner.css @@ -374,3 +374,35 @@ border-radius:3px; #clearBoth {clear:both;} + + +/* Begin LightBox CSS */ + +#lightbox +{display:none; +background-color:#000; +opacity:0.9; +filter:alpha(opacity=90); +position:fixed; +top:0px; +left:0px; +bottom:0px; +right:0px; +width:100%; +height:100%; +z-index:1000;} /*everything except the lightbox panel should be below this z-index*/ + +#lightboxPanel { +display:none; +position:fixed; +top:200px; +left:0; +right:0; +margin:0 auto; +width:400px; +background-color:#FFF; +padding:15px; +z-index:1001;} /*must have the highest z-index, just more than the lightbox*/ + + +/* End LightBox CSS */ diff --git a/itf/static/js/insidepage.js b/itf/static/js/insidepage.js index 4aa2680..621862d 100644 --- a/itf/static/js/insidepage.js +++ b/itf/static/js/insidepage.js @@ -33,9 +33,11 @@ $('.thumbsDetails').live("click", function(e) { // alert($(this).attr("data-bigimage")); var bigImge = $(this).attr("data-bigimage"); var $img = $('').attr("src", bigImage); - $('#lightboxContent').empty().append($img); + $('#lightbox, #lightBoxPanel').fadeIn(400); + $('#lightBoxPanel').empty().append($img); }); + $('.toggleNext').live("click", function(e) { e.preventDefault(); var $next = $(this).next(); @@ -68,6 +70,9 @@ function getLi(item) { } $(function() { + $('#lightbox').click(function() { + $('#lightbox, #lightBoxPanel').fadeOut(400); + }); /* search button toggle */ $('.searchInnerField').hide(); diff --git a/itf/templates/noel/insidepage.html b/itf/templates/noel/insidepage.html index 588ed84..8177747 100644 --- a/itf/templates/noel/insidepage.html +++ b/itf/templates/noel/insidepage.html @@ -15,11 +15,11 @@ {% block content %} -