From dbd13392dd8d5debdbf149db82d6e317cd3cc40b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 23 Sep 2013 21:54:59 +0200 Subject: use better wording for hiding/showing unread articles and feeds/folders, fix #366 --- CHANGELOG | 1 + js/app/services/businesslayer/folderbusinesslayer.coffee | 3 ++- js/public/app.js | 2 +- js/tests/services/businesslayer/folderbusinesslayerSpec.coffee | 1 + templates/part.showall.php | 4 ++-- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bfe19e9e2..b588c3e3e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ owncloud-news (1.605) * Adding feeds does not block the input box any more * Always display empty folders +* Better description for hiding/showing read articles owncloud-news (1.604) * Use 64bit integers to prevent running out of ids after a year for large installations diff --git a/js/app/services/businesslayer/folderbusinesslayer.coffee b/js/app/services/businesslayer/folderbusinesslayer.coffee index c039a7d39..aeaf64fc2 100644 --- a/js/app/services/businesslayer/folderbusinesslayer.coffee +++ b/js/app/services/businesslayer/folderbusinesslayer.coffee @@ -105,7 +105,8 @@ FeedModel, $rootScope) -> isVisible: (folderId) -> - if @_showAll.getShowAll() || @_feedBusinessLayer.noFeeds() + if @_showAll.getShowAll() || + @_feedBusinessLayer.getFeedsOfFolder(folderId).length == 0 return true else if @isActive(folderId) or diff --git a/js/public/app.js b/js/public/app.js index 99c4ab419..87ea8c288 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -1379,7 +1379,7 @@ License along with this library. If not, see . FolderBusinessLayer.prototype.isVisible = function(folderId) { var feed, _i, _len, _ref; - if (this._showAll.getShowAll() || this._feedBusinessLayer.noFeeds()) { + if (this._showAll.getShowAll() || this._feedBusinessLayer.getFeedsOfFolder(folderId).length === 0) { return true; } else { if (this.isActive(folderId) || this._feedBusinessLayer.getFolderUnreadCount(folderId) > 0) { diff --git a/js/tests/services/businesslayer/folderbusinesslayerSpec.coffee b/js/tests/services/businesslayer/folderbusinesslayerSpec.coffee index e4c96a991..3b4115e60 100644 --- a/js/tests/services/businesslayer/folderbusinesslayerSpec.coffee +++ b/js/tests/services/businesslayer/folderbusinesslayerSpec.coffee @@ -147,6 +147,7 @@ describe 'FolderBusinessLayer', -> it 'should be visible if it has no feeds', => + @FeedModel.add({id: 3, unreadCount:0, folderId: 3, url: 'a1'}) @FolderModel.add({id: 13, opened: false, name: 'ho'}) expect(@FolderBusinessLayer.isVisible(13)).toBe(true) diff --git a/templates/part.showall.php b/templates/part.showall.php index 4f21daf6d..374303358 100644 --- a/templates/part.showall.php +++ b/templates/part.showall.php @@ -2,11 +2,11 @@ class="show-all"> t('Show all')); ?> + news-click-scroll="{direction: 'down', scrollArea: '#app-navigation > ul'}">t('Show read articles')); ?>
  • t('Show only unread')); ?> + href="#">t('Hide read articles')); ?>
  • -- cgit v1.2.3