Commit b66fc0c1b4f4052e48f33e0c8e7bd79fbdf65204

Authored by Michael Joseph
1 parent 7f4e3873

fixed help for ns, tidied html and squeezed navbar a little closer together


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1488 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 13 additions and 19 deletions
lib/visualpatterns/NavBar.inc
@@ -178,42 +178,37 @@ class NavBar { @@ -178,42 +178,37 @@ class NavBar {
178 178
179 179
180 // create array of menu colour images 180 // create array of menu colour images
181 - $row4MenuImages = array($colourHome,$colourmdocs,$coloursubscriptions,$colourasearch,$colouradmin,$colourprefs,$colourhelp,$colourlogout); 181 + $aColourMenuImages = array($colourHome,$colourmdocs,$coloursubscriptions,$colourasearch,$colouradmin,$colourprefs,$colourhelp,$colourlogout);
182 182
183 //set up the links 183 //set up the links
184 - $sTopMenu = "<table width=\"100%\" height=\"100%\" cellspacing = \"0\">\n<tr>\n";  
185 for ($i = 0; $i < count($aTopMenuLinks); $i++) { 184 for ($i = 0; $i < count($aTopMenuLinks); $i++) {
186 if (strcmp($aTopMenuLinks[$i], "help") == 0) { 185 if (strcmp($aTopMenuLinks[$i], "help") == 0) {
187 - $sTopMenu .= "<td cellspacing = \"20\"><input type=\"image\" src=\"" . $aTopMenuImages[$i] . "\" onClick=\"return helpWindow();\" border=\"0\" /></a></td>\n"; 186 + $sTopMenu .= "<a href=\"#\" onClick=\"javascript:helpWindow();\"><image src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a>";
  187 + $sColourMenu .= "<a href=\"#\" onClick=\"javascript:helpWindow();\"><image src=\"" . $aColourMenuImages[$i] . "\" border=\"0\" /></a>";
188 } else { 188 } else {
189 - $sTopMenu .= "<td cellspacing = \"20\">" . (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a></td>\n"; 189 + $sTopMenu .= (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aTopMenuImages[$i] . "\" border=\"0\" /></a>\n";
  190 + $sColourMenu .= (strlen($aTopMenuLinks[$i]) > 0 ? "<a href=\"" . $aTopMenuLinks[$i] . "\">" : "") . "<img src=\"" . $aColourMenuImages[$i] . "\" border=\"0\"/></a>\n";
190 } 191 }
191 } 192 }
192 - $sTopMenu .= "</tr>\n</table>\n";  
193 - $oColourTableLinks = new PatternTableLinks($aTopMenuLinks, null, 1, 8,2,$row4MenuImages); 193 + $sMenu = $sTopMenu . "<br>" . $sColourMenu;
194 194
195 // set up rows 195 // set up rows
196 //row one image 196 //row one image
197 $row1 = "<img src = ". $heading. ">"; 197 $row1 = "<img src = ". $heading. ">";
198 //row 2 will be a search bar 198 //row 2 will be a search bar
199 $row2 =""; 199 $row2 ="";
200 - //row 3 will be the heading subsections  
201 - //$row3 = $oPatternTableLinks->render();  
202 - $row3 = $sTopMenu;  
203 - //array of coloured section images  
204 - $row4 = $oColourTableLinks->render();  
205 200
206 - $toRender = new PatternCustom; 201 + $toRender = new PatternCustom;
207 202
208 //bar is the actaul html creation of the nav bar 203 //bar is the actaul html creation of the nav bar
209 - $bar= "<table cellpadding = \"1\" cellspacing = \"1\" border=\"0\" width=\"100%\" height=\"100%\">\n " .  
210 - "<tr height=\"20%\"><td background = " . $hStretched ." width =\"100%\">". $row1 ."</td></tr>\n " .  
211 - "<tr height=\"30%\"> <td VALIGN = \"absmiddle\" background = " . $hStretched ." width =\"100%\" NOWRAP >\n " .  
212 - "<img align = \"absmiddle\" src = \"$default->graphicsUrl/arrow.gif\" ></img>\n " . 204 + $bar= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\" height=\"100%\">\n " .
  205 + "<tr height=\"20%\"><td background=\"" . $hStretched . "\" width =\"100%\">". $row1 ."</td></tr>\n " .
  206 + "<tr height=\"30%\"> <td valign=\"absmiddle\" background=\"" . $hStretched . "\" width =\"100%\" nowrap>\n " .
  207 + "<img align=\"absmiddle\" src=\"$default->graphicsUrl/arrow.gif\" ></img>\n " .
213 "<INPUT type=\"hidden\" name=\"fForStandardSearch\" value=\"no\" />\n "; 208 "<INPUT type=\"hidden\" name=\"fForStandardSearch\" value=\"no\" />\n ";
214 //disable the search bar if we are browsing search results 209 //disable the search bar if we are browsing search results
215 if ((strcmp($this->sSection,"Standard Search") == 0) || (strcmp($this->sSection,"Advanced Search") == 0)) { 210 if ((strcmp($this->sSection,"Standard Search") == 0) || (strcmp($this->sSection,"Advanced Search") == 0)) {
216 - $bar .= "<INPUT type=\"hidden\" name=\"fSearchText\" width=\"30\" height = \"10\" align = \"absmiddle\" />\n "; 211 + $bar .= "<INPUT type=\"hidden\" name=\"fSearchText\" width=\"30\" height=\"10\" align=\"absmiddle\" />\n ";
217 } else { 212 } else {
218 $bar .= "<INPUT type=\"text\" name=\"fStandardSearchString\" width=\"30\" height = \"10\" align = \"absmiddle\" />\n " . 213 $bar .= "<INPUT type=\"text\" name=\"fStandardSearchString\" width=\"30\" height = \"10\" align = \"absmiddle\" />\n " .
219 "<INPUT type=\"hidden\" name=\"fFolderID\" value=\"" . $this->iFolderID . "\" />\n " . 214 "<INPUT type=\"hidden\" name=\"fFolderID\" value=\"" . $this->iFolderID . "\" />\n " .
@@ -224,8 +219,7 @@ class NavBar { @@ -224,8 +219,7 @@ class NavBar {
224 } 219 }
225 $bar .= "</td>\n " . 220 $bar .= "</td>\n " .
226 "</tr>\n" . 221 "</tr>\n" .
227 - "<tr height=\"25%\" ><td width =\"10%\">". $row3 . "</td></tr>\n" .  
228 - "<tr height=\"25%\"><td width =\"100%\">". $row4 . "</td></tr>\n" . 222 + "<tr height=\"25%\"><td nowrap>$sMenu</td></tr>\n" .
229 "</table>\n"; 223 "</table>\n";
230 224
231 //set the bar as html to object 225 //set the bar as html to object