summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-08-27 15:22:27 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-08-27 15:22:27 -0700
commit84b018b08ddbaac2fe5688cfbd6b007ea72c019c (patch)
treeb27919c8b43039349fe53e64c2cac3e902a7a562
parent56937cac5b00f1840e4d73dc840d015b80d75e41 (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
-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();
});