rework headline subtoolbar

This commit is contained in:
Andrew Dolgov 2007-01-22 08:20:26 +01:00
parent c6008b620f
commit e6c115b29b
3 changed files with 82 additions and 39 deletions

View File

@ -404,13 +404,13 @@
return;
}
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\">";
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 "<div id=\"headlinesInnerContainer\">";
# print "\{$offset}";
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
@ -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") {

View File

@ -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)\">&lt;&lt;</a>";
# } else {
# $prev_page_link = "&lt;&lt;";
# }
# $r_offset = $offset + 1;
# $next_page_link = "[$r_offset] <a title=\"Next Page\" href=\"javascript:viewFeedGoPage(1)\">&gt;&gt;</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> -->
print "<td class=\"headlineActions$rtl_cpart\">".
<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>";
// 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 "&nbsp;
print "
<a target=\"_new\"
href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\">
<img class=\"noborder\"

View File

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