1 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
2 pageEncoding="ISO-8859-1"%>
3 <%@ taglib prefix="s" uri="/struts-tags"%>
4 <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
6 <div id="display_comments_div">
7 <tiles:insertAttribute name="display_comments_pane" ignore="true" />
10 <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
11 <script type="text/javascript">
12 $(document).ready(function(){
13 $("#comments_form").ajaxForm({
14 target: '#display_comments_div'
17 // Bind the add button
18 $("#add_button").click(function() {
19 document.getElementById("add_button_div").style.display = 'none';
20 document.getElementById("add_comments_div").style.display = 'block';
23 function hideEditor() {
24 document.getElementById("add_button_div").style.display = 'block';
25 document.getElementById("add_comments_div").style.display = 'none';
26 document.getElementById(currentRTE).contentDocument.body.innerHTML=''; //clean input area
27 document.getElementById("commentTitle").value='';
30 // Bind the cancel button
31 $("#cancel_button").click(hideEditor);
33 // Bind the submit button
34 $('#comments_form').on('submit', hideEditor);
38 <div id="add_button_div">
39 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="attribute">
41 <td width="20" height="20" align="center">
42 <img id="add_button" src="<s:url value="/skin/icon.add.png"/>" onMouseOver=this.src="<s:url value="/skin/icon.addhot.png"/>"
43 onMouseOut=this.src="<s:url value="/skin/icon.add.png"/>" title="<s:text name="tooltip.addcomment"/>"/>
50 <div id="add_comments_div" style="display: none;">
51 <form name="comments_form" id="comments_form" action="create-stepComment" method="post">
52 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="attribute">
54 <td width="20" height="20" align="center">
55 <img id="cancel_button" src="<s:url value="/skin/icon.undo.png"/>"
56 title="<s:text name="tooltip.cancel"/>" />
59 <input type="text" name="commentTitle" id="commentTitle">
60 <script language='JavaScript'>
61 displayTextEditor('commentValue', '', 650, 150);