--- /dev/null
+* {
+ font-family: sans-serif;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ z-index: 0;
+}
+body {
+ background: #EEE;
+ margin: 0;
+ padding: 2.5em 0 0 0;
+}
+.NAVIGATION {
+ position: fixed;
+ top: 0;
+ display: inline-block;
+ border-style: none solid solid solid;
+ border-width: 0 1px 1px 1px;
+ border-radius: 0 0 4px 4px;
+ margin: 0 auto auto 3%;
+ padding: .5em 1ex .5em 1ex;
+ background: #FFF;
+ z-index: 1;
+}
+.NAVIGATION a {
+ color: #008;
+ border: solid 1px #BBF;
+ margin: .5em .5ex .25em .5ex;
+ padding: .2em 3ex .2em 3ex;
+ background: #EFF;
+}
+.NAVIGATION a:hover {
+ border-width: 2px 1px 2px 1px;
+ background: #F3FFFF;
+}
+
+.trailbtn { display: none; }
+.trailbtn + .trailbox { display: none; }
+.trailbtn:checked + .trailbox { display: inline-block; }
+.trailbtn:checked + .trailbox + .trailbtn { display: block; }
+.trailbtn:checked + .trailbox + .trailbtn:before {
+ display: block; content: '+';
+ width: 3ex; text-align: center;
+ margin-top: .25em; padding: .25em 0;
+ background-color: #FFF;
+ border-width: 1px; border-style: solid;
+}
+.trailbtn:checked + .trailbox + .trailbtn:checked,
+.trailbtn:checked { display: none; }
+
$( for n in {0..10}; do
if [ "$n" -eq 0 -o -n "${mpx[quantity$n]}" -o -n "${mpx[remidy$n]}" -o -n "${mpx[quantity_weekly$n]}" ]; then
- printf '<input type="checkbox" checked="checked">'
+ printf '<input class="trailbtn" type="checkbox" checked="checked" />'
else
- printf '<input type="checkbox">'
+ printf '<input class="trailbtn" type="checkbox" />'
fi
- printf '<p>
+ printf '<p class="trailbox">
<input class="quantity" name="quantity" placeholder="%s" value="%s">
<textarea class="remidy" name="remidy" placeholder="%s">%s</textarea>
<input class="quantity_weekly" name="quantity_weekly" placeholder="%s" value="%s">
<head>
<title>$(l10n p_${PAGE})</title>
<meta name="viewport" content="width=device-width">
+ <link rel="stylesheet" href="?static=common.css">
<style type="text/css">
<!--
-* {
- font-family: sans-serif;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- z-index: 0;
-}
-body {
- background: #EEE;
- margin: 0;
- padding: 2.5em 0 0 0;
-}
-.NAVIGATION {
- position: fixed;
- top: 0;
- display: inline-block;
- border-style: none solid solid solid;
- border-width: 0 1px 1px 1px;
- border-radius: 0 0 4px 4px;
- margin: 0 auto auto 3%;
- padding: .5em 1ex .5em 1ex;
- background: #FFF;
- z-index: 1;
-}
-.NAVIGATION a {
- color: #008;
- border: solid 1px #BBF;
- margin: .5em .5ex .25em .5ex;
- padding: .2em 3ex .2em 3ex;
- background: #EFF;
-}
-.NAVIGATION a:hover {
- border-width: 2px 1px 2px 1px;
- background: #F3FFFF;
-}
-
-/* dynamic page CSS starts here */
$(debug CSS; [ -x "${CSS}" ] && . "${CSS}")
-->
</style>
/**/
body {padding-bottom: 3em; }
+.trailbtn { display: none; }
+.trailbtn + .trailbox { display: none; }
+.trailbtn:checked + .trailbox { display: inline-block; }
+.trailbtn:checked + .trailbox + .trailbtn { display: block; }
+.trailbtn:checked + .trailbox + .trailbtn:before {
+ display: block; content: '+';
+ width: 3ex; text-align: center;
+ margin-top: .25em; padding: .25em 0;
+ background-color: #FFF;
+ border-width: 1px; border-style: solid;
+}
+.trailbtn:checked + .trailbox + .trailbtn:checked,
+.trailbtn:checked { display: none; }
+
.prescription {
display: inline-block;
width: 96%; max-width: 460px;
.description #quantity_weekly,
.description .quantity_weekly { width: 20%; height: 3em; text-align: center;}
- .description input[type=checkbox] { display: none; }
- .description input[type=checkbox] + p { display: none; }
- .description input:checked + p { display: inline-block; }
- .description input:checked + p + input { display: block;}
- .description input:checked + p + input:after {
- display: block; width: 3ex;
- background-color: #FFF;
- border: 1px solid black;
- margin-top: .25em;
- text-align: center;
- content: '+';
- }
- .description input:checked + p + input:checked,
- .description input:checked { display: none; }
-
.description .indicator_codes {display: inline-block; width: 20%; padding: 0; padding-top: 1.5ex;}
.description label[for=indicator],
.description label[for=icd10] { display: block; width: 100%;}
#!/bin/sh
cat <<EOF
+
+.trailbtn:checked + fieldset.trailbox { display: block;}
+
* { box-sizing: border-box; }
body {
overflow: scroll;
padding-top: 2em;
}
+form > button[type=submit] {
+ position: fixed; display: block;
+ top: 0; left: 15em;
+ height: 2.25em; padding: 0 3ex;
+ font-size: 1em; font-weight: bold;
+ color: #000; background-color: #FDD;
+ border-width: 1px; border-color: #000;
+ border-style: none solid solid solid;
+ border-radius: 0 0 4px 4px;
+}
+form > button[type=submit]:hover {
+ background-color: #FEE;
+}
+
input.tab { display: none; }
input.tab + label.tab { display: block; }
input.tab + label.tab::before { content: '\25b8 \00a0'; float: left;}
.tab > .therapist { width: 30%; }
.tab > .signature { width: 20%; }
label.tab > .signature { font-size: .75em; }
-.tab > .signature > button { display: inline-block; margin: 0; }
-/* fieldset.tab > button[type=submit] { width: 5%; text-align: center; margin-left: 5%;} */
-fieldset.tab > button[type=submit] { height: 2em; color: #FFF; font-weight: bold;}
-fieldset.tab > button[type=submit]::first-letter { font-size: 1.75em;}
-.signature > button[value=pos],
-.signature > button[value=neg] {
- margin-bottom: .25em;
- border: 1px solid black;
- height: 1.5em; width: 1.5em;
- vertical-align: top;
+.signature > input[type=checkbox] {
+ display: inline;
+ font-weight: bold;
+ font-size: 1.25em;
+}
+.signature > input[type=checkbox]:before {
+ display: block; width: 1.25em;
+ margin: -.125em 0 0 -.5ex;
background-color: #FFF;
- color: #000;
- white-space: nowrap;
+ text-align: center;
+ content: "\00a0 \00a0 \00a0";
+}
+.signature > input[type=checkbox]:checked::before {
+ content: "\2713";
}
-.signature > input[type=checkbox] {display: none;}
-.signature > button[value=neg]::before { padding: 0 1ex 0 .25ex; content: "\2713"; }
-.signature > button[value=pos]::before { padding: 0 1ex 0 .25ex; content: "\00a0 \00a0 \00a0"; }
input.tab + label.tab > input.date,
input.tab + label.tab > input.therapist {
display: none;
}
-
div.tab {
border: 2px solid #333;
border-top-width: 1px;
margin-top: -1px;
- padding: .25em .5ex;
+ padding: .25em .5ex 1em .5ex;
}
div.tab > fieldset.note {
border: none;
}
div.tab > fieldset.note > textarea {
display: block;
- width: 95%; height: 8em;
+ width: 93%; height: 8em;
margin: -8em 0 .5em 2em;
font: normal 1em sans-serif;
}
div.tab > fieldset.note > input.color[value="#AA0"]:checked ~ textarea { background-color: #FF8; }
div.tab > fieldset.note > input.color[value="#FFF"]:checked ~ textarea { background-color: #FFF; }
-div.tab > button.delete {float: right; display: inline-block;}
+div.tab > button.delete {float: right; display: inline-block; margin-top: -1em;}
EOF
# vi:set filetype=css:
*) c7=checked;;
esac
+if [ "$note_n" -eq 1 -o -n "${tpy[session${session_n}_note${note_n}]}" ]; then
+ printf '<input class="trailbtn" type="checkbox" checked="checked">'
+else
+ printf '<input class="trailbtn" type="checkbox">'
+fi
cat <<EOF
- <fieldset class=note>
+ <fieldset class="note trailbox">
<input class=color type=radio name="$color" value="#888" id=${color}_000 $c0><label for=${color}_000></label>
<input class=color type=radio name="$color" value="#00A" id=${color}_001 $c1><label for=${color}_001></label>
<input class=color type=radio name="$color" value="#0A0" id=${color}_010 $c2><label for=${color}_010></label>
sid=session${session_n}
if [ "$tpy[${sid}_sigset]" = pos ]; then
- sig=neg
- sigcheck=checked
- elif [ "$tpy[${sid}_sigset]" = neg ]; then
- sig=pos
- unset sigcheck
- elif [ "$tpy[${sid}_signature]" = pos ]; then
- sig=neg
sigcheck=checked
else
- sig=pos
unset sigcheck
fi
--><input class="date" name="${sid}_date" value="${tpy[${sid}_date]}" placeholder="$(l10n date)"><!--
--><span class=therapist>${tpy[${sid}_therapist]}</span><!--
--><input class="therapist" name="${sid}_therapist" value="${tpy[${sid}_therapist]}" placeholder="$(l10n therapist)"><!--
- --><span class=signature><input type=checkbox name="${sid}_signature" value=pos $sigcheck><button type=submit name=${sid}_sigset value=$sig></button></span>
+ --><span class=signature><input type="checkbox" name="${sid}_sigset" value="pos" $sigcheck></span>
</label>
<div class=tab>
<img class="dotmark ov" src="/therapies/${id%.tpy}_${sid}.png" alt="">
- $(n=1; while [ -n "${tpy[${sid}_note${n}]+x}" ]; do
- t_session_note $session_n $n
- n=$(($n+1))
- done
- printf '<button type=submit name=%s_note%s value="">+</button>' "$sid" "$n"
- )
+ $( for n in {1..50}; do t_session_note $session_n $n; done )
<button class=delete type=submit name=delete_session value=${session_n}>$(l10n delete_session)</button>
- <button type=submit>$(l10n save)</button>
</div>
EOF
}
<input type=hidden id=image_serialize name=imagedata value="">
<span id="jsdebug" style="display: none; position: fixed; right:0; bottom:0">Debug</span>
- <script><!--
- body = document.body
- canvas = document.getElementById("canvas")
- dbg = document.getElementById("jsdebug")
- image = canvas.getContext("2d")
- mouse = 0
- image_serialize=""
- data=document.getElementById("image_serialize")
-
- function setcol(c) {
- image.strokeStyle = c
- if ( c == "#FFF" ) image.lineWidth = 32
- else image.lineWidth = 4
- image_serialize += " stroke " + c + " stroke-width " + image.lineWidth
- }
+ <button type="submit">$(l10n save)</button>
+</form>
- setcol("$tpy[color]")
-
- function draw(x, y) {
- if ( mouse == 1){
- if ( body.clientWidth >= 800 ){
- sx=Math.floor(cscaleW * (x - canvas.offsetLeft))
- sy=Math.floor(cscaleH * (y - canvas.offsetTop))
- } else {
- sx=Math.floor(cscaleW * (x - canvas.offsetLeft + window.pageXOffset))
- sy=Math.floor(cscaleH * (y - canvas.offsetTop + window.pageYOffset))
- }
- image.lineTo( sx, sy )
- image.stroke()
-
- image_serialize += " " + sx + "," + sy
- }
- }
+<script><!--
+body = document.body
+canvas = document.getElementById("canvas")
+dbg = document.getElementById("jsdebug")
+image = canvas.getContext("2d")
+mouse = 0
+image_serialize=""
+data=document.getElementById("image_serialize")
+
+function setcol(c) {
+ image.strokeStyle = c
+ if ( c == "#FFF" ) image.lineWidth = 32
+ else image.lineWidth = 4
+ image_serialize += " stroke " + c + " stroke-width " + image.lineWidth
+}
- function drawstart(x, y) {
- mouse = 1
+setcol("$tpy[color]")
- cscaleW = canvas.width / canvas.clientWidth
- cscaleH = canvas.height / canvas.clientHeight
+function draw(x, y) {
+ if ( mouse == 1){
+ if ( body.clientWidth >= 800 ){
+ sx=Math.floor(cscaleW * (x - canvas.offsetLeft))
+ sy=Math.floor(cscaleH * (y - canvas.offsetTop))
+ } else {
+ sx=Math.floor(cscaleW * (x - canvas.offsetLeft + window.pageXOffset))
+ sy=Math.floor(cscaleH * (y - canvas.offsetTop + window.pageYOffset))
+ }
+ image.lineTo( sx, sy )
+ image.stroke()
- image_serialize += " polyline"
- image.beginPath()
- draw(x, y)
- }
- function drawstop() {
- mouse = 0
- image.closePath()
- dbg.innerHTML = image_serialize
- data.value = image_serialize
+ image_serialize += " " + sx + "," + sy
}
+}
- window.addEventListener( 'mouseup', function() { drawstop() } )
- canvas.addEventListener( 'mousedown', function(e) { drawstart(e.clientX, e.clientY) } )
- canvas.addEventListener( 'mousemove', function(e) { draw(e.clientX, e.clientY) } )
+function drawstart(x, y) {
+ mouse = 1
- window.addEventListener( 'touchend', function() { drawstop() } )
- canvas.addEventListener( 'touchstart', function(e) { drawstart(e.touches[0].clientX, e.touches[0].clientY) } )
- canvas.addEventListener( 'touchmove', function(e) { e.preventDefault(); draw(e.touches[0].clientX, e.touches[0].clientY) } )
+ cscaleW = canvas.width / canvas.clientWidth
+ cscaleH = canvas.height / canvas.clientHeight
- --></script>
-</form>
+ image_serialize += " polyline"
+ image.beginPath()
+ draw(x, y)
+}
+function drawstop() {
+ mouse = 0
+ image.closePath()
+ //dbg.innerHTML = image_serialize
+ data.value = image_serialize
+}
+
+window.addEventListener( 'mouseup', function() { drawstop() } )
+canvas.addEventListener( 'mousedown', function(e) { drawstart(e.clientX, e.clientY) } )
+canvas.addEventListener( 'mousemove', function(e) { draw(e.clientX, e.clientY) } )
+window.addEventListener( 'touchend', function() { drawstop() } )
+canvas.addEventListener( 'touchstart', function(e) { drawstart(e.touches[0].clientX, e.touches[0].clientY) } )
+canvas.addEventListener( 'touchmove', function(e) { e.preventDefault(); draw(e.touches[0].clientX, e.touches[0].clientY) } )
+--></script>
EOF
# vi:set filetype=html: