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_description_div">
7 <tiles:insertAttribute name="display_description_pane" ignore="true" />
10 <s:if test="%{writeAccess == 'true' && stepEnabled == 'true'}">
11 <script type="text/javascript">
12 $(document).ready(function(){
13 $("#description_form").ajaxForm({
14 target: '#display_description_div'
17 // Bind the add button
18 $("#set_description_button").click(function() {
19 document.getElementById("display_description_div").style.display = 'none';
20 document.getElementById("set_description_button_div").style.display = 'none';
21 document.getElementById("description_editor_div").style.display = 'block';
22 document.getElementById("descriptionValue").contentDocument.body.innerHTML =
23 document.getElementById("display_description_div").innerHTML;
26 function hideDescriptionEditor() {
27 document.getElementById("display_description_div").style.display = 'block';
28 document.getElementById("set_description_button_div").style.display = 'block';
29 document.getElementById("description_editor_div").style.display = 'none';
30 document.getElementById('descriptionValue').contentDocument.body.innerHTML = '';
33 // Bind the cancel button
34 $("#cancel_set_description_button").click(hideDescriptionEditor);
36 // Bind the submit event
37 $('#description_form').on('submit', hideDescriptionEditor);
41 <div id="set_description_button_div">
42 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="attribute">
44 <td width="20" height="20" align="center">
45 <img id="set_description_button" src="<s:url value="/skin/icon.add.png"/>" onMouseOver=this.src="<s:url value="/skin/icon.addhot.png"/>"
46 onMouseOut=this.src="<s:url value="/skin/icon.add.png"/>" title="<s:text name="tooltip.adddescription"/>"/>
53 <div id="description_editor_div" style="display: none;">
54 <form name="description_form" id="description_form" action="set-description" method="post">
55 <table width="100%" cellpadding="0" cellspacing="0" border="0" class="attribute">
57 <td width="20" height="20" align="center">
58 <img id="cancel_set_description_button" src="<s:url value="/skin/icon.undo.png"/>"
59 title="<s:text name="tooltip.cancel"/>" />
62 <script language='JavaScript'>
63 displayTextEditor('descriptionValue', '', 300, 150);