diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 23:14:39 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 23:14:39 +0100 |
commit | 7656f11898c94eb3658b451c9ef5732d676e0801 (patch) | |
tree | d5e6c5808a01cbf77da9931257ec8e6dda580692 | |
parent | removed unused imports (diff) | |
download | newspipe-7656f11898c94eb3658b451c9ef5732d676e0801.tar.gz newspipe-7656f11898c94eb3658b451c9ef5732d676e0801.tar.bz2 newspipe-7656f11898c94eb3658b451c9ef5732d676e0801.zip |
fixed some JavaScript to like/unlike an article from the home page.
-rw-r--r-- | newspipe/static/js/articles.js | 6 | ||||
-rw-r--r-- | newspipe/templates/home.html | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/newspipe/static/js/articles.js b/newspipe/static/js/articles.js index 6b272cf3..1aeed787 100644 --- a/newspipe/static/js/articles.js +++ b/newspipe/static/js/articles.js @@ -105,16 +105,16 @@ function change_unread_counter(feed_id, increment) { $('.like').on('click', function() { var article_id = $(this).parent().parent().parent().attr("data-article"); var data; - if ($(this).hasClass("glyphicon-star")) { + if ($(this).hasClass("fa-star")) { data = JSON.stringify({like: false}) - $(this).removeClass('glyphicon-star').addClass('glyphicon-star-empty'); + $(this).removeClass('fa-star').addClass('fa-star-o'); if(window.location.pathname.indexOf('/favorites') != -1) { $(this).parent().parent().parent().remove(); } } else { data = JSON.stringify({like: true}) - $(this).removeClass('glyphicon-star-empty').addClass('glyphicon-star'); + $(this).removeClass('fa-star-o').addClass('fa-star'); } // sends the updates to the server diff --git a/newspipe/templates/home.html b/newspipe/templates/home.html index 8da8dbe1..1dbfe9cd 100644 --- a/newspipe/templates/home.html +++ b/newspipe/templates/home.html @@ -104,11 +104,11 @@ {% for article in articles %} <tr data-article="{{ article.id }}" data-feed="{{ article.feed_id }}"> <td> - <a href="#"><i class="fa fa-times" aria-hidden="true" title="{{ _('Delete this article') }}"></i></a> + <a href="#"><i class="fa fa-times delete" aria-hidden="true" title="{{ _('Delete this article') }}"></i></a> {% if article.like %} - <a href="#"><i class="fa fa-star" aria-hidden="true" title="{{ _('One of your favorites') }}"></i></a> + <a href="#"><i class="fa fa-star like" aria-hidden="true" title="{{ _('One of your favorites') }}"></i></a> {% else %} - <a href="#"><i class="fa fa-star-o" aria-hidden="true" title="{{ _('Click if you like this article') }}"></i></a> + <a href="#"><i class="fa fa-star-o like" aria-hidden="true" title="{{ _('Click if you like this article') }}"></i></a> {% endif %} {% if article.readed %} <a href="#"><i class="fa fa-square-o readed" aria-hidden="true" title="{{ _('Mark this article as unread') }}"></i></a> |