From: Andrew Dolgov Date: Sat, 25 Feb 2006 06:15:05 +0000 (+0100) Subject: only enable bottom actions toolbar in headlines, when headlines list scrolls X-Git-Tag: schema_freeze_for_1.1.4~52 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e0a7121ba9b0f73b9a9b4a61c4f525fb02331ead;p=tt-rss.git only enable bottom actions toolbar in headlines, when headlines list scrolls --- diff --git a/backend.php b/backend.php index a58cb85e..3dda8d0b 100644 --- a/backend.php +++ b/backend.php @@ -1385,9 +1385,18 @@ return; } - function print_headline_subtoolbar($link, $feed_site_url, $feed_title) { + function print_headline_subtoolbar($link, $feed_site_url, $feed_title, + $bottom = false) { - print ""; if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { @@ -1580,7 +1589,8 @@ print "
"; } - print_headline_subtoolbar($link, "javascript:catchupPage()", "Mark page as read"); + print_headline_subtoolbar($link, + "javascript:catchupPage()", "Mark page as read", true); } else { diff --git a/viewfeed.js b/viewfeed.js index 83a34885..1f0d4d28 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -385,4 +385,13 @@ function init() { if (arguments.callee.done) return; arguments.callee.done = true; document.onkeydown = hotkey_handler; + + var hw = document.getElementById("headlinesList").scrollHeight; + var pw = parent.document.getElementById("headlines").scrollHeight; + + if (hw >= pw) { + var bt = document.getElementById("headlineActionsBottom"); + bt.className = "headlinesSubToolbar"; + } + }