diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-09-13 14:47:49 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-09-13 14:47:49 +0200 |
commit | 064e1cfea2608aaf9dcf2942019386d8094c61e4 (patch) | |
tree | e73417a48f13ac0240b61085780fed0204bd94be /pyaggr3g470r | |
parent | updated changelog (diff) | |
download | newspipe-064e1cfea2608aaf9dcf2942019386d8094c61e4.tar.gz newspipe-064e1cfea2608aaf9dcf2942019386d8094c61e4.tar.bz2 newspipe-064e1cfea2608aaf9dcf2942019386d8094c61e4.zip |
Removed the article from the table of the page of favorite articles when it is unstared.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r-- | pyaggr3g470r/static/js/articles.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pyaggr3g470r/static/js/articles.js b/pyaggr3g470r/static/js/articles.js index bdd33926..350723a4 100644 --- a/pyaggr3g470r/static/js/articles.js +++ b/pyaggr3g470r/static/js/articles.js @@ -45,6 +45,8 @@ function change_unread_counter(feed_id, increment) { } }); + + // Mark an article as read or unread. $('.readed').on('click', function() { var article_id = $(this).parent().parent().parent().attr("data-article"); @@ -102,11 +104,13 @@ function change_unread_counter(feed_id, increment) { // Like or unlike an article $('.like').on('click', function() { var article_id = $(this).parent().parent().parent().attr("data-article"); - var data; if ($(this).hasClass("glyphicon-star")) { data = JSON.stringify({like: false}) $(this).removeClass('glyphicon-star').addClass('glyphicon-star-empty'); + if(window.location.pathname.indexOf('/favorites') != -1) { + $(this).parent().parent().parent().remove(); + } } else { data = JSON.stringify({like: true}) @@ -131,6 +135,8 @@ function change_unread_counter(feed_id, increment) { }); }); + + // Delete an article $('.delete').on('click', function() { var feed_id = $(this).parent().parent().parent().attr("data-feed"); @@ -150,6 +156,8 @@ function change_unread_counter(feed_id, increment) { }); }); + + // Delete all duplicate articles (used in the page /duplicates) $('.delete-all').click(function(){ var data = []; |