]> git.plutz.net Git - lobster/commitdiff
Lobster: time sheet on therapy note
authorPaul Hänsch <paul@plutz.net>
Tue, 9 Oct 2018 11:45:26 +0000 (13:45 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 9 Oct 2018 11:45:26 +0000 (13:45 +0200)
static/therapy.css
templates/therapy.html.sh

index 9aa971e74cebd043f1971ac8b2548ea24afe6cf6..b17497c98d8e5bb6bcbe28d7c898b4d0e932ce1c 100644 (file)
@@ -132,10 +132,15 @@ input.stickynote + .stickynote {
   max-height: 90%;
   z-index: 2;
 }
+input.stickynote + .stickynote:nth-of-type(2n) {
+  background-color: #8FF;
+  top: 8em;
+}
+
 input.stickynote + .stickynote > * { display: none; }
 input.stickynote + .stickynote > label {
   position: absolute;
-  top: 0; bottom: 0;
+  top: 0; bottom: 0; right: .5ex;
   display: block;
   text-align: right;
   font-weight: bold;
@@ -144,10 +149,9 @@ input.stickynote + .stickynote:hover {
   left: -1ex;
 }
 input.stickynote:checked + .stickynote {
-  width: auto;
-  left: 1em;
-  right: 1em;
+  width: auto; left: 1em; right: 1em;
 }
+input.stickynote:checked + .stickynote > * { display: block; }
 input.stickynote:checked + .stickynote > textarea {
   display: block;
   position: absolute;
@@ -156,7 +160,7 @@ input.stickynote:checked + .stickynote > textarea {
   background-color: #FF8;
   padding: 2em 1em;
 }
-input.stickynote:checked + .stickynote > button {
+input.stickynote:checked + .stickynote > button[type="submit"] {
   display: block;
   position: absolute;
   right: .5ex; bottom: .5ex;
index e8af01505d69162934a44936732e8d177f7b0253..1821c24530c97b980d31fbad9ba50c87a116ac45 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2016 Paul Hänsch
+# Copyright 2016, 2017 Paul Hänsch
 #
 # This file is part of Confetti.
 # 
@@ -153,8 +153,27 @@ cat <<EOF
   <input class="stickynote" type="checkbox" name="c_stickynote" id="show_stickynote">
   <fieldset class="stickynote">
     <label for="show_stickynote">$(l10n notes)</label>
+    <h2>$(l10n notes)</h2>
     <textarea name="stickynote">${tpy[stickynote]}</textarea>
-    <button type=submit>$(l10n save)</button>
+    <button type="submit">$(l10n save)</button>
+  </fieldset>
+
+  <input class="stickynote" type="checkbox" name="c_timesheet" id="show_timesheet">
+  <fieldset class="stickynote">
+    <label for="show_timesheet">$(l10n timesheet)</label>
+    <h2>$(l10n timesheet)</h2>
+    <table><thead>
+      <tr><th>$(l10n time_goal)</th><th>$(l10n time_actual)</th><th>$(l10n time_difference)</th></tr>
+    </thead><tbody>
+      $(for n in '' {0..10}; do
+        printf '<tr><td><input type="number" name="tsgoal" value="%s"/></td>
+                    <td><input type="number" name="tsactual" value="%s"/></td>
+                    <td>%s</td>
+                </tr>\n' \
+                "$mpx[tsgoal${n}]" "$mpx[tsactual${n}]" "$((${mpx[tsgoal${n}]:-0} - ${mpx[tsactual${n}]:-0}))"
+      done)
+    </tbody></table>
+    <button type="submit">$(l10n save)</button>
   </fieldset>
 
   <!--input class="tab" type="checkbox" id="lookout">
@@ -204,4 +223,5 @@ cat <<EOF
 
 <script type="text/javascript" src="?static=therapy_draw.js"></script>
 EOF
+
 # vi:set filetype=html: