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

@ -403,14 +403,14 @@
print "<div align='center'>"._("Could not display feed (query failed). Please check label match syntax or local configuration.")."</div>"; print "<div align='center'>"._("Could not display feed (query failed). Please check label match syntax or local configuration.")."</div>";
return; 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) { 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}"; # print "\{$offset}";
if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) { if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
@ -573,8 +573,6 @@
print "</table>"; print "</table>";
} }
print "</div>";
// print_headline_subtoolbar($link, // print_headline_subtoolbar($link,
// "javascript:catchupPage()", "Mark page as read", true, $rtl_content); // "javascript:catchupPage()", "Mark page as read", true, $rtl_content);
@ -584,6 +582,8 @@
} }
print "</div>"; print "</div>";
print "</div>";
} }
if ($op == "pref-feeds") { if ($op == "pref-feeds") {

View File

@ -949,7 +949,7 @@
} }
$feed = "<a title=\"$link_title\" id=\"FEEDL-$feed_id\" $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\">"; print "<li id=\"FEEDR-$feed_id\" class=\"$class\">";
if (get_pref($link, 'ENABLE_FEED_ICONS')) { if (get_pref($link, 'ENABLE_FEED_ICONS')) {
@ -2696,6 +2696,8 @@
$is_cat = false, $search = false, $match_on = false, $is_cat = false, $search = false, $match_on = false,
$search_mode = false, $offset = 0) { $search_mode = false, $offset = 0) {
$user_page_offset = $offset + 1;
if (!$bottom) { if (!$bottom) {
$class = "headlinesSubToolbar"; $class = "headlinesSubToolbar";
$tid = "headlineActionsTop"; $tid = "headlineActionsTop";
@ -2713,13 +2715,9 @@
$rtl_cpart = ""; $rtl_cpart = "";
} }
# if ($offset > 0) { $page_prev_link = "javascript:viewFeedGoPage(-1)";
# $prev_page_link = "<a title=\"Previous Page\" href=\"javascript:viewFeedGoPage(-1)\">&lt;&lt;</a>"; $page_next_link = "javascript:viewFeedGoPage(1)";
# } else { $page_first_link = "javascript:viewFeedGoPage(0)";
# $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>";
$catchup_page_link = "catchupPage()"; $catchup_page_link = "catchupPage()";
$catchup_feed_link = "catchupCurrentFeed()"; $catchup_feed_link = "catchupCurrentFeed()";
@ -2744,22 +2742,37 @@
} }
/* print "<td class=\"headlineActions$rtl_cpart\"> print "<td class=\"headlineActions$rtl_cpart\">
<ul class=\"headlineDropdownMenu\"> <ul class=\"headlineDropdownMenu\">
<li class=\"top\">Select<ul> <li class=\"top2\">
<li><a href=\"$sel_all_link\">All</a></li> Select:
<li><a href=\"$sel_unread_link\">Unread</a></li> <a href=\"$sel_all_link\">All</a>,
<li><a href=\"$sel_none_link\">None</a></li></ul></li> <a href=\"$sel_unread_link\">Unread</a>,
<li class=\"top\">Toggle<ul> <a href=\"$sel_none_link\">None</a></li>
<li><a href=\"$tog_unread_link\">Unread</a></li> <li class=\"vsep\">-</li>
<li><a href=\"$tog_marked_link\">Starred</a></li></ul></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 class=\"top\">Mark as read<ul>
<li><a href=\"#\" onclick=\"$catchup_page_link\">Page</a></li> <li onclick=\"$catchup_page_link\">This Page</li>
<li><a href=\"#\" onclick=\"$catchup_feed_link\">Feed</a></li></ul></li> <li onclick=\"$catchup_feed_link\">Entire Feed</li></ul></li>
</ul> <li class=\"vsep\">-</li>
</td>"; */ <!-- <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:')." _('Select:')."
<a href=\"$sel_all_link\">All</a>, <a href=\"$sel_all_link\">All</a>,
<a href=\"$sel_unread_link\">Unread</a>, <a href=\"$sel_unread_link\">Unread</a>,
@ -2771,7 +2784,7 @@
_('Mark as read:')." _('Mark as read:')."
<a href=\"#\" onclick=\"$catchup_page_link\">Page</a>, <a href=\"#\" onclick=\"$catchup_page_link\">Page</a>,
<a href=\"#\" onclick=\"$catchup_feed_link\">Feed</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) { if ($search && $feed_id >= 0 && get_pref($link, 'ENABLE_LABELS') && GLOBAL_ENABLE_LABELS) {
print "<td class=\"headlineActions$rtl_cpart\"> print "<td class=\"headlineActions$rtl_cpart\">
@ -2795,8 +2808,12 @@
$search_q = "&q=$search&m=$match_on&smode=$search_mode"; $search_q = "&q=$search&m=$match_on&smode=$search_mode";
} }
if ($user_page_offset > 1) {
print " [$user_page_offset] ";
}
if (!$bottom) { if (!$bottom) {
print "&nbsp; print "
<a target=\"_new\" <a target=\"_new\"
href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\"> href=\"backend.php?op=rss&id=$feed_id&is_cat=$is_cat$search_q\">
<img class=\"noborder\" <img class=\"noborder\"

View File

@ -1352,17 +1352,35 @@ ul.headlineDropdownMenu {
ul.headlineDropdownMenu li.top { ul.headlineDropdownMenu li.top {
float : left; float : left;
width : 130px; width : 9em;
background-image : url("images/down_arrow.png"); background-image : url("images/down_arrow.png");
background-position : center right; background-position : center right;
background-repeat : no-repeat; background-repeat : no-repeat;
margin-right : 10px; margin : 0px;
cursor : pointer; 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 { ul.headlineDropdownMenu li.top:hover {
color : black;
cursor : pointer; cursor : pointer;
border-width : 1px 1px 0px 1px;
border-color : #c0c0c0;
border-style : solid;
} }
ul.headlineDropdownMenu li.top:hover ul { ul.headlineDropdownMenu li.top:hover ul {
@ -1377,16 +1395,24 @@ ul.headlineDropdownMenu ul {
padding : 0px; padding : 0px;
display : none; display : none;
background-color : white; background-color : white;
border-width : 0px 1px 1px 1px; width : 9em;
border-color : #c0c0c0;
border-style : solid;
width : 130px;
z-index : 3; z-index : 3;
top : auto; top : auto;
left : auto; left : auto;
border-width : 0px 1px 1px 1px;
border-color : #c0c0c0;
border-style : solid;
margin-left : -1px;
} }
ul.headlineDropdownMenu ul li { ul.headlineDropdownMenu ul li {
float: none; float: none;
margin : 2px 2px 0px 2px; padding : 2px 0px 2px 10px;
color : black;
} }
ul.headlineDropdownMenu ul li:hover {
color : #4684ff;
background-color : #f0f0f0;
}