only enable bottom actions toolbar in headlines, when headlines list scrolls

This commit is contained in:
Andrew Dolgov 2006-02-25 07:15:05 +01:00
parent 646e601e71
commit e0a7121ba9
2 changed files with 22 additions and 3 deletions

View File

@ -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 "<table class=\"headlinesSubToolbar\"
if (!$bottom) {
$class = "headlinesSubToolbar";
$tid = "headlineActionsTop";
} else {
$class = "invisible";
$tid = "headlineActionsBottom";
}
print "<table class=\"$class\" id=\"$tid\"
width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
@ -1580,7 +1589,8 @@
print "</table>";
}
print_headline_subtoolbar($link, "javascript:catchupPage()", "Mark page as read");
print_headline_subtoolbar($link,
"javascript:catchupPage()", "Mark page as read", true);
} else {

View File

@ -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";
}
}