From dc3f115172c42e545bb2769e3df0d241b0a05869 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Wed, 21 Nov 2007 12:08:19 +0000 Subject: [PATCH] Top menu look is now correct git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@68 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-web/bin/getattrs | 71 ----- xCAT-web/functions.php | 254 ++++++------------ xCAT-web/globals.inc | 6 - xCAT-web/header.inc | 39 --- xCAT-web/images/bg_button_a.gif | Bin 0 -> 424 bytes xCAT-web/images/bg_button_span.gif | Bin 0 -> 1410 bytes xCAT-web/images/top.jpg | Bin 0 -> 13096 bytes xCAT-web/index.php | 44 +-- xCAT-web/lib/GroupNodeTable.class.php | 1 + xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php | 152 ----------- .../lib/XCAT/HTML/ImageResources.class.php | 10 - .../XCAT/webservice/XCATWebservice.class.php | 4 +- xCAT-web/lib/config.php | 29 -- xCAT-web/menu.css | 5 +- xCAT-web/style.css | 221 ++++++++------- 15 files changed, 240 insertions(+), 596 deletions(-) delete mode 100644 xCAT-web/bin/getattrs delete mode 100644 xCAT-web/globals.inc delete mode 100644 xCAT-web/header.inc create mode 100644 xCAT-web/images/bg_button_a.gif create mode 100644 xCAT-web/images/bg_button_span.gif create mode 100644 xCAT-web/images/top.jpg delete mode 100644 xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php delete mode 100644 xCAT-web/lib/XCAT/HTML/ImageResources.class.php delete mode 100644 xCAT-web/lib/config.php diff --git a/xCAT-web/bin/getattrs b/xCAT-web/bin/getattrs deleted file mode 100644 index cdd0a19ed..000000000 --- a/xCAT-web/bin/getattrs +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/perl -use strict; -use Getopt::Long; - -$::XCATROOT = ""; -GetOptions('web' => \$::HTML, - 'h|help' => \$::HELP); - -if($::HELP){ - print "$0 --help prints this help message\n"; - print "$0 prints attributes with nodes\n"; - print "$0 --html prints attributes with nodes with html parameters\n\n" ; - exit 0; -} - - -if(-f "/etc/sysconfig/xcat"){ - $::XCATROOT=`awk -F= '{print \$2}' /etc/sysconfig/xcat`; - chomp($::XCATROOT); - if($::XCATROOT eq ""){ - print "XCATROOT not defined in /etc/sysconfig/xcat!\n"; - exit; - } -}else{ - print "file /etc/sysconfig/xcat doesn't exist\n"; - exit; -} -#print "$::XCATROOT\n"; -my $f = "$::XCATROOT/etc/nodelist.tab"; -unless(-f "$f"){ - print "$f doesn't exist!\n"; - exit 1; -} -my $nh; -open(FILE, "$f") or die "can't open $f!"; -while(my $line = ){ - chomp $line; - # skip lines that start with # or with a space and then # - if($line =~ /^\s*#/){ next; } - - # skip lines that are blank - if($line =~ /^$/){ next; } - - my ($node,$attrs) = split(/\s+/, $line); - #print "$node\n"; - my @attrs = split(/,/, $attrs); - foreach my $a (@attrs){ - #print "$a\n"; - if($a ne ""){ - push @{$nh->{$a}}, $node; - } - } -} -if($::HTML){ print "\n"; } diff --git a/xCAT-web/functions.php b/xCAT-web/functions.php index 351651390..89a5ac1f5 100644 --- a/xCAT-web/functions.php +++ b/xCAT-web/functions.php @@ -17,40 +17,36 @@ $CURRDIR = '/opt/xcat/web'; /*----------------------------------------------------------------------------------------------- Function to insert the header part of the HTML and the top part of the page ------------------------------------------------------------------------------------------------*/ -function insertHeader($title, $stylesheets, $javascripts) { +function insertHeader($title, $stylesheets, $javascripts, $currents) { global $TOPDIR; if (!$TOPDIR) $TOPDIR = '.'; -?> +echo << -<?php echo $title; ?> +$title - - - + + - - +EOS; - - - - - +/* These are only needed for popup windows, so only need it for specific pages like dsh + + + + + + + +*/ -\n"; @@ -61,165 +57,75 @@ if ($javascripts) { echo "\n"; } } -?> - - - - + - -// A few constants -/* -require_once("lib/config.php"); -$config = &Config::getInstance(); -$imagedir = $config->getValue("IMAGEDIR"); -$colTxt = "Click to collapse section"; -$exTxt = "Click to expand section"; -$bulgif = "$imagedir/h3bg_new.gif"; -$minusgif = "$imagedir/minus-sign.gif"; -$plusgif = "$imagedir/plus-sign.gif"; -*/ - - -/*------------------------------------------------------------------------------ - Create the navigation area on the left. - $currentlink is the key of the link to the page - that is currently being displayed. -------------------------------------------------------------------------------*/ - -function insertNav($currentLink) { -// A few constants -global $TOPDIR; // or could use $GLOBALS['TOPDIR'] -$colTxt = "Click to collapse section"; -$exTxt = "Click to expand section"; -$bulgif = "$TOPDIR/images/h3bg_new.gif"; -$minusgif = "$TOPDIR/images/minus-sign.gif"; -$plusgif = "$TOPDIR/images/plus-sign.gif"; - -echo ''; -} //end insertNav - - -/**-------------------------------------------------------------- - Insert one inner table in the nav area function above. - Type is the type of the menu item, i.e: close or open (plus sign/minus sign) - Level is the level of the parent menu item (can be first or second) - Id is the id property of the table. - CurrentLink is the key of the link for the current page. - List is a keyed array of href, label pairs. -----------------------------------------------------------------*/ -function insertInner($type,$level,$title, $id, $currentLink, $list) { -// A few constants -global $TOPDIR; // or could use $GLOBALS['TOPDIR'] -$colTxt = "Click to collapse section"; -$exTxt = "Click to expand section"; -$bulgif = "$TOPDIR/images/h3bg_new.gif"; -$minusgif = "$TOPDIR/images/minus-sign.gif"; -$plusgif = "$TOPDIR/images/plus-sign.gif"; - - switch($level){ - case 1: $menu_level = "menu_level1"; break; - case 2: $menu_level = "menu_level2"; break; - default: $menu_level = "menu_level1"; - } - if ($type == "open"){ - $gif = $minusgif; - $hoverTxt = $colTxt; - $style = "display:inline"; - }else { - $gif = $plusgif; - $hoverTxt = $exTxt; - $style = "display:none"; - } - -echo << -

- $title

- - -EOS; - -foreach ($list as $key => $link) { - if ($key == $currentLink){ - echo "\n"; - }else{ - echo "\n"; + if ($currents[0] == 'machines') { + insertMenuRow($currents[1], 0, array( + 'lab' => array('Lab Floor', "$TOPDIR/views/lab.php"), + 'frames' => array('Frames', "$TOPDIR/views/frames.php"), + 'groups' => array('Groups', "$TOPDIR/views/groups.php"), + 'nodes' => array('Nodes', "$TOPDIR/views/nodes.php"), + 'layout' => array('Layout', "$TOPDIR/views/layout.php") + )); } + echo "
\n"; } -echo "\n"; -} //end insertInner +// Insert one set of choices under a main choice. +function insertMenuRow($current, $isTop, $items) { + global $TOPDIR; + //$img = "$TOPDIR/images/h3bg_new.gif"; + $menuRowClass = $isTop ? '' : 'class=MenuRow'; + $menuItemClass = $isTop ? 'class=MenuItemTop' : 'class=MenuItem'; + $currentClass = $isTop ? 'CurrentMenuItemTop' : ''; + + //echo "\n"; + //echo "
\n"; + echo "
  • $link[0]
  • \n"; + } else { + //echo "\n"; + echo "
  • $link[0]
  • \n"; + } + } + + //echo "\n"; + //echo "\n"; + echo "\n"; +} /** ---------------------------------------------------------------------------------------------- @@ -290,6 +196,7 @@ function dumpGlobals() { //------------------------------------ function isInstalled($rpmfile) { //------------------------------------ $aixrpmopt = isAIX() ? '--ignoreos' : ''; $lang = isWindows() ? '' : 'LANG=C'; + $out = array(); $rc = runcmd("$lang /bin/rpm -U $aixrpmopt --test $rpmfile", 2, $out); # The rc is not reliable in this case because it will be 1 if it is already installed # of if there is some other problem like a dependency is not satisfied. So we parse the @@ -512,9 +419,12 @@ function insertTabs ($tablist, $currentTabIndex) { //--------------------------- // Create the Action buttons in a table. Buttonlist is an array of arrays of button attribute strings. function insertButtons ($buttonsets) { //------------------------------------ foreach ($buttonsets as $buttonlist) { - echo "
    "; - foreach ($buttonlist as $button) { echo ""; } - echo "
    \n"; + echo ""; + foreach ($buttonlist as $button) { + //echo ""; + echo ""; + } + echo "
    $button
    \n"; } } diff --git a/xCAT-web/globals.inc b/xCAT-web/globals.inc deleted file mode 100644 index 3ef53124f..000000000 --- a/xCAT-web/globals.inc +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/xCAT-web/header.inc b/xCAT-web/header.inc deleted file mode 100644 index ed29da30a..000000000 --- a/xCAT-web/header.inc +++ /dev/null @@ -1,39 +0,0 @@ -"; -$p = 1; -foreach ($menuArray as $key => $value){ - if($p == 1){ - echo "
  • $key\n"; - $p++; - - }else{ - echo "
  • $key\n"; - $p++; - } - echo "
      "; - $q = 0; - foreach($value as $k => $u){ - if($p == 2){ - #echo "
    • $k
    • "; - echo "
    • $k
    • "; - }else{ - #echo "
    • $k
    • "; - echo "
    • $k
    • "; - } - $q++; - } - echo "
    "; - echo "
  • "; -} -echo ""; -} - -function printNodeList(){ - system("bin/getattrs --web"); -} - -?> diff --git a/xCAT-web/images/bg_button_a.gif b/xCAT-web/images/bg_button_a.gif new file mode 100644 index 0000000000000000000000000000000000000000..fbb5d800f4920e37f9592b017441858280d31352 GIT binary patch literal 424 zcmV;Z0ayMy}iBb>+96i)VH^{<83zC`un?q1ksceG40#~oN{s;$sC)?#KmnQ=4Hy^@ zu_w=;J{1HIFrcW>qeur7IFPid(E>ILD3w}(s@17ct7_fK6#)SR1rUH08+NQ%u?7U3 zUCVau!LH-XH(fB_q5xd5+T!+->=suNrizA-%ZewA!7px z1XR4Zkl;W92RSqJEYM&8(F^^m_A5XDfz1pTte)+c0D+VW6JXZu7xV4}BNzJSJ$$(0 z+{KCO-c4Ai^XJgh%8X9kxy|a;4;r|;JwW&G+%r~t=T3gS`2@Eas}G=fJ!1fey}iBb>+93g)3>*`UaUZIW5$jnL!SJ&vSiDY zFKf=s8MEijpF4vdExL5*)1*UA1}Uq`19n^n@`Vvy?gcW+sA(| zzdrr@^Yh!+kAJ`Y0|;Oz;D7`cXyAbeCaB6epA8tJ5$T3RWk zm1fE*rki>yYN(`kS}Lffri$vSnyT6=tNx$9Dr>B?j_PWyr_O3Cth?%(E3UU@8mT}B z7_jNF$R?}ovdlK??6c5DEA6z@R%`9G*k*g|KmY{$Yp=la`t7*hmMgBgzM>m$y63jb z?z`*83+}w+A`4YX!m3NJzV*VpuedhXs4}q z)AxG3_Spa8=ckvB`s%8;p8D&o!|wXx2E3JF-ni$k`|iB= z?)&e+2QU2a#20V;@yI8y{PN5z&t>z_M=$;K)K_o)_1F)8yRmr((Eaz^hwr`k;E!*9 z`RJ3c{`u>t&;I-F$KU?^@Y64U{rKOnzy18@-~ayp!(Ycf<~>P$?0^PLU;!71Kn5zX zfe?J41RY4h2v%@{7R(?9H+aDgYS4om{GbR!NJ0>raD*l-)&fshLKM2Ng)n5H3|~0I z7}D^DHq2oScc{T`ne2!DKn$V~hbS^167h&gOrjE(NC0C+3Qd%Pq7DNJy*QykwY$2!vSj&sbT9rcLEJ^Hba zfaIef|2W7%67rCSOk^P!iAY8!5={p=6QUYrC`wMUl9;@tCKY8#PG-`Rn`G1{MH$LP znX;3l+*6p$B1tW|@|CcRr7UMj%UaqJNsqdvE_cbxUi$Kvy)4L3Hbl%074w+JOeQjy zsmx|F^O??!CN!rh&1zEfn%2xFHn*wGZgTUR-ZUmLi^-KPUFe+XOs6{6$XFp7=D(r#|<|&wB=?Sn}+rKnF_Df*N$4A}Ih#Jm#T;I`p9sji^9xW{{Ny Q?V=dXs75#HvVZ^pJ0*$ZJOBUy literal 0 HcmV?d00001 diff --git a/xCAT-web/images/top.jpg b/xCAT-web/images/top.jpg new file mode 100644 index 0000000000000000000000000000000000000000..50fc31cca9a996e63236baa82234a55bb9973598 GIT binary patch literal 13096 zcmeGjd0Z1mcXl^7;SLCR5ab9VAtc<9JAg!?AeU%uH6#lJa+!m}+Imr~M{C9VXjQZ- z+G?xytgVV#YqctPU;RL8)z-G4^|t1l-2@2M_AC8Z zv2=0%D+8GK17`+E1qg-=1gJBDIV0w)aM_6Y5Rw3;q#|UoE*XP{LZQ;=3?|DCnnQOY z0#K}j=mZc7f}s?YN~bZX7&{CSoiU1!i;$W$LgqSf{1g$5GjH`L$-aJWIR}cu!u3-d zC3OGV+_si>xgo;6ZtJvwl=*pz)P^<2$UaT^*YG>rY7U+@wcbtREm-^Jrwb3A`R>;b zwjVxw{a!(F#q>q%c6@p6`}3~s6sh@6U(AYn4FjA&2d2=lKZIXyeu1ISVDl5Hkg!wRwV zVv%k5KodMXi##my0VfFLoY*~*Cmjfiiy=h?Yxp?Af><%DmoDqXh)DcsSa3JG%+cxEUP7&06v>!U%&$SKm&|G2`?4Efdc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2tG!3XM|Xc6{q@dck;ir%k2t>ln}~0=pNKrM<7Cvy zU8iDB?P-i{{GutL>A>lf(_fyEo;h~*rL&Fa^3Pp3KjwV%1;vG%7gZPAFI8N6a(VI< z>XlhnovtqWw%@mP{~7e3EzOb5pSPs69KV)(?Q*NU^~diF-#xuv^S%A|i*9(|sJ|(? zx%XDuty4d|{KNGhbw572J^d%=pH}=F`17Z~B>r-|t+4HSyT09gXU<*EyX$`q|Fz*> z_PuZKtM5N~Fzcb`!wrw3A02r-^6`x)l~3tUm;5&9w>{5>Kf7X9!*tuOjQ2$NE?~)c zr(i^ZH9QaDMW<3IR62u3qtj>%7J~^3gT-PK#Zr@?O@&aXR0f^l$YMGE-x=>PMZ9~) zJAAE$|L#B(2#|$B#ZVdotQqepirG@TC&Qr#Mr6Fx=oqX}1A=1C6hMV3?@1$Qt}>YN z&JoR9O?R_ooVSFz7q$86r?&e`!gFiuw#p3+5h=X+Yqmx9$x|2)HeF)`Ok=V?zfQijfo^DuxRx@lPu_g^{{SAI0gdu;N2LlJ4 zZoONxVC|>fMNYHH*0)X8?}%6`l_Hw=2LfO1mF7BeWkha&e-5v{A)^c z(;Z&$O?7L%`E>h(*#EqIG}nBl{YdcD%g0We&$cfPzOwghg8AH>Nv9T;nZdpAxld+z hKM6X1@_4oQm!s9c%{8CDZw60hw0rBG?b>9%_+NHNSYZGF literal 0 HcmV?d00001 diff --git a/xCAT-web/index.php b/xCAT-web/index.php index da533653a..ed4253b16 100644 --- a/xCAT-web/index.php +++ b/xCAT-web/index.php @@ -9,14 +9,31 @@ if (isAIX()) { $aixDisabled = 'disabled'; } require_once("lib/GroupNodeTable.class.php"); require_once("lib/XCAT/XCATCommand/XCATCommandRunner.class.php"); +insertHeader('Nodes', NULL, NULL, array('machines','nodes')); -insertHeader('Nodes', NULL, NULL); -insertNav('nodes'); - -echo "

    Cluster Groups and Nodes

    "; - +echo "
    \n"; insertButtons(array( + array( + 'Attributes', + 'Create Like', + 'Create Group', + 'Ping', + //'Updatenode', + 'Run Cmd', + 'Copy Files' + ), + array( + //'Soft Maint', + 'HW Ctrl', + 'RSA/MM/FSP', + 'Install', + 'Perf Mon', + //'Webmin', + 'Diagnose', + 'Remove' + ), + /* array( 'name=propButton value="Attributes"', 'name=defineButton value="Create Like"', @@ -36,6 +53,7 @@ insertButtons(array( 'name=diagButton value="Diagnose" onclick="this.form.nodesNeeded=1;"', 'name=removeButton value="Remove"' ), + */ )); echo '
    '; @@ -46,7 +64,6 @@ GroupNodeTable::insertGroupTableHeader(); // Get all the names of the groups $xcmdr = new XCATCommandRunner(); -//$nodeGroupNames = $xcmdr->getAllGroupNames(); $nodeGroupNames = $xcmdr->getAllXCATGroups(); // Print the HTML for each of them @@ -55,14 +72,9 @@ foreach($nodeGroupNames as $key => $nodeGroupName) { } GroupNodeTable::insertGroupTableFooter(); -?> - - - + +echo << XCATEvent.doExpandNodes(); --> @@ -81,4 +93,6 @@ GroupNodeTable::insertGroupTableFooter();

    This interface is still under construction and not yet ready for use.

    - \ No newline at end of file + +EOS; +?> \ No newline at end of file diff --git a/xCAT-web/lib/GroupNodeTable.class.php b/xCAT-web/lib/GroupNodeTable.class.php index 208ac5269..a0595e452 100644 --- a/xCAT-web/lib/GroupNodeTable.class.php +++ b/xCAT-web/lib/GroupNodeTable.class.php @@ -76,6 +76,7 @@ EOE; return; } +// This is used by nodes_by_group.php /** * @param XCATNodeGroup nodeGroup The node group for which we want to generate the html. * returns the table that contains all the nodes information of that group diff --git a/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php b/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php deleted file mode 100644 index 413ab5250..000000000 --- a/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - -EOS; - - return $html; -} - -function getXCATNodeTableFooter() { -$html = << -EOS; - return $html; -} - -/** - * @param String nodeGroupName The name of the node group. - */ -function getToggleString($nodeGroupName) { -$colTxt = "Click to collapse section"; -$exTxt = "Click to expand section"; -$bulgif = "$TOPDIR/images/h3bg_new.gif"; -$minusgif = "$TOPDIR/images/minus-sign.gif"; -$plusgif = "$TOPDIR/images/plus-sign.gif"; - - $html = << - -EOS; - - return $html; -} - -/** - * @param String nodeGroup The group. - */ -function getXCATGroupTableRow($nodeGroup) { - -$imagedir = 'images'; -$nodeGroupName = $nodeGroup->getName(); -$img_string = XCATNodeGroupUtil::getImageString($nodeGroup->getStatus()); - -$html = << - - - - - - - - - -EOE; - return $html; -} - - /** - * @param XCATNodeGroup nodeGroup The node group for which we want to generate the html. - * returns the table that contains all the nodes information of that group - */ -function getXCATNodeGroupSection($nodeGroup) { - $imagedir = 'images'; - $right_arrow_gif = $imagedir . "/grey_arrow_r.gif"; - $left_arrow_gif = $imagedir . "/grey_arrow_l.gif"; - - $html .= << -EOS; - - $nodes = $nodeGroup->getNodes(); - - foreach($nodes as $nodeName => $node) { - $html .= HTMLProducer::getXCATNodeTableRow($node); - } - - $html .= ""; - $html .= << -EOS; - - return $html; -} - - /** - * @param XCATNode node The node for which we want to generate the html. - */ -function getXCATNodeTableRow($node) { - - $imagedir = 'images'; - - //echo $node->getName(); - $html = " - " . - "". - "". - ""; - - $stat = $node->getStatus(); - $img_string = XCATNodeGroupUtil::getImageString($stat); - - $html .= "". - "". - ""; - -EOS; - return $html; - } -} -?> diff --git a/xCAT-web/lib/XCAT/HTML/ImageResources.class.php b/xCAT-web/lib/XCAT/HTML/ImageResources.class.php deleted file mode 100644 index 25d7bb396..000000000 --- a/xCAT-web/lib/XCAT/HTML/ImageResources.class.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/xCAT-web/lib/XCAT/webservice/XCATWebservice.class.php b/xCAT-web/lib/XCAT/webservice/XCATWebservice.class.php index a5b6cdf33..418bc85dc 100644 --- a/xCAT-web/lib/XCAT/webservice/XCATWebservice.class.php +++ b/xCAT-web/lib/XCAT/webservice/XCATWebservice.class.php @@ -1,6 +1,6 @@ configMap[$key]; - } - - function setValue($key, $value) { - $this->configMap[$key] = $value; - } -} -?> \ No newline at end of file diff --git a/xCAT-web/menu.css b/xCAT-web/menu.css index f61d1fed6..c6f383760 100644 --- a/xCAT-web/menu.css +++ b/xCAT-web/menu.css @@ -1,4 +1,7 @@ /* + +This file is no longer used. + Styles for the navigation area and some other general styles. Some of this came from: @@ -108,7 +111,7 @@ tr.indent td { padding:0px 0 0px 10px; } border-bottom: 1px solid #fff; font-size:11px; padding: 0px 5px 0px 15px; - width: 100%; + /* width: 100%; */ } /* #menu_level3 li { list-style: none; } */ #menu_level3 a:link, a:visited { diff --git a/xCAT-web/style.css b/xCAT-web/style.css index 99e23035e..09e936f5b 100644 --- a/xCAT-web/style.css +++ b/xCAT-web/style.css @@ -1,45 +1,104 @@ - -div#header { - /* background-color : #d8dff1; */ - position: absolute; - left: 15px; - top: 15px; +#headingTable { + margin: 0 20px 10px 20px; + /* background: #FFF url(./images/top.jpg) repeat-x top; */ + background-color: #002432; } -div#nav { - /* background-color : #d8dff1; */ - position: absolute; - left: 0px; - top: 80px; -} - -div#content { - /* background-color : #fcfaeb; */ - position: absolute; - left: 120px; - top: 80px; -} - -/* not used... -P#logo { - background-color: #d8dff1; #f5f3cf #fffdb0 - vertical-align : middle;; - padding-top: 5px; - text-align: center; - padding-bottom: 5px; - margin-bottom: 10px; +/* +#top { + margin: 0 auto 10px auto; + padding: 0; + color: #666; + background: #FFF url(./images/top.jpg) repeat-x top; + background-color: #002432; + height: 65px; } */ -#banner { - font-weight: bolder; - font-size: 16pt; - font-style: italic; - color: #6a8ab5; /* #3F5B7F; gray; */ - text-align: center; - margin: 10px; +#xcatImage { + /* float: left; */ + margin: 5px; + } + +.MenuRow { + border-left: 2px solid white; + border-right: 2px solid white; } +#mainNav { + /* position: absolute; + float: left; */ + list-style: none; + margin: 0px; +} + +#mainNav li { + float: left; + font: .8em Verdana, Arial, Sans-Serif; + line-height: 2.5em; + font-weight: bold; + /* border: 1px solid white; */ +} + +.CurrentMenuItem { + display: block; + padding: 0 2em; + background: #09334b; + color: #fafafa; +} + +.CurrentMenuItemTop { + border-left: 2px solid white; + border-top: 2px solid white; + border-right: 2px solid white; + /* border-bottom: 2px solid #09334b; */ +} + +.MenuItemTop { border-bottom: 2px solid white; } +.MenuItem { /* border-bottom: 2px solid #002432; */ } + +#mainNav a { + display: block; + float: left; /* IE/Mac 5.2 Fix */ + padding: 0 2em; + text-decoration: none; + color: #a1a1a1; + border-left: 1px solid #273942; + cursor: pointer; +} + +/* IE/Win 5.x Fix */ +* html #mainNav a { + width: 1px; +} + +#mainNav a:hover { + background: #09334b; + color: #fafafa; +} + +/* +body.home #mainNav a#home, body.tutorials #mainNav a#tutorials { + background: #09334b; + color: #fafafa; + cursor: default; +} +*/ + +#mainNav li a.active { + color: #fafafa; + +} + +/* +div#content { + background-color : #fcfaeb; + position: absolute; + left: 120px; + top: 180px; +} +*/ + #disclaimer { font-weight: bold; font-size: 9pt; @@ -48,16 +107,6 @@ P#logo { margin: 5px; } -.PageHeading { - /* font-size: 10pt; */ - font: bold 1.4em "Trebuchet MS", Helvetica, Sans-Serif; - color: white; - background-color: transparent; /* #c0c0c0; */ - border: 1px solid white; - border-bottom-style: none; - margin: 2px 2px 10px 2px; -} - .ContentForm { margin: 10px 2px 15px 2px; } BODY { @@ -76,7 +125,6 @@ INPUT {vertical-align : middle; font-size : 8pt; font-family : sans-serif; font- SELECT {vertical-align : middle; font-size : 8pt; font-family : sans-serif; font-weight : bold;} TEXTAREA {vertical-align : middle; font-size : 8pt; font-family : sans-serif; font-weight : bold;} TABLE {font-size : 10pt; font-family : Arial;} - /* pre { padding: 0px; margin: 0px; } */ .TableHeader { color: black; background-color : #fffdb0; font-weight : bold; font-size : 9pt; white-space: nowrap; } @@ -107,69 +155,44 @@ TABLE {font-size : 10pt; font-family : Arial;} .NoMargin { margin: 0px; } .NoPadding { padding: 0px; margin: 0px; border: 0px none white; } .Hidden { visibility : hidden ;} +.Txtfld {font-size : 8pt; font-family : sans-serif; font-weight : bold;} - -.but{ - background-color: #3F5B7F; /* #6a8ab5; #fbf999; */ +/* +.but { + background-color: #3F5B7F; padding: 0px; margin: 0px; } - -.txtfld {font-size : 8pt; font-family : sans-serif; font-weight : bold;} - -/* this was used to make buttons out of table cells... -.bt { - font-size : 8pt; - font-weight : bold; - font-family : sans-serif; - background-image : url(images/bt.gif); - text-align: center; -} */ -/* The rest of the styles were for the navigation area, but are not used any more... -table#navtable { - width: 105px; - font-size : 8pt; - padding-left : 1px; - border: 0px; - white-space: nowrap; + +a.button { + background: transparent url('./images/bg_button_a.gif') no-repeat scroll top right; + color: #444; + display: block; + float: left; + font: normal 12px arial, sans-serif; + height: 24px; + margin-right: 6px; + padding-right: 18px; /* sliding doors padding */ + text-decoration: none; + cursor: pointer; } -.NavCurLink { background-color: #fcfaeb; } - -#nav A{ - font-weight : bold; - font-family : sans-serif; +a.button span { + background: transparent url('./images/bg_button_span.gif') no-repeat; + display: block; + line-height: 14px; + padding: 5px 0 5px 18px; } -#nav P{ - text-indent : 0px; - padding: 0px; - margin: 0px; - font-weight : bold; - font-family : sans-serif; - cursor : default; - vertical-align : middle; +a.button:active { + background-position: bottom right; + color: #000; + outline: none; /* hide dotted outline in Firefox */ } -#nav IMG { border: 0px; } - -.InnerTable{ - margin-left : 0px; - margin-right : 0px; - margin-top : 0px; - margin-bottom : 0px; - border: 0px; - width: 100%; - font-size : 8pt; - white-space: nowrap; +a.button:active span { + background-position: bottom left; + padding: 6px 0 4px 18px; /* push text down 1px */ } - -.OuterTable{ - margin-left : 1px; - margin-right : 1px; - margin-top : 0px; - margin-bottom : 0px; -} -*/ \ No newline at end of file
    -
    - - Nodes -
    -
    HW Type
    OS
    Mode
    Status
    HW Ctrl Pt
    Comment
    -EOS; - $html .= HTMLProducer::getToggleString($nodeGroupName); - $html .= <<$nodeGroupName -
     
     
     
    $img_string
     
     
    \"Previous    \"Next  
    getName(). "\" />" .$node->getName(). "
    " . $node->getHwType(). "
    " . $node->getOs(). "
    " . $node->getMode(). "
    " . $img_string . "
    " . $node->getHwCtrlPt(). "
    " . $node->getComment(). "