float:left;
width: 25ex;
margin: .125em .5ex .5ex .5ex;
- padding: 0 .2em .2em .2em;
+ padding: 0 .5ex .5ex .5ex;
background: #EEE;
}
.courselist .course .dtstart .DTSCALHEAD{
display: inline-block;
font-weight: bold;
- width: 4ex;
+ width: 4.5ex;
margin: .25ex;
+ overflow: hidden;
}
.courselist .course .dtstart .DTSCAL{
display: inline-block;
- width: 4ex;
+ width: 4.5ex;
margin: .25ex;
}
-.courselist .course .dtstart .selected {
- font-weight: bold;
-}
+.courselist .course .dtstart input[name=DTSDAY] { display: none; }
+.courselist .course .dtstart input[name=DTSDAY]:checked + label.DTSCAL { font-weight: bold; }
+
.courselist .course .dtstart .DTSTIME{
display: inline-block;
width: 10ex;
echo ' </select>'
echo ' <button class="DTS" type="submit" name="DTS" value="update">'$(l10n edit_dtscal)'</button>'
for wd in mon tue wed thu fri sat sun; do
- echo ' <span class="DTSCALHEAD">'$(date -d $wd +%a)'</span>'
+ echo -n '<span class="DTSCALHEAD">'$(date -d $wd +%a)'</span>'
done
fdom=$(date -d ${dts_year}-${dts_month}-1 +%u)
while [ "$fdom" -gt 1 ]; do
- echo ' <span class="DTSCAL"></span>'
+ echo -n '<span class="DTSCAL"></span>'
fdom=$(($fdom - 1))
done
-echo '<input type="hidden" name="DTSDAY" value="'$dts_dom'">'
+#echo -n '<input type="hidden" name="DTSDAY" value="'$dts_dom'">'
+#cnt=$(date -d ${dts_year}-${dts_month}-1 +%s)
+#while [ "$(date -d @$cnt +%m)" = "$dts_month" ]; do
+# dn=$(date -d @$cnt +%d)
+# echo -n '<button class="DTSCAL '$( [ $dn = $dts_dom ] && echo selected)'" type="submit" name="DTSDAY" value="'$dn'">'$dn'</button>'
+# cnt=$(($cnt + 86400))
+#done
cnt=$(date -d ${dts_year}-${dts_month}-1 +%s)
while [ "$(date -d @$cnt +%m)" = "$dts_month" ]; do
dn=$(date -d @$cnt +%d)
- echo ' <button class="DTSCAL '$( [ $dn = $dts_dom ] && echo selected)'" type="submit" name="DTSDAY" value="'$dn'">'$dn'</button>'
+ echo -n '<input type="radio" class="DTSCAL" name="DTSDAY" value="'$dn'" id="DTSCAL_'$dn'" '$([ $dn = $dts_dom ] && echo checked)'><label for="DTSCAL_'$dn'" class="DTSCAL">'$dn'</label>'
cnt=$(($cnt + 86400))
done
echo ' <br />'