From 83932ae9e511ebcf982abba04d48de2f7b51e193 Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Wed, 13 May 2015 13:35:43 -0400 Subject: [PATCH 1/2] Use tooltip plugin for title attributes --- awx/ui/static/js/shared/main.js | 4 +++- awx/ui/static/js/shared/title.directive.js | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 awx/ui/static/js/shared/title.directive.js diff --git a/awx/ui/static/js/shared/main.js b/awx/ui/static/js/shared/main.js index 84883eaf97..d49318bc7f 100644 --- a/awx/ui/static/js/shared/main.js +++ b/awx/ui/static/js/shared/main.js @@ -1,4 +1,6 @@ import listGenerator from './list-generator/main'; +import title from './title.directive'; export default - angular.module('shared', [listGenerator.name]); + angular.module('shared', [listGenerator.name]) + .directive('title', title); diff --git a/awx/ui/static/js/shared/title.directive.js b/awx/ui/static/js/shared/title.directive.js new file mode 100644 index 0000000000..0bdbfbe3e0 --- /dev/null +++ b/awx/ui/static/js/shared/title.directive.js @@ -0,0 +1,6 @@ +export default function() { + return function(scope, element, attrs) { + element.tooltip(); + }; +} + From 42dbe5f0b55bc90179c2490ca15d30a0ce6303bd Mon Sep 17 00:00:00 2001 From: Joe Fiorini Date: Thu, 14 May 2015 16:22:58 -0400 Subject: [PATCH 2/2] jshint fixes --- awx/ui/static/js/shared/title.directive.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/ui/static/js/shared/title.directive.js b/awx/ui/static/js/shared/title.directive.js index 0bdbfbe3e0..e8394d5824 100644 --- a/awx/ui/static/js/shared/title.directive.js +++ b/awx/ui/static/js/shared/title.directive.js @@ -1,3 +1,5 @@ +/* jshint unused: vars */ + export default function() { return function(scope, element, attrs) { element.tooltip();