}
fs_splittimes() {
- local day times time c
+ local days day times time c
+ days="$(DBM "$file" get dates)"
cat <<-EOF
[fieldset .splittimes
[checkbox "none" "none" .splittimes checked disabled=disabled] [submit "splittimes" "no" Separate Time Options per Day]
- $(for day in $(DBM "$file" get dates); do
+ $([ ! "$days" ] && printf '[p You have not selected any days yet.]\n')
+ $(for day in $days; do
date -d $day +"[h2 . %A - %B %_d, %Y]"
times=$(DBM "$file" get "tod_$day")
for time in ${times:--}; do
width: 100%;
}
-@media(min-width: 48em) {
+@media(min-width: 50em) {
body.newdate form { width: 50em; }
body.newdate form input[name=title],
body.newdate form textarea[name=description] {
body.newdate form fieldset.splittimes {
width: 49.5%; width: calc(50% - .375ex);
}
+ body.newdate form fieldset.date { padding-right: .75em; }
+ body.newdate form fieldset.timeofday,
+ body.newdate form fieldset.splittimes { padding-left: .75em; }
}
body.newdate form input[name=title],
color: #666;
margin-top: .25em;
}
-body.newdate form .date table + button[name=month] { right: 0; }
+body.newdate form .date table + button[name=month] { right: .75em; }
body.newdate form .date table + button[name=month]:before {
content: '>';
}
body.newdate form .date table.calendar {
background-color: #FFF;
- font-size: 17.5pt;
+ font-size: 17pt;
-vertical-align: middle;
}
font-weight: bold;
text-align: left;
font-size: .75em;
- width: 49%; width: calc(50% - .5ex);
+ width: 49%; width: calc(50% - 2.5pt);
}
body.newdate form fieldset > input[name^=todstart],
body.newdate form fieldset > input[name^=todend] {
display: inline-block;
margin: 0;
- width: 49%; width: calc(50% - .5ex);
+ width: 49%; width: calc(50% - 2.5pt);
text-align: right;
}
body.newdate form fieldset > input[name^=todend] {
- width: 40%; widtfieldset% - 4.375ex);
+ width: 39%; width: calc( 50% - 4.375ex);
}
body.newdate form fieldset button[name^=addtime] {
body.newdate form fieldset input.splittimes:checked + *:before { content: '\2713'; background-color: #6AF;}
body.newdate form .timeofday button[name=splittimes] { margin-top: 1.5em;}
+body.newdate form .splittimes p { margin-top: 2em; padding: .5em; background: rgba(255,255,255,.5); }