incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/3] git commit: Quick view: fix for dialog actions
Date Wed, 10 Oct 2012 18:18:11 GMT
Updated Branches:
  refs/heads/master a5edef06c -> 65a526fa5


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.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/65a526fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/65a526fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/65a526fa

Branch: refs/heads/master
Commit: 65a526fa542435b63de48946a6fc68e38eb89cc2
Parents: 33da9cb
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Oct 9 11:51:01 2012 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Wed Oct 10 11:18:03 2012 -0700

----------------------------------------------------------------------
 ui/scripts/ui/dialog.js           |    7 +++++++
 ui/scripts/ui/widgets/listView.js |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/65a526fa/ui/scripts/ui/dialog.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/dialog.js b/ui/scripts/ui/dialog.js
index 7f4827d..450da75 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');
             }
           }
         ]

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/65a526fa/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 369a1ca..0be908a 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 = $('<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');


Mime
View raw message