Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/news.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/directive')
-rw-r--r--js/directive/NewsArticleActions.js14
1 files changed, 8 insertions, 6 deletions
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<plugins.length; i+=1) {
+ var plugin = new plugins[i](elem, scope.article);
+ scope.plugins.push(plugin);
+ }
}
};
}); \ No newline at end of file