--- rat/client/parameter.html 2000/11/19 03:23:54 1.2 +++ rat/client/parameter.html 2001/03/23 19:16:13 1.8 @@ -2,7 +2,8 @@ LON-CAPA @@ -239,6 +240,31 @@ function intcalc() { draw(); } +function integereval() { + svalue=choices.document.forms.sch.intval.value; + svalue=Math.round(svalue); + if (pscat=='zeropos') { svalue=Math.abs(svalue); } + if ((pscat=='pos') && (svalue==0)) { + svalue=''; + } + draw(); +} + +function floateval() { + svalue=choices.document.forms.sch.floatval.value; + svalue=1.0*svalue; + if (pscat=='pos') { svalue=Math.abs(svalue); } + if ((pscat=='zeroone') && ((svalue<0) || (svalue>1))) { + svalue=''; + } + draw(); +} + +function stringeval() { + svalue=choices.document.forms.sch.stringval.value; + draw(); +} + function intervaldis() { csecs=svalue; cdays=Math.floor(csecs/86400); @@ -260,7 +286,17 @@ function afterproc() { function draw() { choicestart(); - choicewrite('
'); + choicewrite(''); if (ptype=='tolerance') { // 0: pscat // 1: after processing @@ -304,7 +340,7 @@ function draw() { choicewrite('Number of digits: ' +''); - choicewrite('Accept if more digits given: ' +choicewrite('Accept if more digits given: ' +''); } @@ -344,17 +380,63 @@ function draw() { } } - if (ptype=='value') { + if (ptype=='int') { + if (pscat=='default') { + tablestart('Default value or none'); + choicewrite(''); + } else { + if (pscat=='pos') { + tablestart('Positive (non-zero) integer'); + } + if (pscat=='zeropos') { + tablestart('Positive integer or zero'); + } + if (pscat=='any') { + tablestart('Integer'); + } + choicewrite('Value:'); + choicewrite(''); + choicewrite(''); + } } - if (ptype=='truefalse') { + if (ptype=='float') { + if (pscat=='default') { + tablestart('Default value or none'); + choicewrite(''); + } else { + if (pscat=='pos') { + tablestart('Positive floating point number or zero'); + } + if (pscat=='zeroone') { + tablestart('Floating point number between zero and one'); + } + if (pscat=='any') { + tablestart('Floating point number'); + } + choicewrite('Value:'); + choicewrite(''); + choicewrite(''); + } } - if (ptype=='check') { + if (ptype=='string') { + if (pscat=='default') { + tablestart('Default value or none'); + choicewrite(''); + } else { + if (pscat=='any') { + tablestart('Text'); + } + choicewrite('Value:'); + choicewrite(''); + choicewrite(''); + } } - if (ptype=='radio') { - } choicewrite('
'); choiceend(); } @@ -377,8 +459,8 @@ function assemble() { if ((ptype=='date') && (pscat!='interval')) { svalue=Math.round(cdate.getTime()/1000); } + if (pscat=='default') { svalue=''; } stype=ptype+'_'+pscat; - alert(stype+' '+svalue); } @@ -390,13 +472,15 @@ function init() { for (i=0;i'); - selwrite('

'+pname+'

'); + selwrite(''+pname+'
'); selwrite('
'); selwrite('Store  '); + + selwrite('Delete  '); + + selwrite('Store'); + selwrite('">Cancel'); selwrite(''); this.window.selector.document.close();