From 7a215f9de9d6ee4f9bb558d00f33f15eaee81ab1 Mon Sep 17 00:00:00 2001 From: Crupuk Date: Thu, 19 Jan 2017 11:41:30 +0100 Subject: Switch to FreshRss tab Switch to FreshRss tab when notification is clicked and close notification --- p/scripts/main.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'p/scripts/main.js') diff --git a/p/scripts/main.js b/p/scripts/main.js index 14e0c5be5..4799bad45 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -935,6 +935,8 @@ function notifs_html5_show(nb) { notification.onclick = function() { window.location.reload(); + window.focus(); + notification.close(); }; if (context.html5_notif_timeout !== 0) { -- cgit v1.2.3 From c281d6a43c45c955151d51a6303f38d0000aa488 Mon Sep 17 00:00:00 2001 From: Crupuk Date: Mon, 23 Jan 2017 09:05:13 +0100 Subject: Update main.js --- p/scripts/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'p/scripts/main.js') diff --git a/p/scripts/main.js b/p/scripts/main.js index 4799bad45..ff1753b5f 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -935,8 +935,8 @@ function notifs_html5_show(nb) { notification.onclick = function() { window.location.reload(); - window.focus(); - notification.close(); + window.focus(); + notification.close(); }; if (context.html5_notif_timeout !== 0) { -- cgit v1.2.3 From bade06668ec81a1e04e91840c783325f455cde4d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 23 Feb 2017 23:31:10 +0100 Subject: Un-disable mark-as-read button https://github.com/FreshRSS/FreshRSS/issues/1421 https://github.com/FreshRSS/FreshRSS/issues/1348 --- p/scripts/main.js | 1 + 1 file changed, 1 insertion(+) (limited to 'p/scripts/main.js') diff --git a/p/scripts/main.js b/p/scripts/main.js index ff1753b5f..d464b0863 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1016,6 +1016,7 @@ function load_more_posts() { init_load_more(box_load_more); $('#load_more').removeClass('loading'); + $('#bigMarkAsRead').removeAttr('disabled'); load_more = false; $(document.body).trigger('sticky_kit:recalc'); }); -- cgit v1.2.3 From 9e698108febebba511638d9cad5a228cb8936e3a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 4 Mar 2017 11:21:57 +0100 Subject: Do not mark as read in anonymous mode And avoid HTTP 403 https://github.com/FreshRSS/FreshRSS/issues/1431 --- app/views/helpers/javascript_vars.phtml | 1 + p/scripts/main.js | 1 + 2 files changed, 2 insertions(+) (limited to 'p/scripts/main.js') diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 745baa195..059224305 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -3,6 +3,7 @@ $mark = FreshRSS_Context::$user_conf->mark_when; $s = FreshRSS_Context::$user_conf->shortcuts; echo htmlspecialchars(json_encode(array( 'context' => array( + 'anonymous' => !FreshRSS_Auth::hasAccess(), 'auto_remove_article' => !!FreshRSS_Context::isAutoRemoveAvailable(), 'hide_posts' => !(FreshRSS_Context::$user_conf->display_posts || Minz_Request::actionName() === 'reader'), 'display_order' => Minz_Request::param('order', FreshRSS_Context::$user_conf->sort_order), diff --git a/p/scripts/main.js b/p/scripts/main.js index d464b0863..5dbb95c91 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -117,6 +117,7 @@ function incUnreadsFeed(article, feed_id, nb) { var pending_entries = {}; function mark_read(active, only_not_read) { if ((active.length === 0) || (!active.attr('id')) || + context.anonymous || (only_not_read && !active.hasClass("not_read"))) { return false; } -- cgit v1.2.3