summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2013-09-23 21:54:59 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2013-09-23 21:54:59 +0200
commitdbd13392dd8d5debdbf149db82d6e317cd3cc40b (patch)
tree313b744f3e87834cb3c053c725220a74b4e46ae3
parent92a02ff6ca048c934d5aba2ae6bcbbee224c513b (diff)
use better wording for hiding/showing unread articles and feeds/folders, fix #366
-rw-r--r--CHANGELOG1
-rw-r--r--js/app/services/businesslayer/folderbusinesslayer.coffee3
-rw-r--r--js/public/app.js2
-rw-r--r--js/tests/services/businesslayer/folderbusinesslayerSpec.coffee1
-rw-r--r--templates/part.showall.php4
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 <http://www.gnu.org/licenses/>.
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">
<a ng-click="feedBusinessLayer.setShowAll(true)"
href="#"
- news-click-scroll="{direction: 'down', scrollArea: '#app-navigation > ul'}"><?php p($l->t('Show all')); ?></a>
+ news-click-scroll="{direction: 'down', scrollArea: '#app-navigation > ul'}"><?php p($l->t('Show read articles')); ?></a>
</li>
<li ui-if="feedBusinessLayer.isShowAll() && feedBusinessLayer.getNumberOfFeeds() > 0"
class="show-all">
<a ng-click="feedBusinessLayer.setShowAll(false)"
- href="#"><?php p($l->t('Show only unread')); ?></a>
+ href="#"><?php p($l->t('Hide read articles')); ?></a>
</li>