summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-27 15:22:27 -0700
committerBharat Mediratta <bharat@menalto.com>2009-08-27 16:12:44 -0700
commit5db90d432de180b361b2160bc48cb7bafd6fdaf1 (patch)
tree650e536d182721c66575c561ebc0858730ad6f0b /lib
parent74363ced870d4114e7570729636875e0258917b3 (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')
-rw-r--r--lib/gallery.show_full_size.js14
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();
});