From: mka Date: Wed, 6 Mar 2013 07:28:59 +0000 (+0000) Subject: Show description: pen is displayed near the description text; X-Git-Tag: Root_Delivery2_2013_04_22~121 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=de5e4725815b86cc3f9b65de38d4994af0814591;p=tools%2Fsiman.git Show description: pen is displayed near the description text; Edit description/comments: when RTE is displayed the focus is inside the RTE. --- diff --git a/Workspace/Siman/WebContent/jsp/commentPane.jsp b/Workspace/Siman/WebContent/jsp/commentPane.jsp index 63a0634..b3360b4 100644 --- a/Workspace/Siman/WebContent/jsp/commentPane.jsp +++ b/Workspace/Siman/WebContent/jsp/commentPane.jsp @@ -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() { @@ -88,16 +89,16 @@ 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'; diff --git a/Workspace/Siman/WebContent/jsp/readDescription.jsp b/Workspace/Siman/WebContent/jsp/readDescription.jsp index 85fbc20..f1beace 100644 --- a/Workspace/Siman/WebContent/jsp/readDescription.jsp +++ b/Workspace/Siman/WebContent/jsp/readDescription.jsp @@ -2,11 +2,6 @@ pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags"%> -
- -
- - @@ -14,14 +9,15 @@ function showDescriptionEditor() { document.getElementById("descriptionValue").contentDocument.body.innerHTML = document.getElementById("description_value_div").innerHTML; - document.getElementById("display_description_div").style.display = 'none'; - document.getElementById("description_buttons_div").style.display = 'none'; + //document.getElementById("display_description_div").style.display = 'none'; + document.getElementById("description_div").style.display = 'none'; document.getElementById("description_editor_div").style.display = 'block'; + document.getElementById("descriptionValue").focus(); } function hideDescriptionEditor() { - document.getElementById("display_description_div").style.display = 'block'; - document.getElementById("description_buttons_div").style.display = 'block'; + //document.getElementById("display_description_div").style.display = 'block'; + document.getElementById("description_div").style.display = 'block'; document.getElementById("description_editor_div").style.display = 'none'; } @@ -38,9 +34,9 @@ }); -
+
- + - +
" @@ -58,7 +54,12 @@   +
+ +
+   +