diff --git a/lib/visualpatterns/NavBar.inc b/lib/visualpatterns/NavBar.inc deleted file mode 100644 index 3b32f0b..0000000 --- a/lib/visualpatterns/NavBar.inc +++ /dev/null @@ -1,319 +0,0 @@ -sBrowseType = $iTmpBrowseType; - $this->iFolderID = $iTmpFolderID; - $this->iDocumentID = $iTmpDocumentID; - $this->sCategoryName = $sTmpCategoryName; - $this->iDocTypeID = $iTmpDocTypeID; - - $this->mdocs = "$default->graphicsUrl/navbar/mdocs/norm.gif"; - $this->home = "$default->graphicsUrl/navbar/home/norm.gif"; - $this->subscriptions = "$default->graphicsUrl/navbar/subscriptions/norm.gif"; - $this->asearch = "$default->graphicsUrl/navbar/asearch/norm.gif"; - $this->admin = "$default->graphicsUrl/navbar/admin/norm.gif"; - $this->prefs = "$default->graphicsUrl/navbar/prefs/norm.gif"; - $this->help = "$default->graphicsUrl/navbar/help/norm.gif"; - $this->logout = "$default->graphicsUrl/navbar/logout/norm.gif"; - - $this->mdocsClass = "dash"; - $this->homeClass = "dash"; - $this->subscriptionsClass = "dash"; - $this->asearchClass = "dash"; - $this->adminClass = "dash"; - $this->prefsClass = "dash"; - $this->helpClass = "dash"; - $this->logoutClass = "dash"; - } - - /** - * 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; - $this->sSection = $section; - - // check for highlighting..and highlight as required - if($section == "General") { - $this->home = "$default->graphicsUrl/navbar/home/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/home/def.gif"; - $this->homeClass = "dashactive"; - } - - if(($section == "Manage Documents") || ($section == "Manage Categories") || ($section == "Manage Document Types")) { - $this->mdocs = "$default->graphicsUrl/navbar/mdocs/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/mdocs/def.gif"; - $this->mdocsClass = "dashactive"; - } - if($section == "Discussion Threads" ) { - $this->mdocs = "$default->graphicsUrl/navbar/mdocs/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/mdocs/def.gif"; - $this->mdocsClass = "dashactive"; - } - - if($section == "Subscriptions") { - $this->subscriptions = "$default->graphicsUrl/navbar/subscriptions/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/subscriptions/def.gif"; - $this->subscriptionsClass = "dashactive"; - } - - if(($section == "Standard Search") || ($section == "Advanced Search")) { - $this->asearch = "$default->graphicsUrl/navbar/asearch/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/asearch/def.gif"; - $this->asearchClass = "dashactive"; - } - - if(substr($section, -14) == "Administration") { - $this->admin = "$default->graphicsUrl/navbar/admin/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/admin/def.gif"; - $this->adminClass = "dashactive"; - } - - if($section == "Preferences") { - $this->prefs = "$default->graphicsUrl/navbar/prefs/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/prefs/def.gif"; - $this->prefsClass = "dashactive"; - } - - if($section == "Help") { - $this->help = "$default->graphicsUrl/navbar/help/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/help/def.gif"; - $this->helpClass = "dashactive"; - } - - if($section == "Logout") { - $this->logout = "$default->graphicsUrl/navbar/logout/over.gif"; - $this->nwColourBar = "$default->graphicsUrl/navbar/logout/def.gif"; - $this->logoutClass = "dashactive"; - } - } - - /** - * this function creates the navbar for a specific page... - */ - function render() { - global $default; - - //set up headings for row 1 and 2 - $heading = "$default->graphicsUrl/heading.gif"; - $hStretched = "$default->graphicsUrl/hrepeat.gif"; - - // set colour pics for row 4 of navbar - $colourHome = "$default->graphicsUrl/navbar/home/colour.gif"; - $colourmdocs = "$default->graphicsUrl/navbar/mdocs/colour.gif"; - $coloursubscriptions = "$default->graphicsUrl/navbar/subscriptions/colour.gif"; - $colourasearch = "$default->graphicsUrl/navbar/asearch/colour.gif"; - $colouradmin = "$default->graphicsUrl/navbar/admin/colour.gif"; - $colourprefs = "$default->graphicsUrl/navbar/prefs/colour.gif"; - $colourhelp = "$default->graphicsUrl/navbar/help/colour.gif"; - $colourlogout = "$default->graphicsUrl/navbar/logout/colour.gif"; - - // get list of sections - $aTopMenuLinks = array(generateControllerUrl("dashboard"), - generateControllerUrl($default->siteMap->getDefaultAction("Manage Documents")), - generateControllerUrl($default->siteMap->getDefaultAction("Subscriptions")), - generateControllerUrl($default->siteMap->getDefaultAction("Advanced Search")), - generateControllerUrl($default->siteMap->getDefaultAction("Administration")), - generateControllerUrl($default->siteMap->getDefaultAction("Preferences")), - "help", - generateControllerUrl($default->siteMap->getDefaultAction("Logout"))); - - // create array of images for navbar sections - $aTopMenuImages = array($this->home, - $this->mdocs, - $this->subscriptions, - $this->asearch, - $this->admin, - $this->prefs, - $this->help, - $this->logout); - - $aTopMenuClasses = array($this->homeClass, - $this->mdocsClass, - $this->subscriptionsClass, - $this->asearchClass, - $this->adminClass, - $this->prefsClass, - $this->helpClass, - $this->logoutClass); - - $aTopMenuWords = array( - _("Dashboard"), - _("Browse Collections"), - _("Subscriptions"), - _("Advanced Search"), - _("Admin"), - _("Preferences"), - _("Help"), - _("Logout"), - ); - - $aTopMenuColourClass = array( - "dashboard", - "browse", - "subscriptions", - "asearch", - "admin", - "prefs", - "help", - "logout", - ); - - // create array of menu colour images - $aColourMenuImages = array($colourHome,$colourmdocs,$coloursubscriptions,$colourasearch,$colouradmin,$colourprefs,$colourhelp,$colourlogout); - - if ($default->useTextButtons === false) { - //set up the links - for ($i = 0; $i < count($aTopMenuLinks); $i++) { - if (strcmp($aTopMenuLinks[$i], "help") == 0) { - $sTopMenu .= "\n"; - $sColourMenu .= "\n"; - } else { - $sTopMenu .= "" . (strlen($aTopMenuLinks[$i]) > 0 ? "" : "") . "\n"; - $sColourMenu .= "" . (strlen($aTopMenuLinks[$i]) > 0 ? "" : "") . "\n"; - } - } - } else { - for ($i = 0; $i < count($aTopMenuLinks); $i++) { - if (strcmp($aTopMenuLinks[$i], "help") == 0) { - $sTopMenu .= "" . strtoupper($aTopMenuWords[$i]) . "\n"; - $sColourMenu .= " \n"; - } else { - $sTopMenu .= "" . (strlen($aTopMenuLinks[$i]) > 0 ? "" : "") . "" . strtoupper($aTopMenuWords[$i]) . "\n"; - $sColourMenu .= "" . (strlen($aTopMenuLinks[$i]) > 0 ? "" : "") . " \n"; - } - } - } - - $toRender = new PatternCustom; - - // build the nav bar - $bar = "\n"; - $bar .= "\t\n"; - $bar .= "\t\t\n"; - $bar .= "\t\n"; - $bar .= "\t\n"; - $bar .= "\t\t\n"; - $bar .= "\t\n"; - /* $bar .= "
graphicsUrl/logo.jpg\" width=\"30\" height=\"36\" style=\"border-right:3px solid white;\"/>
"; - $bar .= "graphicsUrl/arrow.gif\" >\n"; - - $bar .= "\n "; - //disable the search bar if we are browsing search results - if ((strcmp($this->sSection,"Standard Search") == 0) || (strcmp($this->sSection,"Advanced Search") == 0)) { - $bar .= "\n "; - } else { - $bar .= "rootUrl . "/control.php')\"/>\n"; - (isset($this->iFolderID) ? $bar .= "iFolderID . "\" />\n " : $bar .= ""); - (isset($this->iDocumentID) ? $bar .= "iDocumentID . "\" />\n " : $bar .= ""); - (isset($this->sCategoryName) ? $bar .= "sCategoryName . "\" />\n " : $bar .= ""); - (isset($this->iDocTypeID) ? $bar .= "iDocTypeID . "\" />\n " : $bar .= ""); - //this next line works in IE, and Netscape 4.79 up, but NOT Netscape 4.79 - //$bar .= "rootUrl . "/control.php')\" src=\"$default->graphicsUrl/search.gif\" align = \"absmiddle\" border=\"0\" />\n"; - //replaced with this line - $bar .= "rootUrl . "/control.php')\">graphicsUrl/search.gif\" border=\"0\" />"; - - } - $bar .= "\t\t
$sTopMenu\n"; */ - $bar .= "\n"; - $bar .= "
$sTopMenu\n"; - $bar .= "$sColourMenu
\n"; - - //set the bar as html to object - $toRender->setHtml($bar); - - //render the object - return $this->getSearchValidationJavaScript() . $toRender->render(); - - } - - function getSearchValidationJavaScript() { - $sToRender = "\n\n\n\n"; - return $sToRender; - } -} -?>