Olemis Lang avatar Olemis Lang committed 23f8110

TracRpc: All mainnav items added in toolbar, further images and embellishments

Comments (0)

Files changed (15)

 - Do not render roadmap progress bar in yellow background.
 - Add timeline icons.
 - Design further toolbar icons.
-- Add `more` drop-down menu in toolbar for missing mainnav items.
 - Implement toolbar search icon.
 - Hide & show main toolbar.
 - Change style of toolbar mainnav items on hover.

tracmacos/htdocs/mac.css

   width: 35px !important;
 }
 
-.tb_nav_sep  {
+.tb_nav_lsep  {
   background-image: url("toolbar.png");
   background-position: -10px -154px;
   background-repeat: no-repeat;
+  cursor:pointer;
   display: inline;
   float: left;
   height: 26px;
-  width: 2px;
+  width: 4px;
+}
+
+.tb_nav_rsep  {
+  background-repeat: no-repeat;
+  cursor:pointer;
+  display: inline;
+  float: right;
+  height: 26px;
+  width: 4px;
+}
+
+.tb_item:hover .tb_nav_lsep {
+  background-image: url("toolbar.png");
+  background-position:0 -425px;
+}
+
+.tb_item:hover .tb_nav_rsep {
+  background-image: url("toolbar.png");
+  background-position: -4px -425px;
+}
+
+.tb_item:hover .tb_nav_main {
+  background-image: url("toolbar.png");
+  background-position: 0 -450px;
 }
 
 .tb_nav_item  {
   width: auto;
 }
 
-.tb_id_roadmap a {
+#mactb .id_wiki a {
+  background-image: url(tb_mac.png);
+}
+
+#mactb .id_roadmap a {
   background-image: url(tb_roadmap.png);
 }
 
-.tb_id_timeline a {
+#mactb .id_timeline a {
   background-image: url(tb_timeline.png);
 }
 
+#mactb .id_browser a {
+  background-image: url(tb_finder2.png);
+}
+
+#mactb .id_tickets a {
+  background-image: url(tb_list.png);
+}
+
+#mactb .id_newticket a {
+  background-image: url(tb_bug.gif);
+}
+
+#mactb .id_search a {
+  background-image: url(tb_search.png);
+}
+
+#mactb .id_builds a {
+  background-image: url(tb_builds.png);
+}
+
+#mactb .id_admin a {
+  background-image: url(tb_admin.png);
+}
+
+#mactb .id_pydoc a {
+  background-image: url(tb_py.png);
+}
+
+#tb_more {
+  background-image: url(toolbar.png);
+  background-position: 0 -528px;
+  background-repeat: repeat-x;
+  color: #FFFFFF;
+  cursor: pointer;
+  font-weight: bold;
+  padding: 0 5px;
+  width: 35px !important;
+}
+
+#tb_more>ul {
+  background-color: #666666;
+  bottom: 25px;
+  display: none;
+  opacity: 0.95;
+  position: fixed;
+  right: 1em;
+}
+
+#tb_more:hover>ul {
+  display: block;
+}
+
+#tb_more>ul>li>ul>li {
+  background-color: #666666;
+  margin: 0px !important;
+  padding-top: 4px ;
+  padding-left: 3px;
+  position: relative;
+  vertical-align: bottom;
+}
+
+#tb_more>ul>li>ul>li :link,
+#tb_more>ul>li>ul>li :visited {
+  color: #FFFFFF;
+  padding-left: 21px;
+}
+
 /* Dock Navigation */
 
 #docknav {
Add a comment to this file

tracmacos/htdocs/tb_admin.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_bug.gif

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_builds.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_finder.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_finder2.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_list.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_mac.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_mac2.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_py.png

Added
New image
Add a comment to this file

tracmacos/htdocs/tb_search.png

Added
New image
Add a comment to this file

tracmacos/htdocs/toolbar.png

Old
Old image
New
New image

tracmacos/templates/mac_theme.html

     <li id="${category}" class="nav">
       <ul py:if="chrome.nav[category]">
         <li py:for="idx, item in  enumerate(i for i in chrome.nav[category] if i.name not in skip)"
-            class="${classes(first_last(idx, chrome.nav[category]), active=item.active)}">${item.label}</li>
+            class="${classes(first_last(idx, chrome.nav[category]), active=item.active)} id_${item.name}">${item.label}</li>
       </ul>
     </li>
   </ul>
       <p class="right">${chrome.footer}</p>
     </div>
     
-    <div id="mactb">
+    <div id="mactb" py:with="tb_cnt = macos.tb_count; tb_items = chrome.nav['mainnav']">
       <table id="tb_tbl" cellspacing="0" cellpadding="0" border="0" >
         <tbody>
           <tr>
                   </form>
                 </div>
               </div>
-              <div py:for="itm in chrome.nav['mainnav'][:9]" class="tb_item">
-                <div class="tb_nav_item tb_nav_sep" />
-                <div class="tb_nav_item tb_id_${itm.name}">${itm.label}</div>
+              <div py:for="itm in tb_items[:tb_cnt]" class="tb_item">
+                <div class="tb_nav_item tb_nav_lsep" />
+                <div class="tb_nav_item tb_nav_main id_${itm.name}">
+                  ${itm.label}
+                </div>
+                <div class="tb_nav_item tb_nav_rsep" />
               </div>
               <div class="tb_item">
                 <!-- TODO: Add further mainnav items -->
               </div>
             </td>
+            <td id="tb_more" class="tb_td" py:if="tb_cnt &lt; len(tb_items)">
+              more
+              ${navigation('mainnav',[itm.name for itm in tb_items[:tb_cnt]])}
+            </td>
             <td id="tb_br" class="tb_td" />
           </tr>
         </tbody>

tracmacos/theme.py

                                     "between each animation step of the "
                                     "'on-Dock' expansion, and the "
                                     "'off-Dock' shrinkage.")
+    tb_count = IntOption('macos', 'tbcount', default=6,
+                                doc="Number of fixed items in toolbar ")
     
     template = htdocs = css = screenshot = True
     
                   'labels' : "'" + self.dock_labels + "'",
                   'step' : self.dock_step,
                   },
+              'tb_count': self.tb_count,
               'util' : {
                   'striptags' : to_text,
                   'extract_href' : extract_href,
               'imgs' : {
                   'dock_default' : self.dock_default,
                   'dock' : self.dock_images,
-                  }
+                  },
             }
         return template, data, content_type
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.