From 5bea6042707182f7fb71c388cdb15d28d992df46 Mon Sep 17 00:00:00 2001 From: mka Date: Mon, 27 May 2013 13:44:08 +0000 Subject: [PATCH] Fix for 2 issues: - Add comment by a reviewer or an approver is not displayed; - After having unfolded a document the Add comment button is inoperative. --- .../WebContent/study/displayStudyStep.jsp | 32 ++++++++++--------- .../splat/simer/EditStepCommentAction.java | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Workspace/Siman/WebContent/study/displayStudyStep.jsp b/Workspace/Siman/WebContent/study/displayStudyStep.jsp index 9683fcf..a8eca83 100644 --- a/Workspace/Siman/WebContent/study/displayStudyStep.jsp +++ b/Workspace/Siman/WebContent/study/displayStudyStep.jsp @@ -47,21 +47,23 @@ 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 () { // ------------------- diff --git a/Workspace/Siman/src/org/splat/simer/EditStepCommentAction.java b/Workspace/Siman/src/org/splat/simer/EditStepCommentAction.java index d597e01..98c4f82 100644 --- a/Workspace/Siman/src/org/splat/simer/EditStepCommentAction.java +++ b/Workspace/Siman/src/org/splat/simer/EditStepCommentAction.java @@ -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) { -- 2.39.2