From 1ddbdffdb957992e1a32d001c5583de46e154662 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 25 Jan 2015 18:22:19 +0100 Subject: Break client side plugin API to combat limitations that make it hard to impossible to get the DOM element --- js/directive/NewsArticleActions.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'js/directive') diff --git a/js/directive/NewsArticleActions.js b/js/directive/NewsArticleActions.js index b3468413f..daece216a 100644 --- a/js/directive/NewsArticleActions.js +++ b/js/directive/NewsArticleActions.js @@ -16,12 +16,14 @@ app.directive('newsArticleActions', function () { 'article': '=' }, replace: true, - link: function (scope) { - scope.plugins = News.getArticleActionPlugins(); - scope.pluginClick = function (pluginId, event, article) { - News.getArticleActionPluginById(pluginId) - .onClick(event, article); - }; + link: function (scope, elem) { + var plugins = News.getArticleActionPlugins(); + scope.plugins = []; + + for (var i=0; i