瀏覽代碼

refactor(): minor change

Torkel Ödegaard 10 年之前
父節點
當前提交
0cb68b86fc
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 5 0
      public/app/core/components/grafana_app.ts
  2. 0 5
      public/app/core/directives/body_class.js

+ 5 - 0
public/app/core/components/grafana_app.ts

@@ -158,6 +158,11 @@ export function grafanaAppDirective() {
         }
       });
 
+      // tooltip removal fix
+      scope.$on("$routeChangeSuccess", function() {
+        $("#tooltip, .tooltip").remove();
+      });
+
       // handle document clicks that should hide things
       elem.click(function(evt) {
         if ($(evt.target).parents().length === 0) {

+ 0 - 5
public/app/core/directives/body_class.js

@@ -12,11 +12,6 @@ function (_, $, coreModule) {
 
         var lastHideControlsVal;
 
-        // tooltip removal fix
-        $scope.$on("$routeChangeSuccess", function() {
-          $("#tooltip, .tooltip").remove();
-        });
-
         $scope.$watch('dashboard.hideControls', function() {
           if (!$scope.dashboard) {
             return;