diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-06 10:47:04 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-06 10:47:04 +0100 |
commit | a93c7bbf6f181185e60d02fa5b1dddbb9788e2cf (patch) | |
tree | c5dfa3bad9e1cff6f8557135c432ca52e47786cf | |
parent | Merge branch 'master' of git.sr.ht:~cedric/newspipe (diff) | |
download | newspipe-a93c7bbf6f181185e60d02fa5b1dddbb9788e2cf.tar.gz newspipe-a93c7bbf6f181185e60d02fa5b1dddbb9788e2cf.tar.bz2 newspipe-a93c7bbf6f181185e60d02fa5b1dddbb9788e2cf.zip |
Fixed some JavaScript functions to mark articles as read/unread.
-rw-r--r-- | newspipe/web/static/js/articles.js | 12 | ||||
-rw-r--r-- | newspipe/web/templates/home.html | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/newspipe/web/static/js/articles.js b/newspipe/web/static/js/articles.js index f9f41f14..de579532 100644 --- a/newspipe/web/static/js/articles.js +++ b/newspipe/web/static/js/articles.js @@ -1,8 +1,8 @@ /*! -* pyAggr3g470r - A Web based news aggregator. -* Copyright (C) 2010-2014 Cédric Bonhomme - http://cedricbonhomme.org/ +* Newspipe - A Web based news aggregator. +* Copyright (C) 2010-2020 Cédric Bonhomme - https://cedricbonhomme.org * -* For more information: https://bitbucket.org/cedricbonhomme/pyaggr3g470r/ +* For more information: https://git.sr.ht/~cedric/newspipe * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -54,7 +54,7 @@ function change_unread_counter(feed_id, increment) { var filter = $('#filters').attr("data-filter"); var data; - if ($(this).hasClass("glyphicon-unchecked")) { + if ($(this).hasClass('fa-square-o')) { data = JSON.stringify({ readed: false }) @@ -64,7 +64,7 @@ function change_unread_counter(feed_id, increment) { else { // here, filter == "all" $(this).parent().parent().parent().children("td:nth-child(2)").css( "font-weight", "bold" ); - $(this).removeClass('glyphicon-unchecked').addClass('glyphicon-check'); + $(this).removeClass('fa-square-o').addClass('fa-check-square-o'); } change_unread_counter(feed_id, 1); } @@ -76,7 +76,7 @@ function change_unread_counter(feed_id, increment) { else { // here, filter == "all" $(this).parent().parent().parent().children("td:nth-child(2)").css( "font-weight", "normal" ); - $(this).removeClass('glyphicon-check').addClass('glyphicon-unchecked'); + $(this).removeClass('fa-check-square-o').addClass('fa-square-o'); } change_unread_counter(feed_id, -1); } diff --git a/newspipe/web/templates/home.html b/newspipe/web/templates/home.html index 26168d3d..8da8dbe1 100644 --- a/newspipe/web/templates/home.html +++ b/newspipe/web/templates/home.html @@ -111,9 +111,9 @@ <a href="#"><i class="fa fa-star-o" aria-hidden="true" title="{{ _('Click if you like this article') }}"></i></a> {% endif %} {% if article.readed %} - <a href="#"><i class="fa fa-square-o" aria-hidden="true" title="{{ _('Mark this article as unread') }}"></i></a> + <a href="#"><i class="fa fa-square-o readed" aria-hidden="true" title="{{ _('Mark this article as unread') }}"></i></a> {% else %} - <a href="#"><i class="fa fa-check-square-o" aria-hidden="true" title="{{ _('Mark this article as read') }}"></i></a> + <a href="#"><i class="fa fa-check-square-o readed" aria-hidden="true" title="{{ _('Mark this article as read') }}"></i></a> {% if filter_ == 'all' %}</b>{% endif %} {% endif %} </td> |