Salome HOME
Fix for 2 issues:
authormka <mka@opencascade.com>
Mon, 27 May 2013 13:44:08 +0000 (13:44 +0000)
committermka <mka@opencascade.com>
Mon, 27 May 2013 13:44:08 +0000 (13:44 +0000)
- Add comment by a reviewer or an approver is not displayed;
- After having unfolded a document the Add comment button is inoperative.

Workspace/Siman/WebContent/study/displayStudyStep.jsp
Workspace/Siman/src/org/splat/simer/EditStepCommentAction.java

index 9683fcf3e042fb5b1acf4d72468d077c13d7a12f..a8eca831f28eb65d70524a63905f1195eaa8d29d 100644 (file)
     
     function initialize (action) {
 //  ----------------------------
-      if (action == "setContext") {
-         edit.elements[2].focus();
-      } else
-      if (action == "renameDocument") {
-        edoc.documentTitle.focus();
-      } else
-      if (action == "renameKnowledge") {
-        edit.knowledgeTitle.focus();
-      } else
-      if (action == "addKnowledge") {
-        edit.elements[1].focus();
-      } else
-      if (action != "display") {
-         edit.elements[0].focus();
-      }
+      if(typeof edit !== 'undefined') {
+             if (action == "setContext") {
+                 edit.elements[2].focus();
+             } else
+             if (action == "renameDocument") {
+               edoc.documentTitle.focus();
+             } else
+             if (action == "renameKnowledge") {
+               edit.knowledgeTitle.focus();
+             } else
+             if (action == "addKnowledge") {
+               edit.elements[1].focus();
+             } else
+             if (action != "display") {
+                 edit.elements[0].focus();
+             }
+         }
     }
     function setValue () {
 //  -------------------
index d597e011d32aea7734c3e9718a3802a475832abc..98c4f827d674ef3c362dcdae88b4cbc757bb123a 100644 (file)
@@ -91,7 +91,7 @@ public class EditStepCommentAction extends DisplayStudyStepAction {
         * @return SUCCESS
         */
        public String doCreate() {
-               if ("true".equals(getWriteAccess()) && getUserRights().canCreateDocument()
+               if ("true".equals(getWriteAccess())
                                && _commentValue!=null  && _commentValue.length()>0
                                && _commentTitle!=null  && _commentTitle.length()>0) {