[LON-CAPA-cvs] cvs: rat(version_2_11_X) /client parameter.html
raeburn
raeburn at source.lon-capa.org
Fri Aug 5 13:39:45 EDT 2016
raeburn Fri Aug 5 17:39:45 2016 EDT
Modified files: (Branch: version_2_11_X)
/rat/client parameter.html
Log:
- For 2.11
- Backport 1.69
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.64.2.2 rat/client/parameter.html:1.64.2.3
--- rat/client/parameter.html:1.64.2.2 Fri Jan 23 19:41:19 2015
+++ rat/client/parameter.html Fri Aug 5 17:39:45 2016
@@ -5,7 +5,7 @@
The LearningOnline Network with CAPA
Parameter Input Window
//
-// $Id: parameter.html,v 1.64.2.2 2015/01/23 19:41:19 raeburn Exp $
+// $Id: parameter.html,v 1.64.2.3 2016/08/05 17:39:45 raeburn Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -241,58 +241,66 @@
function intminute() {
var thisminutes=cmins;
var i;
- choicewrite('<select name="minutes" onchange="parent.intcalc();">');
+ var result = '';
+ result += '<select name="minutes" onchange="parent.intcalc();">';
for (i=0;i<=59;i++) {
- choicewrite('<option value="'+i+'"');
+ result += '<option value="'+i+'"';
if (i==thisminutes) {
- choicewrite(' selected="selected"');
+ result += ' selected="selected"';
}
- choicewrite('>'+i+'</option>');
+ result += '>'+i+'</option>';
}
- choicewrite('</select>');
+ result += '</select>';
+ return result;
}
function inthour() {
var thishours=chours;
var i;
- choicewrite('<select name="hours" onchange="parent.intcalc();">');
+ var result = '';
+ result += '<select name="hours" onchange="parent.intcalc();">';
for (i=0;i<=23;i++) {
- choicewrite('<option value="'+i+'"');
+ result += '<option value="'+i+'"';
if (i==thishours) {
- choicewrite(' selected="selected"');
+ result += ' selected="selected"';
}
- choicewrite('>'+i+'</option>');
+ result += '>'+i+'</option>';
}
- choicewrite('</select>');
-}
+ result += '</select>';
+ return result;
+}
function intsecond() {
var thisseconds=csecs;
var i;
- choicewrite('<select name="seconds" onchange="parent.intcalc();">');
+ var result = '';
+ result += '<select name="seconds" onchange="parent.intcalc();">';
for (i=0;i<=59;i++) {
- choicewrite('<option value="'+i+'"');
+ result += '<option value="'+i+'"';
if (i==thisseconds) {
- choicewrite(' selected="selected"');
+ result += ' selected="selected"';
}
- choicewrite('>'+i+'</option>');
+ result += '>'+i+'</option>';
}
- choicewrite('</select>');
-}
+ result += '</select>';
+ return result;
+}
function intday() {
var thisdate=cdays;
var i;
- choicewrite('<select name="date" onchange="parent.intcalc();">');
+ var result ='';
+ result += '<select name="date" onchange="parent.intcalc();">';
for (i=0;i<=31;i++) {
- choicewrite('<option value="'+i+'"');
+ result += '<option value="'+i+'"';
if (i==thisdate) {
- choicewrite(' selected="selected"');
+ result += ' selected="selected"';
}
- choicewrite('>'+i+'</option>');
+ result += '>'+i+'</option>';
}
- choicewrite('</select>');
+ result += '</select>';
+ return result;
}
function intcalc() {
@@ -471,14 +479,17 @@
}
if (pscat=='interval') {
tablestart('Time interval');
- choicewrite('<tr><td colspan="3">');
- intervaldis();
- choicewrite('</td></tr><tr><td>Time:'
- +'</td><td colspan="2">');
- intday();choicewrite('days ');
- inthour();choicewrite('hours ');
- intminute(); choicewrite('mins '); intsecond();
- choicewrite('secs</td></tr></table>');
+ choicewrite( [
+ '<tr><td colspan="3">'+intervaldis()+'</td></tr>',
+ '<tr><td>Time:</td><td colspan="2">',
+ '<span style="white-space:nowrap">'+intday()+' days </span>',
+ '<span style="white-space:nowrap">'+inthour()+' hours</span>',
+ '<span style="white-space:nowrap">'+intminute()+' mins</span>',
+ '<span style="white-space:nowrap">'+intsecond()+' secs</span>',
+ '</td></tr>',
+ '</table>',
+ '<br />',
+ ].join("\n"));
} else {
choicewrite('<tr><td colspan="3">'
+cdate.toString()+
More information about the LON-CAPA-cvs
mailing list