Procházet zdrojové kódy

Merge pull request #451 from rashidkpc/master

added tip directive for defining question mark tooltips
Rashid Khan před 12 roky
rodič
revize
cd8009eccd
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      js/directives.js

+ 9 - 0
js/directives.js

@@ -20,6 +20,15 @@ angular.module('kibana.directives', [])
     }
   };
 })
+.directive('tip', function($compile) {
+  return {
+    restrict: 'E',
+    link: function(scope, elem, attrs) {
+      var _t = '<i class="icon-question-sign" bs-tooltip="\''+elem.text()+'\'"></i>';
+      elem.replaceWith($compile(angular.element(_t))(scope));
+    }
+  };
+})
 .directive('addPanel', function($compile) {
   return {
     restrict: 'A',