← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21146: replaced element with element[0] while calling the callback function

 

------------------------------------------------------------
revno: 21146
committer: Jiju K Jose <jijukjose@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-11-20 14:57:13 +0100
message:
  replaced element with element[0] while calling the callback function
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js	2015-10-23 15:42:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.angular.directives.js	2015-11-20 13:57:13 +0000
@@ -77,6 +77,11 @@
 
     return {
         restrict: 'EA',
+        scope: {
+            content: '=',
+            title: '@details',
+            template: "@template"
+        },
         link: function (scope, element, attrs) {
             var content = $templateCache.get("popover.html");
             content = $compile(content)(scope);
@@ -87,12 +92,8 @@
                 html: true,
                 title: scope.title
             };
-            $(element).popover(options);
-        },
-        scope: {
-            content: '=',
-            title: '@details',
-            template: "@template"
+            $(element)[0].popover(options);
+
         }
     };
 })