From b32d3a42b4f7a66c72af887ba88d30b64b8f175c Mon Sep 17 00:00:00 2001 From: pliablepixels Date: Sun, 21 Feb 2016 15:44:07 -0500 Subject: various updates Former-commit-id: 856f39b345da94a05658a5e5c1b749cacc9203b3 --- www/js/app.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'www/js/app.js') 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 -- cgit v1.2.3