diff options
author | Andrew Dolgov <[email protected]> | 2007-01-22 08:20:26 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-01-22 08:20:26 +0100 |
commit | e6c115b29b44d2e0f9a93db5a8194694e3f9eeb6 (patch) | |
tree | fba9a54740a4a1f3a8331134972b39a854262ce4 | |
parent | c6008b620f86217b7c5288c85aad624d41af9f8c (diff) |
rework headline subtoolbar
-rw-r--r-- | backend.php | 14 | ||||
-rw-r--r-- | functions.php | 63 | ||||
-rw-r--r-- | 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 "<div align='center'>"._("Could not display feed (query failed). Please check label match syntax or local configuration.")."</div>"; 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 "<div id=\"headlinesInnerContainer\">"; + print "<div id=\"headlinesInnerContainer\">"; + + if (db_num_rows($result) > 0) { # print "\{$offset}"; @@ -573,8 +573,6 @@ print "</table>"; } - print "</div>"; - // print_headline_subtoolbar($link, // "javascript:catchupPage()", "Mark page as read", true, $rtl_content); @@ -584,6 +582,8 @@ } print "</div>"; + + print "</div>"; } 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 = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\" - href=\"#\" onclick=\"javascript:viewfeed('$feed_id', '', false);\">$feed_title</a>"; + href=\"javascript:viewfeed('$feed_id', '', false);\">$feed_title</a>"; print "<li id=\"FEEDR-$feed_id\" class=\"$class\">"; 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 = "<a title=\"Previous Page\" href=\"javascript:viewFeedGoPage(-1)\"><<</a>"; -# } else { -# $prev_page_link = "<<"; -# } -# $r_offset = $offset + 1; -# $next_page_link = "[$r_offset] <a title=\"Next Page\" href=\"javascript:viewFeedGoPage(1)\">>></a>"; + $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 "<td class=\"headlineActions$rtl_cpart\"> + print "<td class=\"headlineActions$rtl_cpart\"> <ul class=\"headlineDropdownMenu\"> - <li class=\"top\">Select<ul> - <li><a href=\"$sel_all_link\">All</a></li> - <li><a href=\"$sel_unread_link\">Unread</a></li> - <li><a href=\"$sel_none_link\">None</a></li></ul></li> - <li class=\"top\">Toggle<ul> - <li><a href=\"$tog_unread_link\">Unread</a></li> - <li><a href=\"$tog_marked_link\">Starred</a></li></ul></li> + <li class=\"top2\"> + Select: + <a href=\"$sel_all_link\">All</a>, + <a href=\"$sel_unread_link\">Unread</a>, + <a href=\"$sel_none_link\">None</a></li> + <li class=\"vsep\">-</li> + <li class=\"top\">Selection<ul> + <li onclick=\"$tog_unread_link\">Toggle Unread</li> + <li onclick=\"$tog_marked_link\">Toggle Starred</li></ul></li> + <li class=\"vsep\">-</li> <li class=\"top\">Mark as read<ul> - <li><a href=\"#\" onclick=\"$catchup_page_link\">Page</a></li> - <li><a href=\"#\" onclick=\"$catchup_feed_link\">Feed</a></li></ul></li> - </ul> - </td>"; */ + <li onclick=\"$catchup_page_link\">This Page</li> + <li onclick=\"$catchup_feed_link\">Entire Feed</li></ul></li> + <li class=\"vsep\">-</li> + <!-- <li class=\"top2\"> + Page: + <a href=\"$page_prev_link\">Previous</a>, + <a href=\"$page_next_link\">Next</a></li> --> + + <li class=\"top\"><a href=\"$page_next_link\">Next Page</a><ul> + <li onclick=\"$page_prev_link\">Previous Page</li> + <li onclick=\"$page_first_link\">First Page</li></ul></li> + </ul> + + </td>"; - print "<td class=\"headlineActions$rtl_cpart\">". + // old style subtoolbar: + +/* print "<td class=\"headlineActions$rtl_cpart\">". _('Select:')." <a href=\"$sel_all_link\">All</a>, <a href=\"$sel_unread_link\">Unread</a>, @@ -2771,7 +2784,7 @@ _('Mark as read:')." <a href=\"#\" onclick=\"$catchup_page_link\">Page</a>, <a href=\"#\" onclick=\"$catchup_feed_link\">Feed</a>"; - print "</td>"; + print "</td>"; */ if ($search && $feed_id >= 0 && get_pref($link, 'ENABLE_LABELS') && GLOBAL_ENABLE_LABELS) { print "<td class=\"headlineActions$rtl_cpart\"> @@ -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 " <a target=\"_new\" href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\"> <img class=\"noborder\" diff --git a/tt-rss.css b/tt-rss.css index c005ed83e..85f0a8d6d 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1352,17 +1352,35 @@ ul.headlineDropdownMenu { ul.headlineDropdownMenu li.top { float : left; - width : 130px; + width : 9em; background-image : url("images/down_arrow.png"); background-position : center right; background-repeat : no-repeat; - margin-right : 10px; + margin : 0px; cursor : pointer; + border-width : 1px 1px 1px 1px; + border-color : transparent; + border-style : solid; +} + +ul.headlineDropdownMenu li.top2 { + float : left; +} + +ul.headlineDropdownMenu li.vsep { + float : left; + margin : 0px 5px 0px 0px; + border-width : 0px 1px 0px 0px; + border-color : #c0c0c0; + border-style : dotted; + color : white; } ul.headlineDropdownMenu li.top:hover { - color : black; cursor : pointer; + border-width : 1px 1px 0px 1px; + border-color : #c0c0c0; + border-style : solid; } ul.headlineDropdownMenu li.top:hover ul { @@ -1377,16 +1395,24 @@ ul.headlineDropdownMenu ul { padding : 0px; display : none; background-color : white; - border-width : 0px 1px 1px 1px; - border-color : #c0c0c0; - border-style : solid; - width : 130px; + width : 9em; z-index : 3; top : auto; left : auto; + border-width : 0px 1px 1px 1px; + border-color : #c0c0c0; + border-style : solid; + margin-left : -1px; } ul.headlineDropdownMenu ul li { float: none; - margin : 2px 2px 0px 2px; + padding : 2px 0px 2px 10px; + color : black; +} + +ul.headlineDropdownMenu ul li:hover { + color : #4684ff; + background-color : #f0f0f0; } + |