--- loncom/interface/slotrequest.pm 2015/09/25 02:03:29 1.127
+++ loncom/interface/slotrequest.pm 2015/09/27 14:21:48 1.129
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler for requesting to have slots added to a students record
#
-# $Id: slotrequest.pm,v 1.127 2015/09/25 02:03:29 raeburn Exp $
+# $Id: slotrequest.pm,v 1.129 2015/09/27 14:21:48 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -162,9 +162,24 @@ $js
var startdate = startm+"/"+startd+"/"+starty;
var starttime = new Date(startdate).getTime();
starttime = starttime/1000;
+ var starth = form.start_hour.options[form.start_hour.selectedIndex].value;
+ if (numberRegExp.test(starth)) {
+ starth = parseInt(starth);
+ if (starth > 0 && starth <= 23) {
+ starttime += 3600 * starth;
+ }
+ }
var enddate = endm+"/"+endd+"/"+endy;
var endtime = new Date(enddate).getTime();
endtime = endtime/1000;
+ var endh = form.end_hour.options[form.end_hour.selectedIndex].value;
+ if (numberRegExp.test(endh)) {
+ endh = parseInt(endh);
+ if (endh > 0 && endh <= 23) {
+ endtime += 3600 * endh;
+ }
+ }
+
var shown = 0;
for (var i=0; i<$i; i++) {
if ((slotstart[i] >= starttime) && (slotend[i] <= endtime)) {
@@ -246,7 +261,7 @@ function uncheckSlotRadio() {
}
}
-function toggleSlotMap(maprownum) {
+function toggleSlotMap(maprownum,rownum) {
if (document.getElementById('arrow'+maprownum)) {
var img = document.getElementById('arrow'+maprownum);
var rowdisplay;
@@ -263,20 +278,81 @@ function toggleSlotMap(maprownum) {
var resrows;
var maptext;
if (document.getElementsByClassName) {
- resrows = document.getElementsByClassName('LC_slotmaprow_'+maprownum);
+ resrows = document.getElementsByClassName('LC_slotresrow_'+maprownum);
maptext = document.getElementsByClassName('LC_slotmaptext_'+maprownum);
} else {
- resrows = getElementsByClassName(document.body,'LC_slotmaprow_'+maprownum);
+ resrows = getElementsByClassName(document.body,'LC_slotresrow_'+maprownum);
maptext = getElementsByClassName(document.body,'LC_slotmaptext_'+maprownum);
}
+ if (maptext.length) {
+ for (var i=0; i
'.join('',@{$maprows[$i]}).' | '. + $mapitem .= '||
'.join('',@{$maprows[$i]}).' | '. '||
'.$maprows[$i][0]. + ' | ||
'.$maprows[$i][0]. ''. + 'onclick="'."toggleSlotMap('$mapnum','$rownum');".'" />'. $maprows[$i][1].(' ' x6).' | '."\n"; } } @@ -2011,6 +2098,7 @@ sub manage_reservations { } $rownum ++; $output{$symb}{'rownum'} = $rownum; + $output{$symb}{'shown'} = $shown; if (!$shownheader) { $output{$symb}{'header'} = $slotheader; $shownheader = 1;