diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-08-27 15:22:27 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-08-27 16:28:22 -0700 |
commit | 254feecd0af2da2bfb92ce3995ed65dcbebfd02b (patch) | |
tree | 650e536d182721c66575c561ebc0858730ad6f0b /lib/gallery.show_full_size.js | |
parent | 93138f6ae78fd5ef11ea5095156827592f61bc56 (diff) |
Fix ticket #644
1) remove close button
2) extend the grey overlay to the document size
3) allow any keypress to close the fullize image
4) click on the fullsize will close
Diffstat (limited to 'lib/gallery.show_full_size.js')
-rw-r--r-- | lib/gallery.show_full_size.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js index 2f365f0d..1f74e6e2 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,10 +27,14 @@ '<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() { + //$("#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(); + }); + $().bind("keypress", function() { $("#gFullsizeOverlay*").remove(); $("#gFullsize").remove(); }); |