fix(options): checkbox box before label, labels above controls, live color-swatch sync

- checkboxes (incl. the 9 logo show-on boxes): back to classic .form-check
  with the input BEFORE the label (label right of the box); label keeps id
  lbl_simple_edit_options_<key> so JS/test anchors are unchanged
- all other option types: label gets d-block so it sits above the control
  even next to an inline-flex btn-group (Simple options / Questions tabs)
- options.js: color swatch syncs on 'input' as well as 'change', so a color
  picked in the native popup is already in the saved JSON when Save is
  clicked (browsers fire 'change' only when the popup closes);
  OPTIONS_JS_TOKEN bumped to 20261125.3

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-25 21:05:01 +01:00
commit 588199086a

View file

@ -511,8 +511,13 @@ var ThemeOptions = function () {
//hotswapping the colorpickers and adding the reset functionality
var hotswapColorPicker = function () {
// THEME ADDITION: bind 'input' as well as 'change' — browsers fire 'input'
// live while the native color popup is dragged and 'change' only when it
// closes, so without 'input' a color picked but not yet "closed" would be
// lost when Save is clicked; syncing live makes the text field (and thus
// the saved options JSON) always carry the latest picked color.
globalForm.find('.selector__colorpicker-inherit-value')
.on('change', function (e) {
.on('change input', function (e) {
$(this).closest('.input-group').find('.selector_option_value_field').val($(this).val()).trigger('change');
});