Quick view: fix for dialog actions

In some cases, clicking out of an overlayed dialog will cause an open
quick view to become stuck. This fixes via a new class 'hovered-elem'
which, when attached to any DOM element, will have its 'mouseleave'
triggered once the dialog is closed.
This commit is contained in:
Brian Federle 2012-10-09 11:51:01 -07:00
parent 33da9cb1e2
commit 65a526fa54
2 changed files with 8 additions and 1 deletions

View File

@ -435,6 +435,8 @@
$formContainer.remove();
$(this).dialog('destroy');
$('.hovered-elem').trigger('mouseleave');
return true;
}
},
@ -445,6 +447,8 @@
$('div.overlay').remove();
$formContainer.remove();
$(this).dialog('destroy');
$('.hovered-elem').trigger('mouseleave');
}
}
]
@ -513,6 +517,7 @@
$(this).dialog('destroy');
$('div.overlay').remove();
if (args.cancelAction) { args.cancelAction(); }
$('.hovered-elem').trigger('mouseleave');
}
},
{
@ -522,6 +527,7 @@
args.action();
$(this).dialog('destroy');
$('div.overlay').remove();
$('.hovered-elem').trigger('mouseleave');
}
}
]
@ -548,6 +554,7 @@
click: function() {
$(this).dialog('destroy');
if (args.clickAction) args.clickAction();
$('.hovered-elem').trigger('mouseleave');
}
}
]

View File

@ -1033,7 +1033,7 @@
$quickView.mouseover(
// Show quick view
function() {
var $quickViewTooltip = $('<div>').addClass('quick-view-tooltip');
var $quickViewTooltip = $('<div>').addClass('quick-view-tooltip hovered-elem');
var $tr = $quickView.closest('tr');
var $listView = $tr.closest('.list-view');
var $title = $('<div>').addClass('title');