diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-22 05:35:21 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-22 05:35:21 -0700 |
commit | 05275e2c07549ae9c40e647154fa442d796918b8 (patch) | |
tree | cf287cfb40ce35b9dc7cb8de2d073be0ed788f94 /lib/gallery.common.js | |
parent | dd31b1d39f9a342afc82cc7e446e36454a882cf9 (diff) | |
parent | 22296907b77a00aa28e174b6e0231faed7c10fcd (diff) |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r-- | lib/gallery.common.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js index c6a619c1..81904548 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -112,21 +112,23 @@ }; $.fn.gallery_context_menu = function() { - var in_progress = 0; - $(".gContextMenu *").removeAttr('title'); - $(".gContextMenu ul").hide(); - $(".gContextMenu").hover( - function() { - if (in_progress == 0) { - $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); - $(this).find(".gDialogLink").gallery_dialog(); - $(this).find(".gAjaxLink").gallery_ajax(); + if ($(".gContextMenu li").length) { + var in_progress = 0; + $(".gContextMenu *").removeAttr('title'); + $(".gContextMenu ul").hide(); + $(".gContextMenu").hover( + function() { + if (in_progress == 0) { + $(this).find("ul").slideDown("fast", function() { in_progress = 1; }); + $(this).find(".gDialogLink").gallery_dialog(); + $(this).find(".gAjaxLink").gallery_ajax(); + } + }, + function() { + $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); } - }, - function() { - $(this).find("ul").slideUp("slow", function() { in_progress = 0; }); - } - ); + ); + } }; $.gallery_auto_fit_window = function(imageWidth, imageHeight) { |