From 2b9d0b6fb679ea0d61ba3e29442df0ca02189894 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Tue, 10 Jun 2003 12:22:47 +0000 Subject: [PATCH] added onLoadJavascript attribute fixed session timeout for ns 4.7 added getFormAction method --- lib/visualpatterns/PatternMainPage.inc | 55 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/lib/visualpatterns/PatternMainPage.inc b/lib/visualpatterns/PatternMainPage.inc index 3dbf5b4..07166de 100644 --- a/lib/visualpatterns/PatternMainPage.inc +++ b/lib/visualpatterns/PatternMainPage.inc @@ -1,18 +1,20 @@ oNorthWestPayload = & $oNewVal; } @@ -85,6 +89,10 @@ class PatternMainPage { $this->sWestPayloadBackGroundColour = $sColour; } + function getFormAction() { + return $this->sFormAction; + } + function setFormAction($sNewVal) { $this->sFormAction = & $sNewVal; } @@ -105,6 +113,11 @@ class PatternMainPage { $this->sHelpContext = $sNewValue; } + function setOnLoadJavaScript($sJavaScript) { + $this->onLoadJavaScript = $sJavaScript; + } + + /** * Render the page in HTML @@ -113,12 +126,12 @@ class PatternMainPage { global $default; $sToRender = "\n" . "\n" . - "sessionTimeout+3) . "\">\n" . + "sessionTimeout+3) . ";\">\n" . "graphicsUrl/tree.ico\">\n" . "uiUrl/stylesheet.php\">\n". PatternMainPage::getJavaScript() . "\n" . "\n" . - "\n"; + "onLoadJavaScript) ? "onload=\"$this->onLoadJavaScript\"" : "") . ">\n"; // hack to circumvent the crapness of ns 4.79 if (! (($default->phpSniff->property("browser") == "moz") && ($default->phpSniff->property("version") <= "4.79")) ) { $sToRender .= "
" . @@ -129,7 +142,7 @@ class PatternMainPage { "
"; } - $sToRender .= "
sFormEncType) ? "enctype=\"$this->sFormEncType\" " : " ") . " action=\"".$this->sFormAction."\" method=POST " . (($this->bHasRequiredFields) ? "onsubmit=\"return validateForm(this)\" " : " ") . ">\n" . + $sToRender .= "sFormEncType) ? "enctype=\"$this->sFormEncType\" " : " ") . " action=\"".$this->sFormAction."\" method=\"POST\" " . (($this->bHasRequiredFields) ? "onsubmit=\"return validateForm(this)\" " : " ") . ">\n" . "\n " . "\n". "
sNorthWestPayloadBackGroundColour) ? " bgcolor=\"" . $this->sNorthWestPayloadBackGroundColour . "\"" : "") . ">\n"; @@ -184,12 +197,12 @@ class PatternMainPage { } /** - * Returns links to javascript that has 3 functions: - * o validateString - validates a string - * o validateNumber - validates a number - * o setActionAndSubmit - sets the MainForm action to newAction and submits - * And includes the dhtml text scrolling routine - */ + * Returns links to javascript that has 3 functions: + * o validateString - validates a string + * o validateNumber - validates a number + * o setActionAndSubmit - sets the MainForm action to newAction and submits + * And includes the dhtml text scrolling routine + */ function getJavaScript() { global $default; $sUrl = $default->uiUrl; -- libgit2 0.21.4