diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-27 15:37:18 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:28:27 -0700 |
commit | 5235c7a0b79d12305d99fdafe2710583f5368fcc (patch) | |
tree | ab8490f0c89a19ab80adea57e2c578c31561b7bd /lib/gallery.show_full_size.js | |
parent | 254feecd0af2da2bfb92ce3995ed65dcbebfd02b (diff) |
Allow clicking on the overlay to close the fullsize and remove some debug code
Diffstat (limited to 'lib/gallery.show_full_size.js')
-rw-r--r-- | lib/gallery.show_full_size.js | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 1f74e6e2..7e826c32 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -27,27 +27,22 @@ '<img id="gFullSizeImage" src="' + image_url + '"' + 'height="' + image_size.height + '" width="' + image_size.width + '"/></div>'); - //$("#gFullsize").append('<span id="gFullsizeClose" class="fg-button ui-icon ui-state-default ' + -// 'ui-icon-closethick ui-corner-all" style="z-index: 1003; position: absolute; ' + -// 'right: 1em; top: 1em;"></span>'); - $("#gFullsize").click(function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); - }); + $().click(function() { + $("#gFullsizeOverlay*").remove(); + $("#gFullsize").remove(); + }); $().bind("keypress", function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); - }); + $("#gFullsizeOverlay*").remove(); + $("#gFullsize").remove(); + }); $(window).resize(function() { - $("#gFullsizeOverlay").width($(document).width()) - .height($(document).height()); - image_size = $.gallery_auto_fit_window(image_width, image_height); - $("#gFullsize").height(image_size.height) - .width(image_size.width) - .css("top", image_size.top) - .css("left", image_size.left); - $("#gFullSizeImage").height(image_size.height) - .width(image_size.width); - }); + $("#gFullsizeOverlay").width($(document).width()).height($(document).height()); + image_size = $.gallery_auto_fit_window(image_width, image_height); + $("#gFullsize").height(image_size.height) + .width(image_size.width) + .css("top", image_size.top) + .css("left", image_size.left); + $("#gFullSizeImage").height(image_size.height).width(image_size.width); + }); }; })(jQuery); |