Subversion Repositories Sigmater

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 Andrea 1
<#--
2
/*
3
 * $Id: Action.java 502296 2007-02-01 17:33:39Z niallp $
4
 *
5
 * Licensed to the Apache Software Foundation (ASF) under one
6
 * or more contributor license agreements.  See the NOTICE file
7
 * distributed with this work for additional information
8
 * regarding copyright ownership.  The ASF licenses this file
9
 * to you under the Apache License, Version 2.0 (the
10
 * "License"); you may not use this file except in compliance
11
 * with the License.  You may obtain a copy of the License at
12
 *
13
 *  http://www.apache.org/licenses/LICENSE-2.0
14
 *
15
 * Unless required by applicable law or agreed to in writing,
16
 * software distributed under the License is distributed on an
17
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18
 * KIND, either express or implied.  See the License for the
19
 * specific language governing permissions and limitations
20
 * under the License.
21
 */
22
-->
23
<#if !stack.findValue("#optiontransferselect_js_included")?exists><#t/>
24
	<script type="text/javascript" src="<@s.url value="/struts/optiontransferselect.js" encode='false' includeParams='none'/>"></script>
25
	<#assign temporaryVariable = stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
26
</#if><#t/>
27
<table border="0">
28
<tr>
29
<td>
30
<#if parameters.leftTitle?exists><#t/>
31
	<label for="leftTitle">${parameters.leftTitle}</label><br />
32
</#if><#t/>
33
<#include "/${parameters.templateDir}/simple/select.ftl" /> 
34
<#if parameters.allowUpDownOnLeft?default(true)>
35
<input type="button" 
36
	onclick="moveOptionDown(document.getElementById('${parameters.id}'), 'key', <#if parameters.headerKey?exists>'${parameters.headerKey}'<#else>''</#if>);<#if parameters.upDownOnLeftOnclick?has_content>${parameters.upDownOnLeftOnclick};</#if>"
37
<#if parameters.leftDownLabel?exists>
38
	value="${parameters.leftDownLabel?html}"
39
</#if>
40
/>
41
<input type="button"
42
	onclick="moveOptionUp(document.getElementById('${parameters.id}'), 'key', <#if parameters.headerKey?exists>'${parameters.headerKey}'<#else>''</#if>);<#if parameters.upDownOnLeftOnclick?has_content>${parameters.upDownOnLeftOnclick};</#if>"
43
<#if parameters.leftUpLabel?exists>
44
	value="${parameters.leftUpLabel?html}"
45
</#if>
46
/>
47
</#if>
48
 
49
</td>
50
<td valign="middle" align="center">
51
	<#if parameters.allowAddToLeft?default(true)><#t/>
52
		<#assign addToLeftLabel = parameters.addToLeftLabel?default("<-")?html/><#t/>
53
		<#if parameters.doubleHeaderKey?exists><#t/>
54
			<input type="button" 
55
			<#if parameters.buttonCssClass?exists><#t/>
56
			 class="${parameters.buttonCssClass?html}" 
57
			</#if><#t/>
58
			<#if parameters.buttonCssStyle?exists><#t/>
59
			 style="${parameters.buttonCssStyle?html}"
60
			</#if><#t/>
61
			 value="${addToLeftLabel}" onclick="moveSelectedOptions(document.getElementById('${parameters.doubleId?html}'), document.getElementById('${parameters.id?html}'), false, '${parameters.doubleHeaderKey}', '');<#if parameters.addToLeftOnclick?has_content>${parameters.addToLeftOnclick};</#if>" /><br /><br />
62
		<#else><#t/>
63
			<input type="button" 
64
			<#if parameters.buttonCssClass?exists><#t/>
65
			 class="${parameters.buttonCssClass?html}" 
66
			</#if><#t/>
67
			<#if parameters.buttonCssStyle?exists><#t/>
68
			 style="${parameters.buttonCssStyle?html}"
69
			</#if><#t/>
70
			 value="${addToLeftLabel}" onclick="moveSelectedOptions(document.getElementById('${parameters.doubleId?html}'), document.getElementById('${parameters.id?html}'), false, '');<#if parameters.addToLeftOnclick?has_content>${parameters.addToLeftOnclick};</#if>" /><br /><br />
71
		</#if><#t/>
72
	</#if><#t/>
73
	<#if parameters.allowAddToRight?default(true)><#t/>
74
		<#assign addToRightLabel=parameters.addToRightLabel?default("->")?html /><#t/>
75
		<#if parameters.headerKey?exists><#t/>
76
			<input type="button" 
77
			<#if parameters.buttonCssClass?exists><#t/>
78
			 class="${parameters.buttonCssClass?html}" 
79
			</#if><#t/>
80
			<#if parameters.buttonCssStyle?exists><#t/>
81
			 style="${parameters.buttonCssStyle?html}"
82
			</#if><#t/>
83
			 value="${addToRightLabel}" onclick="moveSelectedOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '${parameters.headerKey}', '');<#if parameters.addToRightOnclick?has_content>${parameters.addToRightOnclick};</#if>" /><br /><br />
84
		<#else><#t/>
85
			<input type="button"
86
			<#if parameters.buttonCssClass?exists><#t/>
87
			 class="${parameters.buttonCssClass?html}" 
88
			</#if><#t/>
89
			<#if parameters.buttonCssStyle?exists>
90
			 style="${parameters.buttonCssStyle?html}"
91
			</#if><#t/>
92
			 value="${addToRightLabel}" onclick="moveSelectedOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '');<#if parameters.addToRightOnclick?has_content>${parameters.addToRightOnclick};</#if>" /><br /><br />
93
		</#if><#t/>
94
	</#if><#t/>
95
	<#if parameters.allowAddAllToLeft?default(true)><#t/>
96
		<#assign addAllToLeftLabel=parameters.addAllToLeftLabel?default("<<--")?html /><#t/>
97
		<#if parameters.doubleHeaderKey?exists><#t/>
98
			<input type="button" 
99
			<#if parameters.buttonCssClass?exists><#t/>
100
			 class="${parameters.buttonCssClass}"
101
			</#if><#t/>
102
			<#if parameters.buttonCssStyle?exists><#t/>
103
			 style="${parameters.buttonCssStyle}"
104
			</#if><#t/>
105
			 value="${addAllToLeftLabel}" onclick="moveAllOptions(document.getElementById('${parameters.doubleId?html}'), document.getElementById('${parameters.id?html}'), false, '${parameters.doubleHeaderKey}', '');<#if parameters.addAllToLeftOnclick?has_content>${parameters.addAllToLeftOnclick};</#if>" /><br /><br />
106
		<#else><#t/>
107
			<input type="button" 
108
			<#if parameters.buttonCssClass?exists><#t/>
109
			 class="${parameters.buttonCssClass?html}" 
110
			</#if><#t/>
111
			<#if parameters.buttonCssStyle?exists><#t/>
112
			 style="${parameters.buttonCssStyle?html}"
113
			</#if><#t/>
114
			 value="${addAllToLeftLabel}" onclick="moveAllOptions(document.getElementById('${parameters.doubleId?html}'), document.getElementById('${parameters.id?html}'), false, '');<#if parameters.addAllToLeftOnclick?has_content>${parameters.addAllToLeftOnclick};</#if>" /><br /><br />
115
		</#if><#t/>
116
	</#if><#t/>
117
	<#if parameters.allowAddAllToRight?default(true)><#t/>
118
		<#assign addAllToRightLabel=parameters.addAllToRightLabel?default("-->>")?html /><#t/>
119
		<#if parameters.headerKey?exists><#t/>
120
			<input type="button" 
121
			<#if parameters.buttonCssClass?exists><#t/>
122
			 class="${parameters.buttonCssClass?html}" 
123
			</#if><#t/>
124
			<#if parameters.buttonCssStyle?exists><#t/>
125
			 style="${parameters.buttonCssStyle?html}"
126
			</#if><#t/>
127
			 value="${addAllToRightLabel}" onclick="moveAllOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '${parameters.headerKey}', '');<#if parameters.addAllToRightOnclick?has_content>${parameters.addAllToRightOnclick};</#if>" /><br /><br />	
128
		<#else><#t/>
129
			<input type="button" 
130
			<#if parameters.buttonCssClass?exists><#t/>
131
			 class="${parameters.buttonCssClass?html}" 
132
			</#if><#t/>
133
			<#if parameters.buttonCssStyle?exists><#t/>
134
			 style="${parameters.buttonCssStyle?html}"
135
			</#if><#t/>
136
			 value="${addAllToRightLabel}" onclick="moveAllOptions(document.getElementById('${parameters.id?html}'), document.getElementById('${parameters.doubleId?html}'), false, '');<#if parameters.addAllToRightOnclick?has_content>${parameters.addAllToRightOnclick};</#if>" /><br /><br />	
137
		</#if><#t/>
138
	</#if><#t/>
139
	<#if parameters.allowSelectAll?default(true)><#t/>
140
		<#assign selectAllLabel=parameters.selectAllLabel?default("<*>")?html /><#t/>
141
		<#if parameters.headerKey?exists && parameters.doubleHeaderKey?exists><#t/>
142
			<input type="button" 
143
			<#if parameters.buttonCssClass?exists><#t/>
144
			 class="${parameters.buttonCssClass?html}" 
145
			</#if><#t/>
146
			<#if parameters.buttonCssStyle?exists><#t/>
147
			 style="${parameters.buttonCssStyle?html}"
148
			</#if><#t/>
149
			 value="${selectAllLabel}" onclick="selectAllOptionsExceptSome(document.getElementById('${parameters.id?html}'), 'key', '${parameters.headerKey}');selectAllOptionsExceptSome(document.getElementById('${parameters.doubleId?html}'), 'key', '${parameters.doubleHeaderKey}');<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
150
		<#elseif parameters.headerKey?exists><#t/>
151
			<input type="button" 
152
			<#if parameters.buttonCssClass?exists><#t/>
153
			 class="${parameters.buttonCssClass?html}" 
154
			</#if><#t/>
155
			<#if parameters.buttonCssStyle?exists><#t/>
156
			 style="${parameters.buttonCssStyle?html}"
157
			</#if><#t/>
158
			 value="${selectAllLabel}" onclick="selectAllOptionsExceptSome(document.getElementById('${parameters.id?html}'), 'key', '${parameters.headerKey}');selectAllOptions(document.getElementById('${parameters.doubleId?html}'));<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
159
		<#elseif parameters.doubleHeaderKey?exists><#t/>
160
			<input type="button" 
161
			<#if parameters.buttonCssClass?exists><#t/>
162
			 class="${parameters.buttonCssClass?html}" 
163
			</#if><#t/>
164
			<#if parameters.buttonCssStyle?exists><#t/>
165
			 style="${parameters.buttonCssStyle?html}"
166
			</#if><#t/>
167
			 value="${selectAllLabel}" onclick="selectAllOptions(document.getElementById('${parameters.id?html}'));selectAllOptionsExceptSome(document.getElementById('${parameters.doubleId?html}'), 'key', '${parameters.doubleHeaderKey}');<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
168
		<#else><#t/>
169
			<input type="button" 
170
			<#if parameters.buttonCssClass?exists><#t/>
171
			 class="${parameters.buttonCssClass?html}" 
172
			</#if><#t/>
173
			<#if parameters.buttonCssStyle?exists><#t/>
174
			 style="${parameters.buttonCssStyle?html}"
175
			</#if><#t/>
176
			 value="${selectAllLabel}" onclick="selectAllOptions(document.getElementById('${parameters.id?html}'));selectAllOptions(document.getElementById('${parameters.doubleId?html}'));<#if parameters.selectAllOnclick?has_content>${parameters.selectAllOnclick};</#if>" /><br /><br />
177
		</#if><#t/>
178
	</#if><#t/>
179
</td>
180
<td>
181
<#if parameters.rightTitle?exists><#t/>
182
	<label for="rightTitle">${parameters.rightTitle}</label><br />
183
</#if><#t/>
184
<select 
185
	name="${parameters.doubleName?default("")?html}"
186
	<#if parameters.get("doubleSize")?exists><#t/>
187
	size="${parameters.get("doubleSize")?html}"		
188
	</#if><#t/>
189
	<#if parameters.doubleDisabled?default(false)><#t/>
190
	disabled="disabled"
191
	</#if><#t/>
192
	<#if parameters.doubleMultiple?default(false)><#t/>
193
	multiple="multiple"
194
	</#if><#t/>
195
	<#if parameters.doubleTabindex?exists><#t/>
196
	tabindex="${parameters.tabindex?html}"
197
	</#if><#t/>
198
	<#if parameters.doubleId?exists><#t/>
199
	id="${parameters.doubleId?html}"
200
	</#if><#t/>
201
	<#if parameters.doubleCss?exists><#t/>
202
	class="${parameters.doubleCss?html}"
203
	</#if><#t/>
204
	<#if parameters.doubleStyle?exists><#t/>
205
	style="${parameters.doubleStyle?html}"
206
	</#if><#t/>
207
    <#if parameters.doubleOnclick?exists><#t/>
208
    onclick="${parameters.doubleOnclick?html}"
209
    </#if><#t/>
210
    <#if parameters.doubleOndblclick?exists><#t/>
211
    ondblclick="${parameters.doubleOndblclick?html}"
212
    </#if><#t/>
213
    <#if parameters.doubleOnmousedown?exists><#t/>
214
    onmousedown="${parameters.doubleOnmousedown?html}"
215
    </#if><#t/>
216
    <#if parameters.doubleOnmouseup?exists><#t/>
217
    onmouseup="${parameters.doubleMnmouseup?html}"
218
    </#if><#t/>
219
    <#if parameters.doubleOnmousemove?exists><#t/>
220
    onmousemove="${parameters.doubleOnmousemove?html}"
221
    </#if><#t/>
222
    <#if parameters.doubleOnmouseout?exists><#t/>
223
    onmouseout="${parameters.doubleOnmouseout?html}"
224
    </#if><#t/>
225
    <#if parameters.doubleOnfocus?exists><#t/>
226
    onfocus="${parameters.doubleOnfocus?html}"
227
    </#if><#t/>
228
    <#if parameters.doubleOnblur?exists><#t/>
229
    onblur="${parameters.doubleOnblur?html}"
230
    </#if><#t/>
231
    <#if parameters.doubleOnkeypress?exists><#t/>
232
    onkeypress="${parameters.doubleOnkeypress?html}"
233
    </#if><#t/>
234
    <#if parameters.doubleOnKeydown?exists><#t/>
235
    onkeydown="${parameters.doubleOnkeydown?html}"
236
    </#if><#t/>
237
    <#if parameters.doubleOnkeyup?exists><#t/>
238
    onkeyup="${parameters.doubleOnkeyup?html}"
239
    </#if><#t/>
240
    <#if parameters.doubleOnselect?exists><#t/>
241
    onselect="${parameters.doubleOnselect?html}"
242
    </#if><#t/>
243
    <#if parameters.doubleOnchange?exists><#t/>
244
    onchange="${parameters.doubleOnchange?html}"
245
    </#if><#t/>
246
    <#if parameters.doubleAccesskey?exists><#t/>
247
    accesskey="${parameters.doubleAccesskey?html}"
248
    </#if>
249
>
250
	<#if parameters.doubleHeaderKey?exists && parameters.doubleHeaderValue?exists><#t/>
251
    <option value="${parameters.doubleHeaderKey?html}">${parameters.doubleHeaderValue?html}</option>
252
	</#if><#t/>
253
	<#if parameters.doubleEmptyOption?default(false)><#t/>
254
    <option value=""></option>
255
	</#if><#t/>
256
	<@s.iterator value="parameters.doubleList"><#t/>
257
        <#if parameters.doubleListKey?exists><#t/>
258
            <#assign doubleItemKey = stack.findValue(parameters.doubleListKey) /><#t/>
259
        <#else><#t/>
260
            <#assign doubleItemKey = stack.findValue('top') /><#t/>
261
        </#if><#t/>
262
        <#assign doubleItemKeyStr = doubleItemKey.toString() /><#t/>
263
        <#if parameters.doubleListValue?exists><#t/>
264
            <#assign doubleItemValue = stack.findString(parameters.doubleListValue) /><#t/>
265
        <#else><#t/>
266
            <#assign doubleItemValue = stack.findString('top') /><#t/>
267
        </#if><#t/>
268
    	<option value="${doubleItemKeyStr?html}"<#rt/>
269
        <#if tag.contains(parameters.doubleNameValue, doubleItemKey)><#t/>
270
 		selected="selected"<#rt/>
271
        </#if><#t/>
272
    	>${doubleItemValue?html}</option><#lt/>
273
	</@s.iterator><#t/>
274
</select>
275
<#if parameters.allowUpDownOnRight?default(true)>
276
<input type="button" 
277
	onclick="moveOptionDown(document.getElementById('${parameters.doubleId}'), 'key', <#if parameters.doubleHeaderKey?exists>'${parameters.doubleHeaderKey}'<#else>''</#if>);<#if parameters.upDownOnRightOnclick?has_content>${parameters.upDownOnRightOnclick};</#if>"
278
<#if parameters.rightDownLabel?exists>
279
	value="${parameters.rightDownLabel?html}"
280
</#if>
281
/>
282
<input type="button" 
283
	onclick="moveOptionUp(document.getElementById('${parameters.doubleId}'), 'key', <#if parameters.doubleHeaderKey?exists>'${parameters.doubleHeaderKey}'<#else>''</#if>);<#if parameters.upDownOnRightOnclick?has_content>${parameters.upDownOnRightOnclick};</#if>"
284
<#if parameters.rightUpLabel?exists>
285
	value="${parameters.rightUpLabel?html}"
286
</#if>
287
/>
288
</#if>
289
</td>
290
</tr>
291
</table>