summaryrefslogtreecommitdiffstats
path: root/js/directive/NewsArticleActions.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/directive/NewsArticleActions.js')
-rw-r--r--js/directive/NewsArticleActions.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/js/directive/NewsArticleActions.js b/js/directive/NewsArticleActions.js
new file mode 100644
index 000000000..b3468413f
--- /dev/null
+++ b/js/directive/NewsArticleActions.js
@@ -0,0 +1,27 @@
+/**
+ * ownCloud - News
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Bernhard Posselt <dev@bernhard-posselt.com>
+ * @copyright Bernhard Posselt 2014
+ */
+app.directive('newsArticleActions', function () {
+ 'use strict';
+ return {
+ restrict: 'E',
+ templateUrl: 'articleaction.html',
+ scope: {
+ 'article': '='
+ },
+ replace: true,
+ link: function (scope) {
+ scope.plugins = News.getArticleActionPlugins();
+ scope.pluginClick = function (pluginId, event, article) {
+ News.getArticleActionPluginById(pluginId)
+ .onClick(event, article);
+ };
+ }
+ };
+}); \ No newline at end of file