diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentBL.php b/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentBL.php
index 715cd20..6174622 100644
--- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentBL.php
+++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentBL.php
@@ -58,8 +58,9 @@ if (checkSession()) {
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml(getPage($oDocument->getFolderID(), $fDocumentID, $fUnitID, $fUserID, $fDocumentTitle, $fTemplateDocument));
$main->setCentralPayload($oPatternCustom);
+ $main->setOnLoadJavaScript("disable(document.MainForm.fTargetDocument)");
$main->setFormAction($_SERVER["PHP_SELF"] . "?fDocumentID=$fDocumentID&fForStore=1");
- $main->setErrorMessage("An error occured whilst trying to create the dependant document");
+ $main->setErrorMessage("An error occurred whilst trying to create the dependant document");
$main->render();
}
@@ -70,6 +71,7 @@ if (checkSession()) {
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml(getPage($oDocument->getFolderID(), $fDocumentID, $fUnitID, $fUserID, $fDocumentTitle, $fTemplateDocument));
+ $main->setOnLoadJavaScript("disable(document.MainForm.fTargetDocument)");
$main->setCentralPayload($oPatternCustom);
$main->setFormAction($_SERVER["PHP_SELF"] . "?fDocumentID=$fDocumentID&fForStore=1");
$main->render();
diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentUI.inc
index 1adaccc..1e262ce 100644
--- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/createDependantDocumentUI.inc
@@ -27,14 +27,12 @@ function getPage($iFolderID, $iDocumentID, $iUnitID, $iUserID, $sDocumentTitle,
//had a slight problem with netscape 4.7x - it doesn't support disabled. So I had to use
//javascript to set the onFocus attribute to blur
- $bAddNetscapeScript = false;
- if (! (($default->phpSniff->property("browser") == "moz") && ($default->phpSniff->property("version") <= "4.79")) ) {
+ if (!$default->bNN4) {
//for any other browser but netscape 4.7 do this
$sToRender .= "
Template document rootUrl/control.php?action=templateBrowse','window2')\"> \n";
- }else {
+ } else {
//for netscape 4.7 do this
$sToRender .= "Template document rootUrl/control.php?action=templateBrowse','window2')\"> \n";
- $bAddNetscapeScript = true;
}
$sToRender .= "\n";
$sToRender .= "\n";
@@ -43,7 +41,7 @@ function getPage($iFolderID, $iDocumentID, $iUnitID, $iUserID, $sDocumentTitle,
$sToRender .= "\n";
$sToRender .= " \n";
- return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript() . ($bAddNetscapeScript ? getNetscapeDisableScript() : "");
+ return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript();
}
function getUserDropDown($iUnitID, $iUserID) {
@@ -96,18 +94,4 @@ function getBrowseJavaScript() {
$sToRender .= "//-->\n";
return $sToRender;
}
-
-function getNetscapeDisableScript() {
- $sToRender = "\n\n";
- return $sToRender;
-
-}
-
-
-
-
?>
\ No newline at end of file
diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
index e256f83..459dc2c 100644
--- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
+++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsBL.php
@@ -70,6 +70,7 @@ if (checkSession()) {
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml(getAddPage($fFolderCollaborationID, $fFolderID, (isset($fUnitID) ? $fUnitID : -1), (isset($fDocumentTitle) ? $fDocumentTitle : ""), (isset($fDocument) ? $fDocument : ""), (isset($fTargetDocumentID) ? $fTargetDocumentID : "") ));
+ $main->setOnLoadJavaScript("disable(document.MainForm.fTargetDocument)");
$main->setCentralPayload($oPatternCustom);
$main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID&fFolderCollaborationID=$fFolderCollaborationID&fForStore=1");
$main->setHasRequiredFields(true);
@@ -98,6 +99,7 @@ if (checkSession()) {
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml(getEditPage($fFolderID, $fDependantDocumentTemplateID, $fFolderCollaborationID, $oDependantDocumentTemplate->getDocumentTitle(), (isset($oDocument) ? $oDocument->getName() : ""), (isset($oDocument) ? $oDependantDocumentTemplate->getTemplateDocumentID() : null), $oDependantDocumentTemplate->getDefaultUserID()));
+ $main->setOnLoadJavaScript("disable(document.MainForm.fTargetDocument)");
$main->setCentralPayload($oPatternCustom);
$main->setFormAction($_SERVER["PHP_SELF"] . "?fFolderID=$fFolderID&fFolderCollaborationID=$fFolderCollaborationID&fDependantDocumentTemplateID=$fDependantDocumentTemplateID&fForUpdate=1");
$main->setHasRequiredFields(true);
diff --git a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
index f7c67d7..f4297bb 100644
--- a/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
+++ b/presentation/lookAndFeel/knowledgeTree/foldermanagement/viewDependantDocumentsUI.inc
@@ -73,14 +73,12 @@ function getEditPage($iFolderID, $iDependantDocumentID, $iFolderCollaborationID,
//had a slight problem with netscape 4.7x - it doesn't support disabled. So I had to use
//javascript to set the onFocus attribute to blur
- $bAddNetscapeScript = false;
- if (! (($default->phpSniff->property("browser") == "moz") && ($default->phpSniff->property("version") <= "4.79")) ) {
+ if (!$default->bNN4) {
//for any other browser but netscape 4.7 do this
$sToRender .= "Template document \n";
- }else {
+ } else {
//for netscape 4.7 do this
$sToRender .= "Template document \n";
- $bAddNetscapeScript = true;
}
$sToRender .= " \n";
$sToRender .= "\n";
@@ -89,7 +87,7 @@ function getEditPage($iFolderID, $iDependantDocumentID, $iFolderCollaborationID,
$sToRender .= "\n";
$sToRender .= " \n";
- return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript() . ($bAddNetscapeScript ? getNetscapeDisableScript() : "");
+ return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript();
}
@@ -111,16 +109,12 @@ function getAddPage($iFolderCollaborationID, $iFolderID, $iUnitID, $sDocumentTit
//had a slight problem with netscape 4.7x - it doesn't support disabled. So I had to use
//javascript to set the onFocus attribute to blur
- $bAddNetscapeScript = false;
- if (! (($default->phpSniff->property("browser") == "moz") && ($default->phpSniff->property("version") <= "4.79")) ) {
+ if (!$default->bNN4) {
//for any other browser but netscape 4.7 do this
- //$sToRender .= "Template document \n";
$sToRender .= "Template document rootUrl/control.php?action=templateBrowse','window2')\"> \n";
- }else {
+ } else {
//for netscape 4.7 do this
- //$sToRender .= "Template document \n";
$sToRender .= "Template document rootUrl/control.php?action=templateBrowse','window2')\"> \n";
- $bAddNetscapeScript = true;
}
$sToRender .= " \n";
$sToRender .= "\n";
@@ -129,7 +123,7 @@ function getAddPage($iFolderCollaborationID, $iFolderID, $iUnitID, $sDocumentTit
$sToRender .= "\n";
$sToRender .= " \n";
- return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript() . ($bAddNetscapeScript ? getNetscapeDisableScript() : "");
+ return $sToRender . "\n\n" . getValidationJavaScript() . "\n\n" . getBrowseJavaScript();
}
function getUserDropDown($iUnitID, $iUserID = null) {
@@ -176,18 +170,4 @@ function getBrowseJavaScript() {
$sToRender .= "//-->\n";
return $sToRender;
}
-
-function getNetscapeDisableScript() {
- $sToRender = "\n\n";
- return $sToRender;
-
-}
-
-
-
-
?>
\ No newline at end of file
diff --git a/presentation/lookAndFeel/knowledgeTree/js/misc.js b/presentation/lookAndFeel/knowledgeTree/js/misc.js
index d9e2a32..d580dd8 100644
--- a/presentation/lookAndFeel/knowledgeTree/js/misc.js
+++ b/presentation/lookAndFeel/knowledgeTree/js/misc.js
@@ -1,3 +1,17 @@
+
+
+
+
+
+function redirTimer(redirTime, redirURL) {
+ self.setTimeout("self.location.href = redirURL;",redirTime);
+ alert("set redirect time=" + redirTime + ", url=" + redirURL);
+}
+
+function disable(elem) {
+ elem.onfocus=elem.blur;
+}
+
function setActionAndSubmit(newAction) {
document.MainForm.action = newAction;
document.MainForm.submit();