|
@@ -13,19 +13,19 @@
|
|
|
<script>
|
|
<script>
|
|
|
// Shared page plumbing. showToast: slide-in notifications (used in
|
|
// Shared page plumbing. showToast: slide-in notifications (used in
|
|
|
// place of alert). initQuoteComments: registers a container matcher
|
|
// place of alert). initQuoteComments: registers a container matcher
|
|
|
- // for the text-highlight -> comment popover — selecting text inside
|
|
|
|
|
|
|
+ // for the text-highlight -> comment popover - selecting text inside
|
|
|
// a matched container shows a floating button, then a popover that
|
|
// a matched container shows a floating button, then a popover that
|
|
|
// posts the comment with the quoted text via the action the page
|
|
// posts the comment with the quoted text via the action the page
|
|
|
// supplies.
|
|
// supplies.
|
|
|
// Shared UI engines (parameterised per page):
|
|
// Shared UI engines (parameterised per page):
|
|
|
//
|
|
//
|
|
|
- // showToast — every page's toast corner.
|
|
|
|
|
|
|
+ // showToast - every page's toast corner.
|
|
|
//
|
|
//
|
|
|
- // initQuoteComments — the text-selection quote popover + dialog
|
|
|
|
|
|
|
+ // initQuoteComments - the text-selection quote popover + dialog
|
|
|
// posting a comment with the quoted text; pages pass a `matches`
|
|
// posting a comment with the quoted text; pages pass a `matches`
|
|
|
// node predicate and the action accessor.
|
|
// node predicate and the action accessor.
|
|
|
//
|
|
//
|
|
|
- // initPlanReviews (plan 16 R3, arch 15 — the ~180-line pattern
|
|
|
|
|
|
|
+ // initPlanReviews (plan 16 R3, arch 15 - the ~180-line pattern
|
|
|
// that lived duplicated between the task and goal pages, now
|
|
// that lived duplicated between the task and goal pages, now
|
|
|
// goal-only after the task-page plan review died with the poll
|
|
// goal-only after the task-page plan review died with the poll
|
|
|
// era): the plan/completion REVIEW remark queue. "Add remark"
|
|
// era): the plan/completion REVIEW remark queue. "Add remark"
|
|
@@ -36,8 +36,8 @@
|
|
|
// clears on accept. Remark-less rejection is allowed when the
|
|
// clears on accept. Remark-less rejection is allowed when the
|
|
|
// feedback textarea carries the substance (plan 16 S2). The
|
|
// feedback textarea carries the substance (plan 16 S2). The
|
|
|
// rejection body rides `feedback`; the SERVER wraps the per-kind
|
|
// rejection body rides `feedback`; the SERVER wraps the per-kind
|
|
|
- // stable prefix (R4 — templates carry no verdict constants). The
|
|
|
|
|
- // page supplies `resolveBlock(id)` — how a [data-plan-review]
|
|
|
|
|
|
|
+ // stable prefix (R4 - templates carry no verdict constants). The
|
|
|
|
|
+ // page supplies `resolveBlock(id)` - how a [data-plan-review]
|
|
|
// container's block row resolves from page state.
|
|
// container's block row resolves from page state.
|
|
|
window.initPlanReviews = function (config) {
|
|
window.initPlanReviews = function (config) {
|
|
|
if (!window.statum || !statum.afterEvaluate) return;
|
|
if (!window.statum || !statum.afterEvaluate) return;
|
|
@@ -170,7 +170,7 @@
|
|
|
var extra = review.querySelector('[data-plan-feedback] textarea[name="feedback"]');
|
|
var extra = review.querySelector('[data-plan-feedback] textarea[name="feedback"]');
|
|
|
var extraText = extra && extra.value.trim().length > 0 ? extra.value.trim() : '';
|
|
var extraText = extra && extra.value.trim().length > 0 ? extra.value.trim() : '';
|
|
|
// Remark-less rejection is allowed when the feedback
|
|
// Remark-less rejection is allowed when the feedback
|
|
|
- // textarea carries the review's substance — one of the
|
|
|
|
|
|
|
+ // textarea carries the review's substance - one of the
|
|
|
// two must be non-empty (plan 16 S2).
|
|
// two must be non-empty (plan 16 S2).
|
|
|
if (list.length === 0 && extraText.length === 0) {
|
|
if (list.length === 0 && extraText.length === 0) {
|
|
|
if (window.showToast) window.showToast('Highlight some text and add a remark, or write feedback first', 'error');
|
|
if (window.showToast) window.showToast('Highlight some text and add a remark, or write feedback first', 'error');
|
|
@@ -239,7 +239,7 @@
|
|
|
// plan-remarks pattern) toggles which side shows. Why JS-applied
|
|
// plan-remarks pattern) toggles which side shows. Why JS-applied
|
|
|
// values and not stm-attribute.value: statum's attribute binding
|
|
// values and not stm-attribute.value: statum's attribute binding
|
|
|
// sets the CONTENT attribute, which the browser ignores on
|
|
// sets the CONTENT attribute, which the browser ignores on
|
|
|
- // <textarea> (its value lives in the text node) — so the textarea
|
|
|
|
|
|
|
+ // <textarea> (its value lives in the text node) - so the textarea
|
|
|
// is re-prefilled from the card's data-value payload after every
|
|
// is re-prefilled from the card's data-value payload after every
|
|
|
// render cycle, while the page state carries the source of truth.
|
|
// render cycle, while the page state carries the source of truth.
|
|
|
// The card contract:
|
|
// The card contract:
|
|
@@ -285,7 +285,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // Prefill bookkeeping: applied ONCE per open — a statum
|
|
|
|
|
|
|
+ // Prefill bookkeeping: applied ONCE per open - a statum
|
|
|
// re-render (pulse refresh, action response) rebinds
|
|
// re-render (pulse refresh, action response) rebinds
|
|
|
// attributes but never textarea VALUES, so re-applying on
|
|
// attributes but never textarea VALUES, so re-applying on
|
|
|
// every cycle would clobber the user's in-progress typing.
|
|
// every cycle would clobber the user's in-progress typing.
|