version 1.67, 2015/01/23 19:35:48
|
version 1.68, 2015/09/13 21:48:37
|
Line 39 Parameter Input Window
|
Line 39 Parameter Input Window
|
|
|
var ptype=''; |
var ptype=''; |
var pvalue=''; |
var pvalue=''; |
|
var pmodval=''; |
var preturn=''; |
var preturn=''; |
var pcode=''; |
var pcode=''; |
var pscat=''; |
var pscat=''; |
Line 301 function intcalc() {
|
Line 302 function intcalc() {
|
sform.hours.options[sform.hours.selectedIndex].value*1)*60+ |
sform.hours.options[sform.hours.selectedIndex].value*1)*60+ |
sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+ |
sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+ |
sform.seconds.options[sform.seconds.selectedIndex].value*1; |
sform.seconds.options[sform.seconds.selectedIndex].value*1; |
draw(); |
if ((ptype=='date') && (pscat=='interval')) { |
|
var newpmodval = ''; |
|
if (sform.donebutton.length) { |
|
for (var i=0; i<sform.donebutton.length; i++) { |
|
if (sform.donebutton[i].checked) { |
|
if (sform.donebutton[i].value == '_done') { |
|
newpmodval = sform.donebutton[i].value; |
|
} |
|
} |
|
} |
|
} |
|
pmodval = newpmodval; |
|
draw(); |
|
if (pmodval) { |
|
svalue += pmodval; |
|
} |
|
} else { |
|
draw(); |
|
} |
} |
} |
|
|
function integereval() { |
function integereval() { |
Line 345 function callradiostringeval(newval) {
|
Line 364 function callradiostringeval(newval) {
|
return 'onclick="parent.radiostringeval(\''+newval+'\')"'; |
return 'onclick="parent.radiostringeval(\''+newval+'\')"'; |
} |
} |
|
|
|
function callintervalpmodval() { |
|
return 'onclick="parent.intcalc()"'; |
|
} |
|
|
function intervaldis() { |
function intervaldis() { |
csecs=svalue; |
csecs=svalue; |
cdays=Math.floor(csecs/86400); |
cdays=Math.floor(csecs/86400); |
Line 478 function draw() {
|
Line 501 function draw() {
|
intday();choicewrite('days '); |
intday();choicewrite('days '); |
inthour();choicewrite('hours '); |
inthour();choicewrite('hours '); |
intminute(); choicewrite('mins '); intsecond(); |
intminute(); choicewrite('mins '); intsecond(); |
choicewrite('secs</td></tr></table>'); |
choicewrite('secs</td></tr></table>'); |
} else { |
choicewrite('<br />'); |
|
tablestart('Provide a "Done" button to students?'); |
|
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
|
choicewrite('<label><input name="donebutton" value="_done"'+ |
|
' type="radio" '+callintervalpmodval()); |
|
if (pmodval =='_done') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> Yes</label><br />'); |
|
choicewrite('<label><input name="donebutton" value=""'+ |
|
' type="radio" '+callintervalpmodval()); |
|
if (pmodval != '_done') { choicewrite(' checked="checked"'); } |
|
choicewrite(' /> No</label><br />'); |
|
choicewrite('</td></tr></table>'); |
|
} else { |
choicewrite('<tr><td colspan="3">' |
choicewrite('<tr><td colspan="3">' |
+cdate.toString()+ |
+cdate.toString()+ |
'</td></tr><tr><td>Date:</td><td colspan="2">'); |
'</td></tr><tr><td>Date:</td><td colspan="2">'); |
Line 830 function assemble() {
|
Line 865 function assemble() {
|
function init() { |
function init() { |
var i; |
var i; |
var subs=new Array(); |
var subs=new Array(); |
|
var doneRegExp = /_done/; |
var namevalue=this.window.location.search.split('&'); |
var namevalue=this.window.location.search.split('&'); |
namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1); |
namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1); |
|
|
Line 859 function init() {
|
Line 895 function init() {
|
if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; } |
if (pair[0]=='defsec' && pair[1] >= 0 && pair[1] < 60) { defsec=pair[1]; } |
} |
} |
|
|
|
if (ptype=='date' && pscat == 'interval') { |
|
if (doneRegExp.test(pvalue)) { |
|
var pnumval = pvalue.replace(doneRegExp,''); |
|
pmodval = pvalue.match(doneRegExp); |
|
pvalue = pnumval; |
|
} |
|
} |
svalue=pvalue; |
svalue=pvalue; |
if (((ptype=='float') || (ptype=='string') || (ptype=='int')) && |
if (((ptype=='float') || (ptype=='string') || (ptype=='int')) && |
(pscat=='default') && |
(pscat=='default') && |