diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-08-18 03:44:54 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-08-18 03:44:54 +0200 |
commit | d3dd6fa63e7f664b0a69b66e29737a8e6768cb98 (patch) | |
tree | 8df926bc53647e6e75b836557f002fd63053efae /js | |
parent | 4c0b359fbe2abd1b22e50221244408c9a64860d2 (diff) |
added eyebutton
Diffstat (limited to 'js')
-rw-r--r-- | js/news.js | 12 |
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 |