summaryrefslogtreecommitdiffstats
path: root/js/news.js
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-18 03:44:54 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-18 03:44:54 +0200
commitd3dd6fa63e7f664b0a69b66e29737a8e6768cb98 (patch)
tree8df926bc53647e6e75b836557f002fd63053efae /js/news.js
parent4c0b359fbe2abd1b22e50221244408c9a64860d2 (diff)
added eyebutton
Diffstat (limited to 'js/news.js')
-rw-r--r--js/news.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/news.js b/js/news.js
index c5236b39e..1ae753fa2 100644
--- a/js/news.js
+++ b/js/news.js
@@ -741,8 +741,16 @@ $(document).ready(function(){
bindItemEventListeners();
// filter for newest or all items
- $('#feed_filter').change(function(){
- News.Feed.filter($(this).val());
+ $('#view').click(function(){
+ var term;
+ if($(this).hasClass('show_all')){
+ term = 'unread';
+ $(this).addClass('show_unread').removeClass('show_all');
+ } else {
+ term = 'all';
+ $(this).addClass('show_all').removeClass('show_unread');
+ }
+ News.Feed.filter(term);
});
// mark items whose title was hid under the top edge as read