summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-09-01 01:45:00 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-09-01 01:45:00 +0200
commit42f4244d44b35d172715dc7e70b6f3bd55d08005 (patch)
tree358f4f366aeb2a6c3df43ceff9809b37806c1dc4 /js
parent4c39312cb3ffba28b103e49ac37f293fc5eea78b (diff)
mark all read works now
Diffstat (limited to 'js')
-rw-r--r--js/items.js2
-rw-r--r--js/menu.js9
2 files changed, 7 insertions, 4 deletions
diff --git a/js/items.js b/js/items.js
index 64a5f4d53..85b90f764 100644
--- a/js/items.js
+++ b/js/items.js
@@ -196,7 +196,7 @@ var t = t || function(app, string){ return string; }; // mock translation for lo
* Marks all items of a feed as read
* @param feedId the id of the feed which should be marked as read
*/
- Items.prototype.markAllRead = function(feedId) {
+ ItemCache.prototype.markAllRead = function(feedId) {
if(this._feeds[feedId] !== undefined){
$.each(this._feeds[feedId], function(key, value){
value.addReadClass();
diff --git a/js/menu.js b/js/menu.js
index cd41fa63c..cb9f7886a 100644
--- a/js/menu.js
+++ b/js/menu.js
@@ -513,7 +513,7 @@ var News = News || {};
return false;
});
- $listItem.children('.feeds_markread').click(function(){
+ $listItem.children('.buttons').children('.feeds_markread').click(function(){
self._markRead(MenuNodeType.Subscriptions, 0);
});
};
@@ -593,9 +593,12 @@ var News = News || {};
break;
case MenuNodeType.Subscriptions:
- this._root.children('li').each(function(){
+ this._$root.children('li').each(function(){
var childData = self._getIdAndTypeFromNode($(this));
- self._markRead(childData.type, childData.id);
+ if(childData.type === MenuNodeType.Folder ||
+ childData.type === MenuNodeType.Feed){
+ self._markRead(childData.type, childData.id);
+ }
});
break;