From 22f675e5c4195285b6b5033b451efa9cbb30384b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 25 Jul 2014 13:54:10 +0400 Subject: [PATCH] add a link to headlines-spacer to open next unread feed --- css/tt-rss.css | 7 ++++++- js/functions.js | 1 + js/viewfeed.js | 28 ++++++++++++++++++++++------ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/css/tt-rss.css b/css/tt-rss.css index 4852c8ca..76e35e11 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -910,10 +910,15 @@ img.feedIcon, img.tinyFeedIcon { height : 100%; margin-left : 1px; text-align : center; - padding : 1em; + padding : 10px; color : #555; + font-size : 11px; + font-style : italic; } +#headlines-spacer a { + color : #555; +} ul#filterDlg_Matches, ul#filterDlg_Actions { max-height : 100px; diff --git a/js/functions.js b/js/functions.js index aa840382..9915e680 100644 --- a/js/functions.js +++ b/js/functions.js @@ -204,6 +204,7 @@ function notify_real(msg, no_hide, n_type) { return; } else { Element.show(n); + new Effect.Highlight(n); } /* types: diff --git a/js/viewfeed.js b/js/viewfeed.js index dc6231c2..76248415 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -108,6 +108,10 @@ function headlines_callback2(transport, offset, background, infscroll_req) { initHeadlinesMenu(); + if (_infscroll_disable) + hsp.innerHTML = "" + + __("Click to open next unread feed.") + ""; + if (_search_query) { $("feed_title").innerHTML += "" + " (" + __("Cancel search") + ")" + @@ -176,7 +180,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) { var hsp = $("headlines-spacer"); - if (hsp) hsp.innerHTML = ""; + if (hsp) hsp.innerHTML = "Click to open next unread feed."; } } @@ -1315,7 +1319,12 @@ function headlines_scroll_handler(e) { } } else { - if (hsp) hsp.innerHTML = ""; + if (hsp) + if (_infscroll_disable) + hsp.innerHTML = "" + + __("Click to open next unread feed.") + ""; + else + hsp.innerHTML = ""; } if (isCdmMode()) { @@ -1361,10 +1370,7 @@ function headlines_scroll_handler(e) { console.log("we seem to be at an end"); if (getInitParam("on_catchup_show_next_feed") == "1") { - var is_cat = activeFeedIsCat(); - var nuf = getNextUnreadFeed(getActiveFeedId(), is_cat); - - if (nuf) viewfeed(nuf, '', is_cat); + openNextUnreadFeed(); } } } @@ -1375,6 +1381,16 @@ function headlines_scroll_handler(e) { } } +function openNextUnreadFeed() { + try { + var is_cat = activeFeedIsCat(); + var nuf = getNextUnreadFeed(getActiveFeedId(), is_cat); + if (nuf) viewfeed(nuf, '', is_cat); + } catch (e) { + exception_error("openNextUnreadFeed", e); + } +} + function catchupBatchedArticles() { try { if (catchup_id_batch.length > 0 && !_infscroll_request_sent) { -- 2.39.5