Commit d0ab686fab176dce6cd54734230ab90e6acbd629

Authored by rob
1 parent 7278dac4

Added search button redirect functionality


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1019 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 33 additions and 14 deletions
lib/visualpatterns/NavBar.inc
@@ -32,9 +32,24 @@ class NavBar @@ -32,9 +32,24 @@ class NavBar
32 var $logout; 32 var $logout;
33 var $nwColourbar; 33 var $nwColourbar;
34 34
35 - function NavBar()  
36 - { 35 + /** variables used for searching */
  36 + var $sBrowseType;
  37 + var $iFolderID;
  38 + var $iDocumentID;
  39 + var $sCategoryName;
  40 + var $iDocTypeID;
  41 +
  42 + function NavBar($sTmpBrowseType, $iTmpFolderID, $iTmpDocumentID, $sTmpCategoryName, $iTmpDocTypeID)
  43 + {
37 global $default; 44 global $default;
  45 +
  46 + $this->sBrowseType = $iTmpBrowseType;
  47 + $this->iFolderID = $iTmpFolderID;
  48 + $this->iDocumentID = $iTmpDocumentID;
  49 + $this->sCategoryName = $sTmpCategoryName;
  50 + $this->iDoctypeID = $iTmpDocTypeID;
  51 +
  52 +
38 $this->mdocs = "$default->owl_graphics_url/mdocs/norm.gif"; 53 $this->mdocs = "$default->owl_graphics_url/mdocs/norm.gif";
39 $this->home = "$default->owl_graphics_url/home/norm.gif"; 54 $this->home = "$default->owl_graphics_url/home/norm.gif";
40 $this->subscriptions = "$default->owl_graphics_url/subscriptions/norm.gif"; 55 $this->subscriptions = "$default->owl_graphics_url/subscriptions/norm.gif";
@@ -191,18 +206,22 @@ class NavBar @@ -191,18 +206,22 @@ class NavBar
191 206
192 //bar is the actaul html creation of the nav bar 207 //bar is the actaul html creation of the nav bar
193 $bar= " 208 $bar= "
194 - <Table cellpadding = \"1\" cellspacing = \"1\" border=\"1\" width=\"100%\" height=\"100%\">  
195 - <tr height=\"20%\"><td background = " . $hStretched ." width =\"100%\">". $row1 ."</td></tr>  
196 - <tr height=\"30%\"> <td VALIGN = \"absmiddle\" background = " . $hStretched ." width =\"100%\" NOWRAP >  
197 - <img align = \"absmiddle\" src = \"$default->owl_graphics_url/arrow.gif\" ></img>  
198 - <INPUT type=\"Text\" name=\"searchField\" width=\"30\" height = \"10\" align = \"absmiddle\" >  
199 - <INPUT type=\"image\" name=\"search\" value=\"Search\" src=\"$default->owl_graphics_url/search.gif\" align = \"absmiddle\" border=\"0\">  
200 - </td>  
201 - </tr>  
202 - <tr height=\"25%\" ><td width =\"10%\">". $row3 . "</td></tr>  
203 - <tr height=\"25%\"><td width =\"100%\">". $row4 . "</td></tr>  
204 - </table>  
205 - "; 209 + <Table cellpadding = \"1\" cellspacing = \"1\" border=\"1\" 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->owl_graphics_url/arrow.gif\" ></img>\n " .
  213 + "<INPUT type=\"Text\" name=\"fSearchText\" width=\"30\" height = \"10\" align = \"absmiddle\" />\n " .
  214 + "<INPUT type=\"hidden\" name=\"fBrowseType\" value=\"" . $this->sBrowseType . "\" />\n " .
  215 + "<INPUT type=\"hidden\" name=\"fFolderID\" value=\"" . $this->iFolderID . "\" />\n " .
  216 + "<INPUT type=\"hidden\" name=\"fDocumentID\" value=\"" . $this->iDocumentID . "\" />\n " .
  217 + "<INPUT type=\"hidden\" name=\"fCategoryName\" value=\"" . $this->sCategoryName . "\" />\n " .
  218 + "<INPUT type=\"hidden\" name=\"fDocTypeID\" value=\"" . $this->iDocTypeID . "\" />\n " .
  219 + "<INPUT type=\"button\" onClick=\"setActionAndSubmit('$default->owl_root_url/presentation/lookAndFeel/knowledgeTree/documentmanagement/searchDocumentBL.php')\" value=\"Search\" src=\"$default->owl_graphics_url/search.gif\" align = \"absmiddle\" border=\"0\" />\n " .
  220 + "</td>\n " .
  221 + "</tr>\n" .
  222 + "<tr height=\"25%\" ><td width =\"10%\">". $row3 . "</td></tr>\n" .
  223 + "<tr height=\"25%\"><td width =\"100%\">". $row4 . "</td></tr>\n" .
  224 + "</table>\n";
206 225
207 //set the bar as html to object 226 //set the bar as html to object
208 $toRender->setHtml($bar); 227 $toRender->setHtml($bar);