1 | <%-- $Id: edit_formula.jsp 3679 2007-08-17 07:18:29Z jari $ |
---|
2 | ------------------------------------------------------------------ |
---|
3 | Copyright (C) 2006 Jari Hakkinen, Nicklas Nordborg, Martin Svensson |
---|
4 | Copyright (C) 2007 Nicklas Nordborg |
---|
5 | |
---|
6 | This file is part of BASE - BioArray Software Environment. |
---|
7 | Available at http://base.thep.lu.se/ |
---|
8 | |
---|
9 | BASE is free software; you can redistribute it and/or |
---|
10 | modify it under the terms of the GNU General Public License |
---|
11 | as published by the Free Software Foundation; either version 2 |
---|
12 | of the License, or (at your option) any later version. |
---|
13 | |
---|
14 | BASE is distributed in the hope that it will be useful, |
---|
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | GNU General Public License for more details. |
---|
18 | |
---|
19 | You should have received a copy of the GNU General Public License |
---|
20 | along with this program; if not, write to the Free Software |
---|
21 | Foundation, Inc., 59 Temple Place - Suite 330, |
---|
22 | Boston, MA 02111-1307, USA. |
---|
23 | ------------------------------------------------------------------ |
---|
24 | |
---|
25 | |
---|
26 | @author Nicklas |
---|
27 | @version 2.0 |
---|
28 | --%> |
---|
29 | <%@ page session="false" |
---|
30 | import="net.sf.basedb.core.SessionControl" |
---|
31 | import="net.sf.basedb.core.DbControl" |
---|
32 | import="net.sf.basedb.core.Item" |
---|
33 | import="net.sf.basedb.core.ItemContext" |
---|
34 | import="net.sf.basedb.core.Permission" |
---|
35 | import="net.sf.basedb.core.Formula" |
---|
36 | import="net.sf.basedb.core.Coloring" |
---|
37 | import="net.sf.basedb.core.RawDataType" |
---|
38 | import="net.sf.basedb.core.RawDataTypes" |
---|
39 | import="net.sf.basedb.core.RawDataProperty" |
---|
40 | import="net.sf.basedb.core.Project" |
---|
41 | import="net.sf.basedb.core.PermissionDeniedException" |
---|
42 | import="net.sf.basedb.util.Values" |
---|
43 | import="net.sf.basedb.clients.web.Base" |
---|
44 | import="net.sf.basedb.clients.web.util.HTML" |
---|
45 | import="java.util.List" |
---|
46 | %> |
---|
47 | <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
---|
48 | <%@ taglib prefix="t" uri="/WEB-INF/tab.tld" %> |
---|
49 | <% |
---|
50 | final Item itemType = Item.FORMULA; |
---|
51 | final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
---|
52 | final ItemContext cc = Base.getAndSetCurrentContext(sc, itemType, null, null); |
---|
53 | final int itemId = cc.getId(); |
---|
54 | final String ID = sc.getId(); |
---|
55 | final float scale = Base.getScale(sc); |
---|
56 | final DbControl dc = sc.newDbControl(); |
---|
57 | try |
---|
58 | { |
---|
59 | String title = null; |
---|
60 | Formula formula = null; |
---|
61 | Formula.Type currentType = null; |
---|
62 | Formula.Parser currentParser = null; |
---|
63 | Formula.AverageMethod currentAverageMethod = null; |
---|
64 | RawDataType currentRawDataType = null; |
---|
65 | RawDataType defaultRawDataType = null; |
---|
66 | List<String> expressions = null; |
---|
67 | Coloring coloring = null; |
---|
68 | |
---|
69 | int activeProjectId = sc.getActiveProjectId(); |
---|
70 | if (activeProjectId > 0) |
---|
71 | { |
---|
72 | Project activeProject = Project.getById(dc, activeProjectId); |
---|
73 | defaultRawDataType = activeProject.getDefaultRawDataType(); |
---|
74 | } |
---|
75 | if (itemId == 0) |
---|
76 | { |
---|
77 | title = "Create formula"; |
---|
78 | cc.removeObject("item"); |
---|
79 | String recentType = cc.getRecent("FormulaType", 0); |
---|
80 | String filterType = cc.getPropertyValue("type"); |
---|
81 | if (filterType != null) currentType = Formula.Type.fromValue(Values.getInt(filterType)); |
---|
82 | if (currentType == null && recentType != null) currentType = Formula.Type.valueOf(recentType); |
---|
83 | if (currentType == null) currentType = Formula.Type.COLUMN_EXPRESSION; |
---|
84 | currentParser = Formula.Parser.fromValue(Values.getInt(cc.getPropertyValue("parser"), |
---|
85 | Formula.Parser.JEP.getValue())); |
---|
86 | currentAverageMethod = Formula.AverageMethod.fromValue(Values.getInt(cc.getPropertyValue("averageMethod"), |
---|
87 | Formula.AverageMethod.ARITHMETIC_MEAN.getValue())); |
---|
88 | currentRawDataType = RawDataTypes.getRawDataType(cc.getPropertyValue("rawDataType")); |
---|
89 | if (currentRawDataType == null) |
---|
90 | { |
---|
91 | currentRawDataType = RawDataTypes.getRawDataType(cc.getRecent("RawDataType", 0)); |
---|
92 | } |
---|
93 | coloring = new Coloring(); |
---|
94 | coloring.setUsingColors(Values.getBoolean(cc.getPropertyValue("coloring.usingColors"))); |
---|
95 | coloring.setLogarithmic(Values.getBoolean(cc.getPropertyValue("coloring.logarithmic"))); |
---|
96 | coloring.setMinValue(Values.getFloat(cc.getPropertyValue("coloring.minValue"), null)); |
---|
97 | coloring.setMidValue(Values.getFloat(cc.getPropertyValue("coloring.midValue"), null)); |
---|
98 | coloring.setMaxValue(Values.getFloat(cc.getPropertyValue("coloring.maxValue"), null)); |
---|
99 | |
---|
100 | currentRawDataType = currentRawDataType != null ? currentRawDataType : defaultRawDataType; |
---|
101 | } |
---|
102 | else |
---|
103 | { |
---|
104 | formula = Formula.getById(dc, itemId); |
---|
105 | currentParser = formula.getParser(); |
---|
106 | currentAverageMethod = formula.getAverageMethod(); |
---|
107 | currentType = formula.getFormulaType(); |
---|
108 | currentRawDataType = formula.getRawDataType(); |
---|
109 | expressions = formula.getFormulas(); |
---|
110 | coloring = formula.getColoring(); |
---|
111 | cc.setObject("item", formula); |
---|
112 | title = "Edit formula -- " + HTML.encodeTags(formula.getName()); |
---|
113 | } |
---|
114 | if (formula != null) formula.checkPermission(Permission.WRITE); |
---|
115 | |
---|
116 | final String clazz = "class=\"text\""; |
---|
117 | final String requiredClazz = "class=\"text required\""; |
---|
118 | %> |
---|
119 | <base:page type="popup" title="<%=title%>"> |
---|
120 | <base:head scripts="tabcontrol.js" styles="tabcontrol.css"> |
---|
121 | <script language="JavaScript"> |
---|
122 | // Validate the "Formula" tab |
---|
123 | function validateFormula() |
---|
124 | { |
---|
125 | var frm = document.forms['formula']; |
---|
126 | if (Main.trimString(frm.name.value) == '') |
---|
127 | { |
---|
128 | alert("You must enter a name"); |
---|
129 | frm.name.focus(); |
---|
130 | return false; |
---|
131 | } |
---|
132 | var type = frm.type[frm.type.selectedIndex].value; |
---|
133 | var numFormulas = frm.expressions.length; |
---|
134 | var numChannels = frm.channels.value; |
---|
135 | if (type == '<%=Formula.Type.INTENSITY_EXPRESSION.name()%>' || type == '<%=Formula.Type.INTENSITY_TRANSFORMATION.name()%>') |
---|
136 | { |
---|
137 | // One formula per channel required |
---|
138 | if (numFormulas != numChannels) |
---|
139 | { |
---|
140 | alert('You must enter one formula for each channel for type = ' + frm.type[frm.type.selectedIndex].text); |
---|
141 | return false; |
---|
142 | } |
---|
143 | } |
---|
144 | else |
---|
145 | { |
---|
146 | // Only one formula can be specified |
---|
147 | if (numFormulas != 1) |
---|
148 | { |
---|
149 | alert('You can only enter one formula for type = ' + frm.type[frm.type.selectedIndex].text); |
---|
150 | return false; |
---|
151 | } |
---|
152 | } |
---|
153 | |
---|
154 | if (frm.use_colors.checked && !frm.use_colors.disabled) |
---|
155 | { |
---|
156 | var minValue = parseFloat(frm.min_value.value); |
---|
157 | var midValue = parseFloat(frm.mid_value.value); |
---|
158 | var maxValue = parseFloat(frm.max_value.value); |
---|
159 | if (isNaN(minValue)) |
---|
160 | { |
---|
161 | alert('No min value has been specified'); |
---|
162 | frm.min_value.focus(); |
---|
163 | return false; |
---|
164 | } |
---|
165 | if (isNaN(midValue)) |
---|
166 | { |
---|
167 | alert('No mid value has been specified'); |
---|
168 | frm.mid_value.focus(); |
---|
169 | return false; |
---|
170 | } |
---|
171 | if (isNaN(maxValue)) |
---|
172 | { |
---|
173 | alert('No max value has been specified'); |
---|
174 | frm.max_value.focus(); |
---|
175 | return false; |
---|
176 | } |
---|
177 | if (minValue > midValue) |
---|
178 | { |
---|
179 | alert('The min value (' + minValue + ') can\'t be greater than the mid value (' + midValue + ')'); |
---|
180 | return false; |
---|
181 | } |
---|
182 | if (midValue > maxValue) |
---|
183 | { |
---|
184 | alert('The mid (' + midValue + ') value can\'t be greater than the max value (' + maxValue + ')'); |
---|
185 | return false; |
---|
186 | } |
---|
187 | } |
---|
188 | return true; |
---|
189 | } |
---|
190 | |
---|
191 | // Submit the form |
---|
192 | function saveSettings() |
---|
193 | { |
---|
194 | var frm = document.forms['formula']; |
---|
195 | if (TabControl.validateActiveTab('settings')) |
---|
196 | { |
---|
197 | for (var i = 0; i < frm.expressions.length; i++) |
---|
198 | { |
---|
199 | Forms.createHidden(frm, 'formulas', frm.expressions[i].text); |
---|
200 | } |
---|
201 | frm.channels.disabled = false; // Otherwise the channels info, isn't sent |
---|
202 | frm.submit(); |
---|
203 | } |
---|
204 | } |
---|
205 | |
---|
206 | function init() |
---|
207 | { |
---|
208 | <% |
---|
209 | if (formula == null) |
---|
210 | { |
---|
211 | %> |
---|
212 | var frm = document.forms['formula']; |
---|
213 | frm.name.focus(); |
---|
214 | frm.name.select(); |
---|
215 | <% |
---|
216 | } |
---|
217 | %> |
---|
218 | formulaTypeOnChange(); |
---|
219 | } |
---|
220 | var rawDataTypes = new Array(); |
---|
221 | <% |
---|
222 | for (RawDataType rdt : RawDataTypes.getRawDataTypes()) |
---|
223 | { |
---|
224 | %> |
---|
225 | rawDataTypes['<%=rdt.getId()%>'] = <%=rdt.getChannels()%>; |
---|
226 | var a = new Array(); |
---|
227 | <% |
---|
228 | for (RawDataProperty rp : rdt.getProperties()) |
---|
229 | { |
---|
230 | %> |
---|
231 | a['<%=rp.getName()%>'] = 1; |
---|
232 | <% |
---|
233 | } |
---|
234 | %> |
---|
235 | rawDataTypes['<%=rdt.getId()%>.properties'] = a; |
---|
236 | <% |
---|
237 | } |
---|
238 | %> |
---|
239 | |
---|
240 | function rawDataTypeOnChange() |
---|
241 | { |
---|
242 | var frm = document.forms['formula']; |
---|
243 | var rdt = frm.rawdatatype[frm.rawdatatype.selectedIndex].value; |
---|
244 | if (rdt != '') |
---|
245 | { |
---|
246 | frm.channels.value = rawDataTypes[rdt]; |
---|
247 | frm.channels.disabled = true; |
---|
248 | Main.addClass(frm.channels, 'disabled'); |
---|
249 | Main.removeClass(frm.channels, 'required'); |
---|
250 | } |
---|
251 | else |
---|
252 | { |
---|
253 | frm.channels.disabled = false; |
---|
254 | Main.removeClass(frm.channels, 'disabled'); |
---|
255 | Main.addClass(frm.channels, 'required'); |
---|
256 | } |
---|
257 | } |
---|
258 | |
---|
259 | var selectedExpressionIndex = -1; |
---|
260 | function expressionsOnClick() |
---|
261 | { |
---|
262 | var frm = document.forms['formula']; |
---|
263 | selectedExpressionIndex = frm.expressions.selectedIndex; |
---|
264 | frm.expression.value = frm.expressions[selectedExpressionIndex].text; |
---|
265 | } |
---|
266 | |
---|
267 | function expressionOnBlur() |
---|
268 | { |
---|
269 | var frm = document.forms['formula']; |
---|
270 | if (selectedExpressionIndex >= 0) |
---|
271 | { |
---|
272 | frm.expressions[selectedExpressionIndex].text = frm.expression.value; |
---|
273 | } |
---|
274 | } |
---|
275 | |
---|
276 | function removeOnClick() |
---|
277 | { |
---|
278 | var frm = document.forms['formula']; |
---|
279 | if (selectedExpressionIndex >= 0) |
---|
280 | { |
---|
281 | frm.expressions[selectedExpressionIndex] = null; |
---|
282 | selectedExpressionIndex = -1; |
---|
283 | } |
---|
284 | } |
---|
285 | |
---|
286 | function addOnClick() |
---|
287 | { |
---|
288 | var frm = document.forms['formula']; |
---|
289 | if (frm.expression.value != '') |
---|
290 | { |
---|
291 | frm.expressions[frm.expressions.length] = new Option(frm.expression.value); |
---|
292 | selectedExpressionIndex = frm.expressions.length - 1; |
---|
293 | frm.expressions.selectedIndex = selectedExpressionIndex; |
---|
294 | } |
---|
295 | } |
---|
296 | |
---|
297 | function openExpressionBuilder() |
---|
298 | { |
---|
299 | var frm = document.forms['formula']; |
---|
300 | var rdt = frm.rawdatatype[frm.rawdatatype.selectedIndex].value; |
---|
301 | var formulaType = frm.type[frm.type.selectedIndex].value; |
---|
302 | var channels = frm.channels.value; |
---|
303 | var restrictions = formulaType == '<%=Formula.Type.COLUMN_RESTRICTION.name()%>'; |
---|
304 | Main.expressionBuilder('<%=ID%>', 'Expression', 'formula', 'expression', formulaType, rdt, channels, restrictions); |
---|
305 | } |
---|
306 | |
---|
307 | var useColors = new Array(); |
---|
308 | var supportsAverage = new Array(); |
---|
309 | <% |
---|
310 | for (Formula.Type ft : Formula.Type.values()) |
---|
311 | { |
---|
312 | %> |
---|
313 | useColors['<%=ft.name()%>'] = <%=ft.canUseColoring()%>; |
---|
314 | supportsAverage['<%=ft.name()%>'] = <%=ft.supportsAverage()%>; |
---|
315 | <% |
---|
316 | } |
---|
317 | %> |
---|
318 | |
---|
319 | function useColorsOnClick() |
---|
320 | { |
---|
321 | var frm = document.forms['formula']; |
---|
322 | var useColors = frm.use_colors.checked && !frm.use_colors.disabled; |
---|
323 | frm.min_value.disabled = !useColors; |
---|
324 | frm.mid_value.disabled = !useColors; |
---|
325 | frm.max_value.disabled = !useColors; |
---|
326 | frm.logarithmic.disabled = !useColors; |
---|
327 | if (useColors) |
---|
328 | { |
---|
329 | Main.addClass(frm.min_value, 'required'); |
---|
330 | Main.addClass(frm.mid_value, 'required'); |
---|
331 | Main.addClass(frm.max_value, 'required'); |
---|
332 | } |
---|
333 | else |
---|
334 | { |
---|
335 | Main.removeClass(frm.min_value, 'required'); |
---|
336 | Main.removeClass(frm.mid_value, 'required'); |
---|
337 | Main.removeClass(frm.max_value, 'required'); |
---|
338 | } |
---|
339 | } |
---|
340 | |
---|
341 | function formulaTypeOnChange() |
---|
342 | { |
---|
343 | var frm = document.forms['formula']; |
---|
344 | var formulaType = frm.type[frm.type.selectedIndex].value; |
---|
345 | var use = useColors[formulaType]; |
---|
346 | frm.use_colors.disabled = !use; |
---|
347 | useColorsOnClick(); |
---|
348 | var supportsAvg = supportsAverage[formulaType]; |
---|
349 | frm.averageMethod.disabled = !supportsAvg; |
---|
350 | if (!supportsAvg) frm.averageMethod.selectedIndex = 0; |
---|
351 | } |
---|
352 | </script> |
---|
353 | </base:head> |
---|
354 | <base:body onload="init()"> |
---|
355 | <p> |
---|
356 | <form action="index.jsp?ID=<%=ID%>" method="post" name="formula" onsubmit="return false;"> |
---|
357 | <input type="hidden" name="cmd" value="UpdateItem"> |
---|
358 | |
---|
359 | <h3 class="docked"><%=title%> <base:help tabcontrol="settings" /></h3> |
---|
360 | <t:tabcontrol id="settings" contentstyle="<%="height: "+(int)(scale*380)+"px;"%>" |
---|
361 | position="bottom" remember="<%=formula != null%>"> |
---|
362 | <t:tab id="info" title="Formula" validate="validateFormula()" helpid="formula.edit"> |
---|
363 | <table class="form" cellspacing=0> |
---|
364 | <tr> |
---|
365 | <td class="prompt">Name</td> |
---|
366 | <td><input <%=requiredClazz%> type="text" name="name" |
---|
367 | value="<%=HTML.encodeTags(formula == null ? Values.getString(cc.getPropertyValue("name"), "New formula") : formula.getName())%>" |
---|
368 | size="40" maxlength="<%=Formula.MAX_NAME_LENGTH%>"></td> |
---|
369 | </tr> |
---|
370 | <tr> |
---|
371 | <td class="prompt">Type</td> |
---|
372 | <td> |
---|
373 | <select name="type" class="required" onchange="formulaTypeOnChange()"> |
---|
374 | <% |
---|
375 | for (Formula.Type type : Formula.Type.values()) |
---|
376 | { |
---|
377 | String selected = type == currentType ? "selected" : ""; |
---|
378 | %> |
---|
379 | <option value="<%=type.name()%>" <%=selected%>><%=HTML.encodeTags(type.toString())%> |
---|
380 | <% |
---|
381 | } |
---|
382 | %> |
---|
383 | </select> |
---|
384 | </td> |
---|
385 | </tr> |
---|
386 | <tr> |
---|
387 | <td class="prompt">Parser</td> |
---|
388 | <td> |
---|
389 | <select name="parser" class="required"> |
---|
390 | <% |
---|
391 | for (Formula.Parser parser : Formula.Parser.values()) |
---|
392 | { |
---|
393 | String selected = parser == currentParser ? "selected" : ""; |
---|
394 | %> |
---|
395 | <option value="<%=parser.name()%>" <%=selected%>><%=HTML.encodeTags(parser.toString())%> |
---|
396 | <% |
---|
397 | } |
---|
398 | %> |
---|
399 | </select> |
---|
400 | </td> |
---|
401 | </tr> |
---|
402 | <tr> |
---|
403 | <td class="prompt">Raw data type</td> |
---|
404 | <td> |
---|
405 | <select name="rawdatatype" onchange="rawDataTypeOnChange()"> |
---|
406 | <option value="">- none - |
---|
407 | <% |
---|
408 | for (RawDataType rdt : RawDataTypes.getRawDataTypes()) |
---|
409 | { |
---|
410 | String selected = rdt == currentRawDataType ? "selected" : ""; |
---|
411 | %> |
---|
412 | <option value="<%=rdt.getId()%>" <%=selected%>><%=HTML.encodeTags(rdt.getName())%> |
---|
413 | <% |
---|
414 | } |
---|
415 | %> |
---|
416 | </select> |
---|
417 | </td> |
---|
418 | </tr> |
---|
419 | <tr> |
---|
420 | <td class="prompt">Channels</td> |
---|
421 | <td><input <%=currentRawDataType != null ? "class=\"text disabled\" disabled" : requiredClazz%> type="text" name="channels" |
---|
422 | value="<%=formula == null ? (currentRawDataType == null ? Values.getInt(cc.getPropertyValue("channels")) : currentRawDataType.getChannels()) : formula.getChannels()%>" |
---|
423 | size="12" maxlength="10" onkeypress="return Numbers.integerOnly(event)" |
---|
424 | ></td> |
---|
425 | </tr> |
---|
426 | <tr valign="top"> |
---|
427 | <td class="prompt">Expressions</td> |
---|
428 | <td> |
---|
429 | <table border="0" cellspacing="0" cellpadding="2"> |
---|
430 | <tr> |
---|
431 | <td> |
---|
432 | <select name="expressions" size="3" style="width: 26em;" |
---|
433 | onchange="expressionsOnClick()" multiple class="required"> |
---|
434 | <% |
---|
435 | if (expressions != null) |
---|
436 | { |
---|
437 | for (String expression : expressions) |
---|
438 | { |
---|
439 | %> |
---|
440 | <option><%=HTML.encodeTags(expression)%> |
---|
441 | <% |
---|
442 | } |
---|
443 | } |
---|
444 | %> |
---|
445 | </select> |
---|
446 | </td> |
---|
447 | <td><base:button onclick="removeOnClick()" title="Remove" /></td> |
---|
448 | </tr> |
---|
449 | <tr> |
---|
450 | <td> |
---|
451 | <input type="text" name="expression" class="text" style="width: 26em;" |
---|
452 | maxlength="<%=Formula.MAX_FORMULA_LENGTH%>" |
---|
453 | onblur="expressionOnBlur()"> |
---|
454 | </td> |
---|
455 | <td> |
---|
456 | <base:button onclick="addOnClick()" title="Add" /> |
---|
457 | </td> |
---|
458 | <td> |
---|
459 | <base:button onclick="openExpressionBuilder()" |
---|
460 | image="expression_builder.gif" |
---|
461 | title="Expression builder…" /> |
---|
462 | </td> |
---|
463 | </table> |
---|
464 | </td> |
---|
465 | </tr> |
---|
466 | <tr> |
---|
467 | <td class="prompt">Avg. method</td> |
---|
468 | <td> |
---|
469 | <select name="averageMethod" class="required"> |
---|
470 | <% |
---|
471 | for (Formula.AverageMethod method : Formula.AverageMethod.values()) |
---|
472 | { |
---|
473 | String selected = method == currentAverageMethod ? "selected" : ""; |
---|
474 | %> |
---|
475 | <option value="<%=method.name()%>" <%=selected%>><%=HTML.encodeTags(method.toString())%> |
---|
476 | <% |
---|
477 | } |
---|
478 | %> |
---|
479 | </select> |
---|
480 | </td> |
---|
481 | </tr> |
---|
482 | |
---|
483 | <tr> |
---|
484 | <td class="prompt">Use colors</td> |
---|
485 | <td> |
---|
486 | <input type="checkbox" name="use_colors" value="1" |
---|
487 | <%=coloring.isUsingColors() ? "checked" : "" %> |
---|
488 | onclick="useColorsOnClick()"> |
---|
489 | |
---|
490 | <b>Min value</b> |
---|
491 | <input type="text" class="text" name="min_value" |
---|
492 | value="<%=Values.formatNumber(coloring.getMinValue(), -1)%>" |
---|
493 | size="6" maxlength="6" |
---|
494 | onkeypress="return Numbers.numberOnly(event)" |
---|
495 | > |
---|
496 | <b>Mid value</b> |
---|
497 | <input type="text" class="text" name="mid_value" |
---|
498 | value="<%=Values.formatNumber(coloring.getMidValue(), -1)%>" |
---|
499 | size="6" maxlength="6" |
---|
500 | onkeypress="return Numbers.numberOnly(event)" |
---|
501 | > |
---|
502 | <b>Max value</b> |
---|
503 | <input type="text" class="text" name="max_value" |
---|
504 | value="<%=Values.formatNumber(coloring.getMaxValue(), -1)%>" |
---|
505 | size="6" maxlength="6" |
---|
506 | onkeypress="return Numbers.numberOnly(event)" |
---|
507 | > |
---|
508 | <br> |
---|
509 | <input type="checkbox" name="logarithmic" value="1" |
---|
510 | <%=coloring.isLogarithmic() ? "checked" : "" %>> |
---|
511 | <b>Logarithmic</b> |
---|
512 | </td> |
---|
513 | </tr> |
---|
514 | |
---|
515 | <tr valign=top> |
---|
516 | <td class="prompt">Description</td> |
---|
517 | <td nowrap> |
---|
518 | <textarea <%=clazz%> rows="4" cols="40" name="description" wrap="virtual" |
---|
519 | ><%=HTML.encodeTags(formula == null ? cc.getPropertyValue("description") : formula.getDescription())%></textarea> |
---|
520 | <a href="javascript:Main.zoom('Description', 'formula', 'description')" |
---|
521 | title="Edit in larger window"><base:icon image="zoom.gif" /></a> |
---|
522 | </td> |
---|
523 | </tr> |
---|
524 | </table> |
---|
525 | <div align=right> <i><base:icon image="required.gif" /> = required information</i></div> |
---|
526 | </t:tab> |
---|
527 | </t:tabcontrol> |
---|
528 | |
---|
529 | <table align="center"> |
---|
530 | <tr> |
---|
531 | <td width="50%"><base:button onclick="saveSettings()" title="Save" /></td> |
---|
532 | <td width="50%"><base:button onclick="window.close()" title="Cancel" /></td> |
---|
533 | </tr> |
---|
534 | </table> |
---|
535 | </form> |
---|
536 | </base:body> |
---|
537 | </base:page> |
---|
538 | <% |
---|
539 | } |
---|
540 | finally |
---|
541 | { |
---|
542 | if (dc != null) dc.close(); |
---|
543 | } |
---|
544 | %> |
---|