feat(options): return to the options tab you were on after Save

Row 133: after changing an option on a non-first tab and saving, the page
reloaded on the first tab. The active tab button id is now stored in
sessionStorage on every tab click (keyed per options-page URL: pathname +
sid/gsid scope, so global and per-survey pages don't clash and volatile
redirect params cannot change the key), and on page load the stored tab is
re-activated by class toggling (nav-link active/aria-selected + pane
active/show) — no Bootstrap API needed. OPTIONS_JS_TOKEN -> 20261126.12.
Verified: render tc=618 (served options.js?v=20261126.12), jsdom 6/6 incl.
new pins (tab click stores the id; a fresh load with the id pre-seeded
activates the stored tab and pane, first tab inactive), export exit 0.
Variants not rebuilt (deferred).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-26 18:45:16 +01:00
commit 1b6ae85f83

View file

@ -43,7 +43,7 @@
heuristically cached copy (the file has only Last-Modified/ETag, no Cache-Control).
Re-register it with a version token: bump OPTIONS_JS_TOKEN below whenever
options/options.js changes, so every browser fetches the new file once. #}
{% set OPTIONS_JS_TOKEN = '20261126.11' %}
{% set OPTIONS_JS_TOKEN = '20261126.12' %}
{{ unregisterScriptFile(optionsPath ~ '/options.js') }}
{{ registerScriptFile(optionsPath ~ '/options.js?v=' ~ OPTIONS_JS_TOKEN, 'POS_END') }}