ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-843 Hack for popover show: debug
Date Mon, 14 Sep 2015 09:10:56 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-843 f89aae96d -> 3f0e13202


IGNITE-843 Hack for popover show: debug


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3f0e1320
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3f0e1320
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3f0e1320

Branch: refs/heads/ignite-843
Commit: 3f0e132021a0450988e7571c0b8193487eaad521
Parents: f89aae9
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Mon Sep 14 16:11:38 2015 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Mon Sep 14 16:11:38 2015 +0700

----------------------------------------------------------------------
 .../src/main/js/controllers/common-module.js    | 35 ++++++++++++--------
 1 file changed, 21 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3f0e1320/modules/control-center-web/src/main/js/controllers/common-module.js
----------------------------------------------------------------------
diff --git a/modules/control-center-web/src/main/js/controllers/common-module.js b/modules/control-center-web/src/main/js/controllers/common-module.js
index 2593a9b..e79254e 100644
--- a/modules/control-center-web/src/main/js/controllers/common-module.js
+++ b/modules/control-center-web/src/main/js/controllers/common-module.js
@@ -472,8 +472,6 @@ controlCenterModule.service('$common', [
             }
         }
 
-        var popoverShown = false;
-
         function showPopoverMessage(panels, panelId, id, message) {
             popoverShown = false;
 
@@ -486,21 +484,30 @@ controlCenterModule.service('$common', [
 
             var newPopover = $popover(el, {content: message});
 
-            function _showPopover() {
-                if (!popoverShown)
-                    $timeout(function () {
-                        if (isDefined(newPopover.$options.container)) {
-                            newPopover.show();
+            function findElement(query, element) {
+                return angular.element((element || document).querySelectorAll(query));
+            }
 
-                            popover = newPopover;
+            $timeout(function () {
+                var cont = newPopover.$options.container;
+
+                if (cont === 'self') {
+                    tipContainer = element;
+                } else if (angular.isElement(cont)) {
+                    tipContainer = cont;
+                } else if (cont) {
+                    tipContainer = findElement(cont);
+                }
+                else {
+                    console.log('AHTUNG: ' + cont);
+                }
 
-                            popoverShown = true;
-                        }
-                        else _showPopover();
-                    }, 100);
-            }
+                if (isDefined(newPopover.$options.container)) {
+                    newPopover.show();
 
-            _showPopover();
+                    popover = newPopover;
+                }
+            }, 100);
 
             $timeout(function () { newPopover.hide() }, 5000);
 


Mime
View raw message