From a93c7bbf6f181185e60d02fa5b1dddbb9788e2cf Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 6 Mar 2020 10:47:04 +0100 Subject: Fixed some JavaScript functions to mark articles as read/unread. --- newspipe/web/static/js/articles.js | 12 ++++++------ 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 @@ {% endif %} {% if article.readed %} - + {% else %} - + {% if filter_ == 'all' %}{% endif %} {% endif %} -- cgit