]> git.wh0rd.org Git - tt-rss.git/commitdiff
rework headline subtoolbar
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 22 Jan 2007 07:20:26 +0000 (08:20 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 22 Jan 2007 07:20:26 +0000 (08:20 +0100)
backend.php
functions.php
tt-rss.css

index 05a9957af144e5055658139e8357b9e80161e936..71bbcea4029223428e6caeb9a7e662da84225bd8 100644 (file)
                        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}";
 
                                print "</table>";
                        }
 
-                       print "</div>";
-
 //                     print_headline_subtoolbar($link, 
 //                             "javascript:catchupPage()", "Mark page as read", true, $rtl_content);
 
                }
 
                print "</div>";
+
+               print "</div>";
        }
 
        if ($op == "pref-feeds") {
index 7a19a79a7b61f2d4f7e526d0fa8fddc7c90acb83..613832a00a5b4285524ec35d1731986bf79bfbb0 100644 (file)
                }
 
                $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')) {
                        $is_cat = false, $search = false, $match_on = false,
                        $search_mode = false, $offset = 0) {
 
+                       $user_page_offset = $offset + 1;
+
                        if (!$bottom) {
                                $class = "headlinesSubToolbar";
                                $tid = "headlineActionsTop";
                                $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()";
 
                        }
 
-/*                     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>,
                                        _('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\">
                                $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\" 
index c005ed83efb78c37eb66679e9dc2c2a07a350382..85f0a8d6d80e1db9148245531398f8b2ff58f29e 100644 (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;
 }
+