diff options
author | jhilden <jakobhilden@gmail.com> | 2009-08-28 11:27:38 -0400 |
---|---|---|
committer | jhilden <jakobhilden@gmail.com> | 2009-08-28 11:27:38 -0400 |
commit | c0c65c6fcc971b1ea9c0afb75854aec502591d56 (patch) | |
tree | 4b10c7011056002cdeb41fac215e5c608278333c /lib | |
parent | 3d2e36f5b601b5a274efd0c55bf161448409682a (diff) | |
parent | 826e104fa98eca33afd8cb59ebf8123021145609 (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gallery.show_full_size.js | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 2f365f0d..7e826c32 100644 --- a/lib/gallery.show_full_size.js +++ b/lib/gallery.show_full_size.js @@ -10,7 +10,7 @@ $("body").append('<div id="gFullsizeOverlay" class="ui-dialog-overlay" ' + 'style="border: none; margin: 0; padding: 0; background-color: #000; ' + 'position: absolute; top: 0px; left: 0px; ' + - 'width: ' + size.width() + 'px; height: ' + size.height() + 'px;' + + 'width: ' + width + 'px; height: ' + height + 'px;' + ' opacity: 0.7; filter: alpha(opacity=70);' + '-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; ' + '-moz-background-inline-policy: -moz-initial; z-index: 1001;"> </div>'); @@ -27,23 +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>'); - $("#gFullsizeClose").click(function() { - $("#gFullsizeOverlay*").remove(); - $("#gFullsize").remove(); - }); + $().click(function() { + $("#gFullsizeOverlay*").remove(); + $("#gFullsize").remove(); + }); + $().bind("keypress", function() { + $("#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); |