From 65a526fa542435b63de48946a6fc68e38eb89cc2 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Tue, 9 Oct 2012 11:51:01 -0700 Subject: [PATCH] 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. --- ui/scripts/ui/dialog.js | 7 +++++++ ui/scripts/ui/widgets/listView.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js index 7f4827d21c2..450da752476 100644 --- a/ui/scripts/ui/dialog.js +++ b/ui/scripts/ui/dialog.js @@ -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'); } } ] diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js index 369a1ca04a2..0be908a344a 100644 --- a/ui/scripts/ui/widgets/listView.js +++ b/ui/scripts/ui/widgets/listView.js @@ -1033,7 +1033,7 @@ $quickView.mouseover( // Show quick view function() { - var $quickViewTooltip = $('
').addClass('quick-view-tooltip'); + var $quickViewTooltip = $('
').addClass('quick-view-tooltip hovered-elem'); var $tr = $quickView.closest('tr'); var $listView = $tr.closest('.list-view'); var $title = $('
').addClass('title');