Commit 9eca8b6bb0d553ca892cf04669b81cd9a4833a18

Authored by michael
1 parent 0e1a801c

added extra div switching parameter

factored document download and inline view to a separate page


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@2178 c91229c3-7414-0410-bfa2-8a42b809f60b
presentation/lookAndFeel/knowledgeTree/documentmanagement/viewBL.php
@@ -70,23 +70,6 @@ if (checkSession()) { @@ -70,23 +70,6 @@ if (checkSession()) {
70 $oPatternCustom->setHtml(getPage($oDocument, true)); 70 $oPatternCustom->setHtml(getPage($oDocument, true));
71 $main->setErrorMessage("You cannot edit a document collaboration step that is completed or currently underway"); 71 $main->setErrorMessage("You cannot edit a document collaboration step that is completed or currently underway");
72 $main->setFormAction("$default->rootUrl/control.php?action=modifyDocument&fDocumentID=" . $oDocument->getID()); 72 $main->setFormAction("$default->rootUrl/control.php?action=modifyDocument&fDocumentID=" . $oDocument->getID());
73 - } else if (isset($fForInlineView) && Permission::userHasDocumentReadPermission($fDocumentID)) {  
74 - $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Inline view", VIEW);  
75 - $oDocumentTransaction->create();  
76 - PhysicalDocumentManager::inlineViewPhysicalDocument($fDocumentID);  
77 - } else if (isset($fForDownload) && Permission::userHasDocumentReadPermission($fDocumentID)) {  
78 - //if the user has document read permission, perform the download  
79 - if (isset($fVersion)) {  
80 - // we're downloading an old version of the document  
81 - $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Document version $fVersion downloaded", DOWNLOAD);  
82 - $oDocumentTransaction->create();  
83 - PhysicalDocumentManager::downloadVersionedPhysicalDocument($fDocumentID, $fVersion);  
84 - } else {  
85 - // download the current version  
86 - $oDocumentTransaction = & new DocumentTransaction($fDocumentID, "Document downloaded", DOWNLOAD);  
87 - $oDocumentTransaction->create();  
88 - PhysicalDocumentManager::downloadPhysicalDocument($fDocumentID);  
89 - }  
90 } else if (isset($fBeginCollaboration) && Permission::userHasDocumentWritePermission($fDocumentID)) { 73 } else if (isset($fBeginCollaboration) && Permission::userHasDocumentWritePermission($fDocumentID)) {
91 //begin the collaboration process 74 //begin the collaboration process
92 //first ensure that all steps in the collaboration process are assigned 75 //first ensure that all steps in the collaboration process are assigned
@@ -182,8 +165,6 @@ if (checkSession()) { @@ -182,8 +165,6 @@ if (checkSession()) {
182 // prompt for the website to publish to 165 // prompt for the website to publish to
183 $oPatternCustom->setHtml(getWebPublishPage($oDocument)); 166 $oPatternCustom->setHtml(getWebPublishPage($oDocument));
184 $main->setFormAction($_SERVER['PHP_SELF']); 167 $main->setFormAction($_SERVER['PHP_SELF']);
185 - //$main->setDHTMLScrolling(false);  
186 - //$main->setOnLoadJavaScript("switchDiv('documentData')");  
187 } 168 }
188 169
189 } else if (Permission::userHasDocumentWritePermission($fDocumentID) || Permission::userHasDocumentReadPermission($fDocumentID)) { 170 } else if (Permission::userHasDocumentWritePermission($fDocumentID) || Permission::userHasDocumentReadPermission($fDocumentID)) {
@@ -220,7 +201,7 @@ if (checkSession()) { @@ -220,7 +201,7 @@ if (checkSession()) {
220 $main->setErrorMessage("The document you have chosen no longer exists in the DMS."); 201 $main->setErrorMessage("The document you have chosen no longer exists in the DMS.");
221 } 202 }
222 $main->setDHTMLScrolling(false); 203 $main->setDHTMLScrolling(false);
223 - $main->setOnLoadJavaScript("switchDiv('documentData')"); 204 + $main->setOnLoadJavaScript("switchDiv('documentData', 'document')");
224 $main->setFormAction("$default->rootUrl/control.php?action=modifyDocument&fDocumentID=" . $oDocument->getID()); 205 $main->setFormAction("$default->rootUrl/control.php?action=modifyDocument&fDocumentID=" . $oDocument->getID());
225 } else { 206 } else {
226 if ($oDocument) { 207 if ($oDocument) {