From d7f0e11cb0c63f456d611db012327c4d400d44f4 Mon Sep 17 00:00:00 2001 From: mukhtar Date: Wed, 22 Jan 2003 13:32:30 +0000 Subject: [PATCH] changed certain widths and hights for table rows --- lib/visualpatterns/NavBar.inc | 198 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------ lib/visualpatterns/PatternMainPage.inc | 2 +- lib/visualpatterns/PatternTableLinks.inc | 6 +++--- 3 files changed, 118 insertions(+), 88 deletions(-) diff --git a/lib/visualpatterns/NavBar.inc b/lib/visualpatterns/NavBar.inc index d310c66..bf96782 100644 --- a/lib/visualpatterns/NavBar.inc +++ b/lib/visualpatterns/NavBar.inc @@ -3,22 +3,29 @@ require_once("$default->owl_fs_root/lib/visualpatterns/PatternCustom.inc"); /** -* Class NavBar.inc +* NavBar.inc * -* Contains all the functions to create the navbar...as well as possibly handling the -* westpayload section. +* Create the top section of the navbar.. * * * @author Mukhtar Dharsey -* @date 20 January 2003 +* @date 22 January 2003 */ global $default; +/** +* +* +* Contains all the functions to create the navbar... +* +* +* @author Mukhtar Dharsey +* @date 22 January 2003 +*/ class NavBar { //variable used to pass highlighting - var $highlightedSection; var $home; var $mdocs; var $asearch; @@ -26,93 +33,106 @@ class NavBar var $prefs; var $help; var $logout; + var $nwColourbar; - function setHighlightedSection($currentSection) + function NavBar() { - return $this->$highlightedSection = $currentSection; + global $default; + $this->mdocs = "$default->owl_graphics_url/mdocs/norm.gif"; + $this->home = "$default->owl_graphics_url/home/norm.gif"; + $this->asearch = "$default->owl_graphics_url/asearch/norm.gif"; + $this->admin = "$default->owl_graphics_url/admin/norm.gif"; + $this->prefs = "$default->owl_graphics_url/prefs/norm.gif"; + $this->help = "$default->owl_graphics_url/help/norm.gif"; + $this->logout = "$default->owl_graphics_url/logout/norm.gif"; + } - - // this function creates the navbar for a specific page... - // Todo take parameter to set page highlighting - function render() + + /** + * gets the url for the colour bar + * + * @param The section that needs to be highlighted + */ + function getNWColourbar() + { + return $this->nwColourBar; + } + + + + /** + * sets a highlighted section varaibles + * + * @param The section that needs to be highlighted + */ + function setHighlightedSection($section) { global $default; - if($this->$highlightedSection == "General") + // check for highlighting..and highlight as required + if($section == "General") { - $home = "$default->owl_graphics_url/home/over.gif"; - } - else - { - $home = "$default->owl_graphics_url/home/norm.gif"; + $this->home = "$default->owl_graphics_url/home/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/home/def.gif"; } - if($this->$highlightedSection == "Manage Documents") - { - $mdocs = "$default->owl_graphics_url/mdocs/over.gif"; - } - else + if($section == "Manage Documents") { - $mdocs = "$default->owl_graphics_url/mdocs/norm.gif"; + $this->mdocs = "$default->owl_graphics_url/mdocs/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/mdocs/def.gif"; } - if($this->$highlightedSection == "Advanced Search") - { - $asearch = "$default->owl_graphics_url/asearch/over.gif"; - } - else + if($section == "Advanced Search") { - $asearch = "$default->owl_graphics_url/asearch/norm.gif"; + $this->asearch = "$default->owl_graphics_url/asearch/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/asearch/def.gif"; } - if($this->$highlightedSection == "Administration") - { - $admin = "$default->owl_graphics_url/admin/over.gif"; - } - else - { - $admin = "$default->owl_graphics_url/admin/norm.gif"; - } - if($this->$highlightedSection == "Preferences") + if($section == "Administration") { - $prefs = "$default->owl_graphics_url/prefs/over.gif"; + $this->admin = "$default->owl_graphics_url/admin/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/admin/def.gif"; } - else + + if($section == "Preferences") { - $prefs = "$default->owl_graphics_url/prefs/norm.gif"; + $this->prefs = "$default->owl_graphics_url/prefs/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/prefs/def.gif"; } - if($this->$highlightedSection == "Help") - { - $help = "$default->owl_graphics_url/help/over.gif"; - } - else + if($section == "Help") { - $help = "$default->owl_graphics_url/help/norm.gif"; + $this->help = "$default->owl_graphics_url/help/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/help/def.gif"; } - if($this->$highlightedSection == "Logout") - { - $logout = "$default->owl_graphics_url/logout/over.gif"; - } - else + + if($section == "Logout") { - $logout = "$default->owl_graphics_url/logout/norm.gif"; + $this->logout = "$default->owl_graphics_url/logout/over.gif"; + $this->nwColourBar = "$default->owl_graphics_url/logout/def.gif"; } + } + + + + /** + * + * this function creates the navbar for a specific page... + * + * + */ + function render() + { + global $default; - - //$mdocs = "$default->owl_graphics_url/mdocs/norm.gif"; - //$asearch = "$default->owl_graphics_url/asearch/norm.gif"; - //$admin = "$default->owl_graphics_url/admin/norm.gif"; - //$prefs = "$default->owl_graphics_url/prefs/norm.gif"; - //$help = "$default->owl_graphics_url/help/norm.gif"; - //$logout = "$default->owl_graphics_url/logout/norm.gif"; - + //set up headings for row 1 and 2 $heading = "$default->owl_graphics_url/heading.gif"; $hStretched = "$default->owl_graphics_url/hrepeat.gif"; + // set colour pics for row 4 of navbar $colourHome = "$default->owl_graphics_url/home/colour.gif"; $colourmdocs = "$default->owl_graphics_url/mdocs/colour.gif"; $colourasearch = "$default->owl_graphics_url/asearch/colour.gif"; @@ -122,11 +142,7 @@ class NavBar $colourlogout = "$default->owl_graphics_url/logout/colour.gif"; - - - // build the top menu of links - - // get list of sections + // get list of sections $aTopMenuLinks = array(generateControllerUrl("dashboard"), generateControllerUrl($default->siteMap->getDefaultAction("Manage Documents")), generateControllerUrl($default->siteMap->getDefaultAction("Advanced Search")), @@ -134,11 +150,22 @@ class NavBar generateControllerUrl($default->siteMap->getDefaultAction("Preferences")), generateControllerUrl($default->siteMap->getDefaultAction("Help")), generateControllerUrl($default->siteMap->getDefaultAction("Logout"))); - - $aTopMenuImages = array($home,$mdocs,$asearch,$admin,$prefs,$help,$logout); - + + + // create array of images for navbar sections + $aTopMenuImages = array($this->home, + $this->mdocs, + $this->asearch, + $this->admin, + $this->prefs, + $this->help, + $this->logout); + + + // create array of menu colour images $row4MenuImages = array($colourHome,$colourmdocs,$colourasearch,$colouradmin,$colourprefs,$colourhelp,$colourlogout); + //set up the links $oPatternTableLinks = new PatternTableLinks($aTopMenuLinks, null, 1, 7,2,$aTopMenuImages); $oColourTableLinks = new PatternTableLinks($aTopMenuLinks, null, 1, 7,2,$row4MenuImages); @@ -152,30 +179,33 @@ class NavBar //array of coloured section images $row4 = $oColourTableLinks->render(); - $toRender = new PatternCustom; + $toRender = new PatternCustom; - //bar width based on main page sizes...80% of width(600)..30% of height(800) - $bar= " - + //bar is the actaul html creation of the nav bar + $bar= " + - +
- + - - + - + -
". $row1 ."
+
". $row3 . "
". $row3 . "
". $row4 . "
". $row4 . "
+ - - "; + + "; - $toRender->setHtml($bar); - - return $toRender->render(); + + //set the bar as html to object + $toRender->setHtml($bar); + + //render the object + return $toRender->render(); } diff --git a/lib/visualpatterns/PatternMainPage.inc b/lib/visualpatterns/PatternMainPage.inc index afc8790..59e9234 100644 --- a/lib/visualpatterns/PatternMainPage.inc +++ b/lib/visualpatterns/PatternMainPage.inc @@ -63,7 +63,7 @@ class PatternMainPage {
sFormAction."\" method=\"get\"> - \n +
\n \n
"; if (isset($this->oNorthWestPayload)) { diff --git a/lib/visualpatterns/PatternTableLinks.inc b/lib/visualpatterns/PatternTableLinks.inc index 19f51af..e43e198 100644 --- a/lib/visualpatterns/PatternTableLinks.inc +++ b/lib/visualpatterns/PatternTableLinks.inc @@ -55,13 +55,13 @@ class PatternTableLinks { function & render() { $iArraySize = array_count_values($this->aLinks); $iArrayCount = 0; - $sToRender = "\n"; + $sToRender = "
\n"; //build the table for ($i = 0; $i < $this->iRows; $i++) { - $sToRender = $sToRender . "\n"; + $sToRender = $sToRender . "\n"; for ($j = 0; $j < $this->iColumns; $j++) { - $sToRender = $sToRender . "
"; + $sToRender = $sToRender . ""; if ($iArrayCount < $iArraySize) { $sToRender = $sToRender . "aLinks[$iArrayCount] . "\" />"; if ($this->iLinkType == TEXT) { -- libgit2 0.21.4