diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-04 16:44:22 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-05-04 16:44:22 +0200 |
commit | d648b26345e6e9d58d59e72adc0a438d6c750279 (patch) | |
tree | 62a86a4c1375c339c334ab1bad887d7eb8160059 | |
parent | aa60a37d816f0f8b03f2ab73c014812ca2fc9a9f (diff) |
use 99 as maximum unread count to display, permanently display delete button for active feed
-rw-r--r-- | CHANGELOG | 5 | ||||
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | appinfo/version | 2 | ||||
-rw-r--r-- | css/feeds.css | 8 | ||||
-rw-r--r-- | js/app/services/unreadcountformatter.coffee | 4 | ||||
-rw-r--r-- | js/public/app.js | 4 | ||||
-rw-r--r-- | js/tests/controllers/feedcontrollerSpec.coffee | 6 | ||||
-rw-r--r-- | js/tests/services/unreadcountformaterSpec.coffee | 8 | ||||
-rw-r--r-- | templates/part.listfeed.php | 2 | ||||
-rw-r--r-- | templates/part.listfolder.php | 4 |
10 files changed, 29 insertions, 16 deletions
@@ -1,3 +1,8 @@ +ownCloud-news (0.99) + +* show 99+ as max unread count +* only show delete button if feed is active + ownCloud-news (0.98) * Fix XSS vulnerability in sanitation for json import diff --git a/appinfo/info.xml b/appinfo/info.xml index 9e489df00..c3817a5ac 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,6 +5,6 @@ <description>An RSS/Atom feed reader. Requires the App Framework app and backgroundjobs need to be enabled. See the README.rst in the apps top directory</description> <licence>AGPL</licence> <author>Alessandro Cosentino, Bernhard Posselt, Jan-Christoph Borchardt. Powered by SimplePie (Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors).</author> - <version>0.98</version> + <version>0.99</version> <require>5.0.5</require> </info> diff --git a/appinfo/version b/appinfo/version index 1ce9937c7..f7274f3da 100644 --- a/appinfo/version +++ b/appinfo/version @@ -1 +1 @@ -0.98
\ No newline at end of file +0.99
\ No newline at end of file diff --git a/css/feeds.css b/css/feeds.css index f037382e6..e85c22f84 100644 --- a/css/feeds.css +++ b/css/feeds.css @@ -114,6 +114,14 @@ display: block; } +/* only display the delete button when the feed is active */ +#app-navigation li:hover > .utils .delete-button { + display: none; +} + +#app-navigation li.active > .utils .delete-button { + display: block; +} .folder { text-transform: uppercase; diff --git a/js/app/services/unreadcountformatter.coffee b/js/app/services/unreadcountformatter.coffee index 76993ef5c..bb746514b 100644 --- a/js/app/services/unreadcountformatter.coffee +++ b/js/app/services/unreadcountformatter.coffee @@ -23,6 +23,6 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. angular.module('News').factory 'unreadCountFormatter', -> return (unreadCount) -> - if unreadCount > 999 - unreadCount = '999+' + if unreadCount > 99 + unreadCount = '99+' return unreadCount
\ No newline at end of file diff --git a/js/public/app.js b/js/public/app.js index 546044de7..d71e77cbe 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -3236,8 +3236,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>. (function() { angular.module('News').factory('unreadCountFormatter', function() { return function(unreadCount) { - if (unreadCount > 999) { - unreadCount = '999+'; + if (unreadCount > 99) { + unreadCount = '99+'; } return unreadCount; }; diff --git a/js/tests/controllers/feedcontrollerSpec.coffee b/js/tests/controllers/feedcontrollerSpec.coffee index 69098b646..684cf1368 100644 --- a/js/tests/controllers/feedcontrollerSpec.coffee +++ b/js/tests/controllers/feedcontrollerSpec.coffee @@ -91,15 +91,15 @@ describe 'FeedController', -> expect(@$window.document.title).toBe('News (5) | ownCloud') - it 'should show 999+ if in window title when more than 999 unread count', => + it 'should show 99+ if in window title when more than 99 unread count', => item = {id: 3, unreadCount: 1, faviconLink: 'test', url: 'hi'} - item1 = {id: 5, unreadCount: 999, faviconLink: 'test', url: 'his'} + item1 = {id: 5, unreadCount: 99, faviconLink: 'test', url: 'his'} @FeedModel.add(item) @FeedModel.add(item1) @scope.getTotalUnreadCount() - expect(@$window.document.title).toBe('News (999+) | ownCloud') + expect(@$window.document.title).toBe('News (99+) | ownCloud') it 'should move a feed if moveFeedToFolder is broadcasted', => diff --git a/js/tests/services/unreadcountformaterSpec.coffee b/js/tests/services/unreadcountformaterSpec.coffee index f4dabb8cc..5b151fca7 100644 --- a/js/tests/services/unreadcountformaterSpec.coffee +++ b/js/tests/services/unreadcountformaterSpec.coffee @@ -27,9 +27,9 @@ describe 'unreadCountFormatter', -> beforeEach inject (@unreadCountFormatter) => - it 'should return the normal count if its below 999', => - expect(@unreadCountFormatter(999)).toBe(999) + it 'should return the normal count if its below 99', => + expect(@unreadCountFormatter(99)).toBe(99) - it 'should set the count to 999+ if the count is over 999', => - expect(@unreadCountFormatter(1000)).toBe('999+')
\ No newline at end of file + it 'should set the count to 99+ if the count is over 99', => + expect(@unreadCountFormatter(100)).toBe('99+')
\ No newline at end of file diff --git a/templates/part.listfeed.php b/templates/part.listfeed.php index 506b1c0d1..e6e4c80a1 100644 --- a/templates/part.listfeed.php +++ b/templates/part.listfeed.php @@ -44,7 +44,7 @@ oc-tooltip></button> <button ng-click="feedBusinessLayer.delete(feed.id)" - class="svg action delete-icon" + class="svg action delete-icon delete-button" title="<?php p($l->t('Delete website')); ?>" ng-show="feed.id" oc-tooltip></button> diff --git a/templates/part.listfolder.php b/templates/part.listfolder.php index b2404b3f1..fb30f1d55 100644 --- a/templates/part.listfolder.php +++ b/templates/part.listfolder.php @@ -27,8 +27,8 @@ <span class="utils"> <button ng-click="folderBusinessLayer.delete(folder.id)" - ng-hide="folderBusinessLayer.hasFeeds(folder.id) || !folder.id" - class="svg action delete-icon" + ng-hide="!folder.id" + class="svg action delete-icon delete-button" title="<?php p($l->t('Delete folder')); ?>" oc-tooltip></button> |