diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-09-20 16:28:02 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-09-20 16:28:02 +0200 |
commit | 0d68f95aa6e2bc952052f1cd289fde0977cce006 (patch) | |
tree | 40af000c2194eae9eaa88bf3d793f83b992b069b /js/build/app.js | |
parent | edd87fa5791696167f0af75a7a95bdff8bdd0beb (diff) |
fix #718
Diffstat (limited to 'js/build/app.js')
-rw-r--r-- | js/build/app.js | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/js/build/app.js b/js/build/app.js index ac100e3ab..55a4201c4 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -2659,19 +2659,24 @@ app.directive('newsAddFeed', ["$rootScope", "$timeout", function ($rootScope, $t app.directive('newsArticleActions', function () { 'use strict'; return { - restrict: 'E', + restrict: 'A', scope: { - 'article': '=' + newsArticleActions: '=' }, link: function (scope, elem) { var plugins = News.getArticleActionPlugins(); for (var i=0; i<plugins.length; i+=1) { - plugins[i](elem, scope.article); + plugins[i](elem, scope.newsArticleActions); + } + + if (plugins.length === 0) { + $('#app-content .more').hide(); } } }; }); + app.directive('newsAutoFocus', ["$timeout", function ($timeout) { 'use strict'; return function (scope, elem, attrs) { @@ -3076,6 +3081,22 @@ app.directive('newsTitleUnreadCount', ["$window", function ($window) { }; }]); +app.directive('newsToggleShow', function () { + 'use strict'; + return { + restrict: 'A', + scope: { + 'newsToggleShow': '@' + }, + link: function (scope, elem) { + elem.click(function () { + var target = $(scope.newsToggleShow); + target.toggle(); + }); + } + }; +}); + app.directive('newsTriggerClick', function () { 'use strict'; |