]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/WebContent/jsp/commentPane.jsp
Salome HOME
Show description: pen is displayed near the description text;
[tools/siman.git] / Workspace / Siman / WebContent / jsp / commentPane.jsp
index 63a063469e0d00a7f48ae7f11c5ecdce6c4f42af..b3360b4f79ec02ff23e9b7b822a2fcdcdbcba971 100644 (file)
@@ -51,8 +51,9 @@
                 trim(document.getElementById('comment_'+commentId+'_body').innerHTML);
 
         commentToEditId = commentId;
+        document.getElementById('commentToEditTitle').focus();
         redrawEditor();
-        document.onchange = redrawEditor;
+        window.onresize = redrawEditor;
     }
 
     function hideEditCommentEditor() {
                    target: '#display_comments_div'
                });
                
-            function showCommentEditor(commentTitle, commentBody) {
-                document.getElementById('commentTitle').value=commentTitle;
-                document.getElementById(currentRTE).contentDocument.body.innerHTML=commentBody;
+            function showCommentEditor() {
+                document.getElementById('commentTitle').value='';
+                document.getElementById(currentRTE).contentDocument.body.innerHTML='';
                 document.getElementById('add_comment_button_div').style.display = 'none';
                 document.getElementById('add_comment_div').style.display = 'block';
+                document.getElementById('commentTitle').focus();
             }
-
            
                // Bind the add button
-                   $("#add_comment_button").click(function() {showCommentEditor('','');});
+                   $("#add_comment_button").click(showCommentEditor);
                    
                    function hideCommentEditor() {
                  document.getElementById("add_comment_button_div").style.display = 'block';