ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject ranger git commit: RANGER-1558: Let UI Hints Popover stay open while mouse is on it
Date Wed, 10 May 2017 08:51:49 GMT
Repository: ranger
Updated Branches:
  refs/heads/master cfb6a6d70 -> 4f7519293


RANGER-1558: Let UI Hints Popover stay open while mouse is on it

Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/4f751929
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/4f751929
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/4f751929

Branch: refs/heads/master
Commit: 4f7519293b506340486e2bbdfa93adfb414da126
Parents: cfb6a6d
Author: ANNA SHAVERDIAN <ashaver@us.ibm.com>
Authored: Mon May 8 13:17:27 2017 -0700
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed May 10 09:51:40 2017 +0100

----------------------------------------------------------------------
 .../src/main/webapp/scripts/utils/XAUtils.js    | 24 +++++++++++++-------
 1 file changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/4f751929/security-admin/src/main/webapp/scripts/utils/XAUtils.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/utils/XAUtils.js b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
index 49d3741..08aa95a 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAUtils.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
@@ -175,17 +175,25 @@ define(function(require) {
 	};
    //	Search Info it give popover box
    XAUtils.searchInfoPopover = function(myArray, $infoEle, placement){
-            var msg = "<span> Wildcard searches ( for example using * or ? ) are not
currently supported.</span>";
+        var msg = "<span> Wildcard searches ( for example using * or ? ) are not currently
supported.</span>";
 		myArray.map(function(m){
                    msg += '<div><span><b>'+m.text+' : </b></span><span>'+m.info+'</span></div>'
                 });
-        $infoEle.popover({
-           content: msg,
-           html: true,
-           trigger: 'hover',
-           placement: placement,
-           container: 'body'
-        });
+        $infoEle.popover({ trigger: "manual" , html: true, animation:false, content: msg,
container:'body', placement: placement})
+                           .on("mouseenter", function () {
+                               var _this = this;
+                               $(this).popover("show");
+                               $(".popover").on("mouseleave", function () {
+                                   $(_this).popover('hide');
+                               });
+                           }).on("mouseleave", function () {
+                               var _this = this;
+                               setTimeout(function () {
+                                   if (!$(".popover:hover").length) {
+                                       $(_this).popover("hide");
+                                   }
+                               }, 300);
+               });
    };
 
 


Mime
View raw message