diff options
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/www/js/app.js b/www/js/app.js index dba5c28b..f18bbef6 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1,6 +1,6 @@ /* jshint -W041 */ /* jslint browser: true*/ -/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI */ +/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI, $*/ var appVersion = "0.0.0"; @@ -151,6 +151,26 @@ angular.module('zmApp', [ }) +.directive('tooltip', function () { + return { + restrict: 'C', + link: function (scope, element, attrs) { + if (attrs.title) { + var $element = $(element); + $element.attr("title", attrs.title); + $element.tooltipster({ + animation: attrs.animation, + trigger: "click", + position: "right", + positionTracker: true, + maxWidth: 500, + contentAsHTML: true + }); + } + } + }; +}) + //------------------------------------------------------------------ // I use this factory to share data between carousel and lazy load |
