[OCaml] High Intensity Training Online
fix keep exercise submit button in saved-record editing
The client enhances only the live workout exercise form, so a saved record view has no change handler on its dropdown. Scope the submit button hide to the enhanced form so switching exercise still works when editing a logged workout, notably on mobile.
lib/web/assets/hito.css
@@ -431,9 +431,14 @@
431
431
margin: 0;
432
432
padding: 0.65rem 1.1rem;
433
433
}
434
Removed:
/* With script active, the dropdown navigates on change, so the submit button is
435
Removed:
redundant; hide it. Without script it stays as the fallback. */
436
Removed:
[data-hito-js="on"] .exercise-select-go { display: none; }
434
Added:
/* With script active, the dropdown navigates on change only when the client
435
Added:
enhances the form (the live workout view). A saved-record view is not
436
Added:
enhanced, so its dropdown has no change handler and the submit button is the
437
Added:
only way to switch exercise; keep it visible there. Scope the hide to the
438
Added:
enhanced form so record editing stays usable, notably on mobile. */
439
Added:
[data-hito-js="on"] .exercise-select[data-hito-exercise-form] .exercise-select-go {
440
Added:
display: none;
441
Added:
}
437
442
438
443
/* The sticky workout timer bar. It pins to the top of the scroll area while a
439
444
workout is being logged and shows the elapsed time. The client ticks the