diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-17 10:43:14 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-12-17 10:43:14 +0100 |
commit | af95556560f2474ca504218c0a18eef267e7cd16 (patch) | |
tree | 62d91326c8a4542b4588a630802a55cd58fd8c0e /js/directive | |
parent | 86b27436e7845f29a3673cdf8992301e8f865493 (diff) |
add article action plugins
Diffstat (limited to 'js/directive')
-rw-r--r-- | js/directive/NewsArticleActions.js | 27 |
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 |