]> git.plutz.net Git - lobster/commitdiff
reduced latency, sticky note in therapy view
authorpaul <paul@plutz.net>
Fri, 20 May 2016 10:18:46 +0000 (10:18 +0000)
committerpaul <paul@plutz.net>
Fri, 20 May 2016 10:18:46 +0000 (10:18 +0000)
svn path=/trunk/; revision=106

templates/attendees.html.sh
templates/clients.html.sh
templates/prescriptions.html.sh
templates/therapy.css.sh
templates/therapy.html.sh

index 12f12265e9c0f40838a57964a452ab096e58ed08..3fee91a76782dd564059d2d01bef85c2e3cd9c26 100755 (executable)
@@ -58,11 +58,11 @@ cat <<EOF
 </form>
 
 ${edit:+$(edit_card "$edit")}
+EOF
 
-$(
-  listcards |grep ${edit:+-v} "$edit" \
-  | while read card; do
-    cat <<-ENDCARD
+listcards |grep ${edit:+-v} "$edit" \
+| while read card; do
+  cat <<-ENDCARD
        <div id="${card}" class="card">
          $(view_card "$card")<!--
          --><div class="control">
@@ -71,8 +71,6 @@ $(
          </div>
        </div>
        ENDCARD
-  done
-)
-EOF
+done
 
 # vi:set filetype=html:
index db8a4de8548f11149c8d071ff7af4fdf4d7c4265..aef2c96c92dfbeaea8a2a887b86bcce5517504bf 100755 (executable)
@@ -25,7 +25,7 @@ check_order(){
 edit="${_GET[edit]}"
 [ \! -f "vcard/$edit" -a \! -f "temp/$edit" ] && edit=''
 [ -z "${_GET[filtertype]}" ] && _GET[filtertype]="any"
-[ -z "${_GET[order]}" ] && _GET[order]="firstname"
+[ -z "${_GET[order]}" ] && _GET[order]="lastname"
 
 cat <<EOF
 <form class="filter" action="?action=filter_card" method="POST">
@@ -57,11 +57,11 @@ cat <<EOF
 </form>
 
 ${edit:+$(edit_card "$edit")}
+EOF
 
-$(
-  listcards |grep ${edit:+-v} "$edit" \
-  | while read card; do
-    cat <<-ENDCARD
+listcards |grep ${edit:+-v} "$edit" \
+| while read card; do
+  cat <<-ENDCARD
        <div id="${card}" class="card">
          $(view_card "$card")<!--
          --><div class="control">
@@ -71,8 +71,6 @@ $(
          </div>
        </div>
        ENDCARD
-  done
-)
-EOF
+done
 
 # vi:set filetype=html:
index a662c74b229346376b8155acd737a66739762e0e..c4ef19addc060da015f8db7c6954aaebd23a38f1 100755 (executable)
@@ -31,19 +31,17 @@ cat <<EOF
     <button type="submit">$(l10n newprescription)</button>
   </form>
 </div>
+EOF
 
-$(list_prescriptions "$client" |grep -q "$edit" || edit_prescription "$edit")
-
-$(list_prescriptions "$client" \
-  |while read pre; do 
-    [ "$pre" = "$edit" ] \
-    && edit_prescription "$pre" \
-    || view_prescription "$pre"
-  done
-)
+list_prescriptions "$client" |grep -q "$edit" || edit_prescription "$edit"
 
-<!--h1>$(l10n prescriptions_past)</h1-->
+list_prescriptions "$client" \
+|while read pre; do 
+  [ "$pre" = "$edit" ] \
+  && edit_prescription "$pre" \
+  || view_prescription "$pre"
+done
 
-EOF
+#<!--h1>$(l10n prescriptions_past)</h1-->
 
 # vi:set filetype=html:
index 4b87bcc4ec5f50c0c8a0ad62b91b3be82cfd9514..ce636a404d503510999e274711e7ea07501f3a44 100755 (executable)
@@ -148,6 +148,64 @@ div:nth-child(n+2) > a:first-of-type {
   text-decoration: none;
 }
 
+input.stickynote { display:none; }
+input.stickynote + .stickynote {
+  position: fixed;
+  background-color: #FF8;
+  top: 4em; bottom: 4em;
+  left: -4.5em; width: 5em;
+  padding: 1ex;
+  max-height: 90%;
+  z-index: 2;
+}
+input.stickynote + .stickynote > * { display: none; }
+input.stickynote + .stickynote > label {
+  position: absolute;
+  top: 0; bottom: 0;
+  display: block;
+  text-align: right;
+  font-weight: bold;
+}
+input.stickynote + .stickynote:hover {
+  left: -1ex;
+}
+input.stickynote:checked + .stickynote {
+  width: auto;
+  left: 1em;
+  right: 4em;
+  padding-top: .5ex;
+}
+input.stickynote:checked + .stickynote > textarea {
+  display: block;
+  position: absolute;
+  left; 0; right: 0; bottom: 0; top: 0;
+  width: 100%; height: 100%;
+  background-color: #FF8;
+  padding: 2em 1em;
+}
+input.stickynote:checked + .stickynote > button {
+  display: block;
+  position: absolute;
+  right: .5ex; bottom: .5ex;
+  z-index: 2;
+}
+input.stickynote:checked + .stickynote > label {
+  display: block;
+  position: static;
+  font-size: 0;
+}
+input.stickynote:checked + .stickynote > label:before {
+  position: absolute;
+  font-size: initial;
+  content: "x";
+  top: .5ex; right: .5ex;
+  padding: .125ex .75ex;
+  background-color: #000;
+  color: #FFF;
+  border-radius: 1ex;
+  z-index: 2;
+}
+
 fieldset.tab,
 label.tab {
   font-size: 1.25em;
index eb93553fae7d3ca3163d4165b913f47aefdbc017..0c91487cee322764b670f06608a124cf98d7f1fe 100755 (executable)
@@ -125,56 +125,65 @@ case "$tpy[color]" in
 esac
 
 cat <<EOF
-  <h1>$(l10n therapy)</h1>
+<h1>$(l10n therapy)</h1>
 
-  <div class="patient">
-    <h2>$client_name</h2>
-    <a href="?p=prescriptions&amp;client=${id%%.*}.vcf">&lt; $(l10n prescriptionlist)</a>
-  </div>
+<div class="patient">
+  <h2>$client_name</h2>
+  <a href="?p=prescriptions&amp;client=${id%%.*}.vcf">&lt; $(l10n prescriptionlist)</a>
+</div>
 
-  <div class="prescription">
-    <h2>$(l10n therapy_prescription)</h2>
-    <span class="insurance">${mpx[insurance]}</span>
-    <span class="date"><label>$(l10n date):</label>${mpx[date]}</span>
-
-    <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
-      $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
-                                       || printf %s "$(l10n prescreview)" )
-    </label>
-
-         ${mpx[prescno]:+<span class="prescno">$(l10n presc${mpx[prescno]})</span>}
-    ${mpx[grouptherapy]:+<span class="catalogue">$(l10n grouptherapy)</span>}
-       ${mpx[housecall]:+<span class="catalogue">$(l10n housecall)</span>}
-          ${mpx[report]:+<span class="catalogue">$(l10n report)</span>}
-
-    <ul>
-      ${mpx[remidy]:+ <li>${mpx[quantity]}  ${mpx[remidy]}  ${mpx[quantity_weekly]:+($mpx[quantity_weekly] $(l10n weekly))}</li>}
-      ${mpx[remidy1]:+<li>${mpx[quantity1]} ${mpx[remidy1]} ${mpx[quantity_weekly1]:+($mpx[quantity_weekly1] $(l10n weekly))}</li>}
-    </ul>
-
-    ${mpx[indicator]:+<span class="indicator"><label>$(l10n indicator):</label>${mpx[indicator]}</span>}
-        ${mpx[icd10]:+<span class="icd10">    <label>$(l10n icd10):</label>${mpx[icd10]}</span>}
-
-    ${mpx[addcontrib]:+
-    <label class='checkbox ${mpx[contribconfirm]:+checked}' for="addcontrib">
-      $([ -n "${mpx[contribconfirm]}" ] && printf %s "$(l10n contribconfirm)" ${mpx[contribconfirm]} \
-                                        || printf %s "$(l10n addcontrib)" )
-    </label>
-    }
-  </div>
+<div class="prescription">
+  <h2>$(l10n therapy_prescription)</h2>
+  <span class="insurance">${mpx[insurance]}</span>
+  <span class="date"><label>$(l10n date):</label>${mpx[date]}</span>
+
+  <label class="checkbox ${mpx[prescreviewed]:+checked}" for="prescreviewed">
+    $([ -n "${mpx[prescreviewed]}" ] && printf %s "$(l10n prescreviewed)" \
+                                     || printf %s "$(l10n prescreview)" )
+  </label>
+
+       ${mpx[prescno]:+<span class="prescno">$(l10n presc${mpx[prescno]})</span>}
+  ${mpx[grouptherapy]:+<span class="catalogue">$(l10n grouptherapy)</span>}
+     ${mpx[housecall]:+<span class="catalogue">$(l10n housecall)</span>}
+        ${mpx[report]:+<span class="catalogue">$(l10n report)</span>}
+
+  <ul>
+    ${mpx[remidy]:+ <li>${mpx[quantity]}  ${mpx[remidy]}  ${mpx[quantity_weekly]:+($mpx[quantity_weekly] $(l10n weekly))}</li>}
+    ${mpx[remidy1]:+<li>${mpx[quantity1]} ${mpx[remidy1]} ${mpx[quantity_weekly1]:+($mpx[quantity_weekly1] $(l10n weekly))}</li>}
+  </ul>
+
+  ${mpx[indicator]:+<span class="indicator"><label>$(l10n indicator):</label>${mpx[indicator]}</span>}
+      ${mpx[icd10]:+<span class="icd10">    <label>$(l10n icd10):</label>${mpx[icd10]}</span>}
+
+  ${mpx[addcontrib]:+
+  <label class='checkbox ${mpx[contribconfirm]:+checked}' for="addcontrib">
+    $([ -n "${mpx[contribconfirm]}" ] && printf %s "$(l10n contribconfirm)" ${mpx[contribconfirm]} \
+                                      || printf %s "$(l10n addcontrib)" )
+  </label>
+  }
+</div>
 
 <form method="POST" action="?action=update_therapy">
   <input type="hidden" name="id" value="${id}">
 
+  <input class="stickynote" type="checkbox" name="c_stickynote" id="show_stickynote">
+  <fieldset class="stickynote">
+    <label for="show_stickynote">$(l10n notes)</label>
+    <textarea name="stickynote">${tpy[stickynote]}</textarea>
+    <button type=submit>$(l10n save)</button>
+  </fieldset>
+
   <label class="tab heading">
     <span class=no>$(l10n number)</span><!--
  --><span class=date>$(l10n date)</span><!--
  --><span class=therapist>$(l10n therapist)</span><!--
  --><span class=signature>$(l10n signature)</span>
   </label>
+EOF
 
-  $(therapy_sessions)
+therapy_sessions
 
+cat <<EOF
   <fieldset class=color>
     <input class=color type=radio name=color onclick="javascript:setcol('#000')" value="#000" id=c000 $c0><label for=c000></label>
     <input class=color type=radio name=color onclick="javascript:setcol('#00A')" value="#00A" id=c001 $c1><label for=c001></label>