Cleanup markup and stylesheet for trail and tabs.
authorjollytoad <jollytoad>
Mon, 28 Nov 2005 17:03:07 +0000 (17:03 +0000)
committerjollytoad <jollytoad>
Mon, 28 Nov 2005 17:03:07 +0000 (17:03 +0000)
Tested in Firefox and Konq, needs IE testing.

classes/Misc.php
themes/default/global.css

index ee6e5cb91b5c2aee991e6abf39be0033ea57790d..45bb0e3d0678327585c0b3a4d16752bf4a78efa0 100644 (file)
@@ -2,7 +2,7 @@
        /**
         * Class to hold various commonly used functions
         *
-        * $Id: Misc.php,v 1.118 2005/11/28 16:37:40 jollytoad Exp $
+        * $Id: Misc.php,v 1.119 2005/11/28 17:03:07 jollytoad Exp $
         */
         
        class Misc {
                                        $tablink = "<a" . $this->printActionUrl($tab, $_REQUEST, 'href') . ">";
                                        
                                        if (isset($tab['icon']) && $icon = $this->icon($tab['icon']))
-                                               $tablink .= "<img src=\"{$icon}\" /><br />";
+                                               $tablink .= "<span class=\"icon\"><img src=\"{$icon}\" /></span>";
                                        
-                                       $tablink .= "{$tab['title']}</a>";
+                                       $tablink .= "<span class=\"label\">{$tab['title']}</span></a>";
                                        
                                        echo "<td width=\"{$width}\" class=\"tab{$active}\">";
                                        #echo "<span class=\"tab{$active}\" style=\"white-space:nowrap;\">";
                                                                        'slony_cluster' => field('slony_cluster')
                                                                ),
                                                        'help'  => '',
+                                                       'tree'  => false,
                                                        'icon'  => 'Cluster',
                                                ),
                                                'nodes' => array (
                                                                        'action' => 'nodes_properties',
                                                                        'slony_cluster' => field('slony_cluster')
                                                                ),
+                                                       'branch' => 'nodes',
                                                        'help'  => '',
                                                        'icon'  => 'Nodes',
                                                ),
                                                                        'action' => 'sets_properties',
                                                                        'slony_cluster' => field('slony_cluster')
                                                                ),
+                                                       'branch' => 'sets',
                                                        'help'  => '',
                                                        'icon'  => 'ReplicationSets',
                                                ),
                        echo "<div class=\"trail\"><table><tr>";
                        
                        foreach ($trail as $crumb) {
-                               echo "<td>";
+                               echo "<td class=\"crumb\">";
                                $crumblink = "<a";
                                
                                if (isset($crumb['url']))
                                $crumblink .= ">";
                                
                                if (isset($crumb['icon']) && $icon = $this->icon($crumb['icon']))
-                                       $crumblink .= "<img src=\"{$icon}\" />";
+                                       $crumblink .= "<span class=\"icon\"><img src=\"{$icon}\" /></span>";
                                 
-                               $crumblink .= htmlspecialchars($crumb['text']) . "</a>";
+                               $crumblink .= "<span class=\"label\">" . htmlspecialchars($crumb['text']) . "</span></a>";
                                
                                if (isset($crumb['help']))
                                        $this->printHelp($crumblink, $crumb['help']);
index 7a4d8680896e8df2436ca3d943b8a04d0589ae61..37690f418e32acc83f78eea505f54aa63aef196c 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * Default style sheet
  *
- * $Id: global.css,v 1.34 2005/11/25 08:49:08 jollytoad Exp $
+ * $Id: global.css,v 1.35 2005/11/28 17:03:08 jollytoad Exp $
  */
 
 /** ELEMENTS */
@@ -191,56 +191,60 @@ td.opbutton2
        text-align: center;
 }
 
-.trail, .tab
-{
-       border: 2px solid #E6E6CC;
-       background-color: #F3F3E9;
-       padding: 2px 1ex;
-       vertical-align: bottom;
+.topbar {
+       border: 2px solid #CECF9C;
 }
 
-.trail, .topbar
-{
+.topbar, .topbar * {
+       background-color: #CECF9C;
+}
+
+.topbar .platform, .topbar .host, .topbar .username {
+       font-weight: bold;
+}
+
+.topbar, .trail {
        margin-bottom: 2px;
 }
 
-.trail td
-{
+.topbar, .trail, .tab {
+       padding: 2px 1ex;
+}
+
+.trail, .tab {
+       border: 2px solid #E6E6CC;
        background-color: #F3F3E9;
-       vertical-align: bottom;
 }
 
-.tabs
-{
-       width: 100%;
-       border-collapse: collapse;
-       margin: 0 0 1ex 0;
-       vertical-align: bottom;
+.trail .crumb {
+       background-color: #F3F3E9;
 }
 
-.tab
-{
-       text-align: center;
+.crumb, .tab {
        vertical-align: bottom;
 }
 
-.tabs .active
-{
-       background-color: #E6E6CC;
-       vertical-align: bottom;
+.crumb .icon {
+       vertical-align: middle;
+       margin: 0 2px;
 }
 
-.topbar {
-       border: 2px solid #CECF9C;
-       padding: 2px 1em;
+table.tabs {
+       width: 100%;
+       border-collapse: collapse;
+       margin-bottom: 1ex;
 }
 
-.topbar, .topbar td {
-       background-color: #CECF9C;
+.tab {
+       text-align: center;
 }
 
-.topbar .platform, .topbar .host, .topbar .username {
-       font-weight: bold;
+.tabs .active {
+       background-color: #E6E6CC;
+}
+
+.tab .icon {
+       display: block;
 }
 
 a:active