summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-23 07:04:59 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-23 07:04:59 -0700
commita24d9d67a6d6ee0b976068880476e69b432b1406 (patch)
tree4ec404fcb21117bfce0c54a96fc32422d79183fc /lib
parent05275e2c07549ae9c40e647154fa442d796918b8 (diff)
parent7f066b34c9d965814c0a07a8f71e016edeb383d2 (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.common.js4
-rw-r--r--lib/gallery.show_full_size.js11
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 81904548..6e3efe5a 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -116,7 +116,7 @@
var in_progress = 0;
$(".gContextMenu *").removeAttr('title');
$(".gContextMenu ul").hide();
- $(".gContextMenu").hover(
+ $(".gContextMenu li").hover(
function() {
if (in_progress == 0) {
$(this).find("ul").slideDown("fast", function() { in_progress = 1; });
@@ -125,7 +125,7 @@
}
},
function() {
- $(this).find("ul").slideUp("slow", function() { in_progress = 0; });
+ $(this).find(".gContext").slideUp("slow", function() { in_progress = 0; });
}
);
}
diff --git a/lib/gallery.show_full_size.js b/lib/gallery.show_full_size.js
index 7e826c32..360ecdc2 100644
--- a/lib/gallery.show_full_size.js
+++ b/lib/gallery.show_full_size.js
@@ -15,7 +15,16 @@
'-moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; ' +
'-moz-background-inline-policy: -moz-initial; z-index: 1001;"> </div>');
- var image_size = $.gallery_auto_fit_window(image_width, image_height);
+ var image_size;
+ if (image_width >= size.width() - 6 || image_height >= size.height() - 6) {
+ image_size = $.gallery_auto_fit_window(image_width, image_height);
+ } else {
+ image_size = {
+ top: Number((height - image_height) / 2), left: Number((width - image_width) / 2),
+ width: Number(image_width), height: Number(image_height)
+ };
+ }
+
$("body").append('<div id="gFullsize" class="ui-dialog ui-widget" ' +
'style="overflow: hidden; display: block; ' +