From e6c115b29b44d2e0f9a93db5a8194694e3f9eeb6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 Jan 2007 08:20:26 +0100 Subject: rework headline subtoolbar --- backend.php | 14 ++++++------- functions.php | 63 +++++++++++++++++++++++++++++++++++++---------------------- tt-rss.css | 42 +++++++++++++++++++++++++++++++-------- 3 files changed, 81 insertions(+), 38 deletions(-) diff --git a/backend.php b/backend.php index 05a9957af..71bbcea40 100644 --- a/backend.php +++ b/backend.php @@ -403,13 +403,13 @@ print "
"._("Could not display feed (query failed). Please check label match syntax or local configuration.")."
"; return; } - - if (db_num_rows($result) > 0) { - print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, - $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, $offset); + print_headline_subtoolbar($link, $feed_site_url, $feed_title, false, + $rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, $offset); - print "
"; + print "
"; + + if (db_num_rows($result) > 0) { # print "\{$offset}"; @@ -573,8 +573,6 @@ print ""; } - print "
"; - // print_headline_subtoolbar($link, // "javascript:catchupPage()", "Mark page as read", true, $rtl_content); @@ -584,6 +582,8 @@ } print "
"; + + print ""; } if ($op == "pref-feeds") { diff --git a/functions.php b/functions.php index 7a19a79a7..613832a00 100644 --- a/functions.php +++ b/functions.php @@ -949,7 +949,7 @@ } $feed = "$feed_title"; + href=\"javascript:viewfeed('$feed_id', '', false);\">$feed_title"; print "
  • "; if (get_pref($link, 'ENABLE_FEED_ICONS')) { @@ -2696,6 +2696,8 @@ $is_cat = false, $search = false, $match_on = false, $search_mode = false, $offset = 0) { + $user_page_offset = $offset + 1; + if (!$bottom) { $class = "headlinesSubToolbar"; $tid = "headlineActionsTop"; @@ -2713,13 +2715,9 @@ $rtl_cpart = ""; } -# if ($offset > 0) { -# $prev_page_link = "<<"; -# } else { -# $prev_page_link = "<<"; -# } -# $r_offset = $offset + 1; -# $next_page_link = "[$r_offset] >>"; + $page_prev_link = "javascript:viewFeedGoPage(-1)"; + $page_next_link = "javascript:viewFeedGoPage(1)"; + $page_first_link = "javascript:viewFeedGoPage(0)"; $catchup_page_link = "catchupPage()"; $catchup_feed_link = "catchupCurrentFeed()"; @@ -2744,22 +2742,37 @@ } -/* print " + print " - "; */ +
  • This Page
  • +
  • Entire Feed
  • +
  • -
  • + + +
  • Next Page
  • + + + "; - print "". + // old style subtoolbar: + +/* print "". _('Select:')." All, Unread, @@ -2771,7 +2784,7 @@ _('Mark as read:')." Page, Feed"; - print ""; + print ""; */ if ($search && $feed_id >= 0 && get_pref($link, 'ENABLE_LABELS') && GLOBAL_ENABLE_LABELS) { print " @@ -2795,8 +2808,12 @@ $search_q = "&q=$search&m=$match_on&smode=$search_mode"; } + if ($user_page_offset > 1) { + print " [$user_page_offset] "; + } + if (!$bottom) { - print "  + print "