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';
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
-<div id="description_value_div">
- <s:property value="descriptionValue" escapeHtml="false"/>
-</div>
-
-
<s:if test="userCanModufyDescription()">
<!-- Set description functionality -->
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';
}
});
</script>
- <div id="description_buttons_div">
+ <div id="description_div">
<table width="100%" cellpadding="0" cellspacing="0" border="0" class="attribute">
- <tr>
+ <tr valign="top">
<td width="20" height="20" align="center">
<s:if test="%{descriptionValue==null}">
<img id="add_description_button" src="<s:url value="/skin/icon.add.png"/>"
</s:a>
</s:else>
</td>
- <td> </td>
+ <td>
+ <div id="description_value_div">
+ <s:property value="descriptionValue" escapeHtml="false"/>
+ </div>
+
+ </td>
</tr>
</table>
</div>