mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-30 02:46:19 -04:00
Don't try to initialize contextual menu unless it has items
This commit is contained in:
+16
-14
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user