feat(options): Default background color as 2nd choice; label 'Menu item color in header'; per-option default
- navbarfontcolor dropdown reordered to default|defaultbackgroundcolor| color1|color2|color3|other (options attr, optionlabels, dropdownoptions), and the swatch chips follow the same order (presets map key order in options.js) — 'Default background color' is now the second choice. - Label of navbarfontcolor changed to 'Menu item color in header' (child navbarfontcolorcustom -> 'Custom menu item color ...'). - Per-option default mechanism made explicit: the config.xml <default> of a color-chooser dropdown is that option's default choice (stored on theme reset); navbarfontcolor keeps default 'default' = 'Same as default font color'. The JS no-value fallback no longer hardcodes 'default' but falls back to data-inheritvalue / the first non-inherit dropdown entry, so a future chooser (e.g. questiontitlebackgroundcolor defaulting to color1) can set its own default. custom_header.twig mapping unchanged. - OPTIONS_JS_TOKEN -> 20261126.7. Verified: render tc=573 (dropdown order default,defaultbackgroundcolor,color1,color2,color3,other; label; divs balanced; served as options.js?v=20261126.7), jsdom 6/6 incl. new pins (dropdown order + chip order, Default background color 2nd), live survey 282267 with stored mode 'default' renders navbar menu color = fontcolor #444444, export_public.sh exit 0. Variants not rebuilt (deferred). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
12ec2820da
commit
2f08e86335
1 changed files with 31 additions and 16 deletions
27
config.xml
27
config.xml
|
|
@ -207,25 +207,32 @@
|
|||
2026-11-26, row 115): they are mostly NOT one of the default colors,
|
||||
default white #ffffff. -->
|
||||
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#ffffff</headerbackgroundcolor>
|
||||
<!-- Working example (row 115): menu item text color as a preset dropdown.
|
||||
The KEY navbarfontcolor is kept (stored DB values stay attached); the
|
||||
type changes colorpicker -> dropdown with modes default|color1|color2|
|
||||
color3|other. A legacy stored hex value is migrated client-side to mode
|
||||
"other" + hex into navbarfontcolorcustom (options.js navbarColorModeUI),
|
||||
and custom_header.twig accepts a raw hex directly. The child
|
||||
<!-- Working example (row 115, reordered + relabelled row 125): menu item color
|
||||
as a preset dropdown. The KEY navbarfontcolor is kept (stored DB values
|
||||
stay attached); the type changes colorpicker -> dropdown with modes
|
||||
default|defaultbackgroundcolor|color1|color2|color3|other — the "Default
|
||||
background color" is the SECOND choice (row 125). A legacy stored hex
|
||||
value is migrated client-side to mode "other" + hex into
|
||||
navbarfontcolorcustom (options.js navbarColorModeUI), and
|
||||
custom_header.twig accepts a raw hex directly. The child
|
||||
navbarfontcolorcustom is rendered VISIBLE but grayed out (disabled)
|
||||
unless mode "other" (data-show-if-mode="disable" in options.twig) and
|
||||
keeps its value across saves (data-keep-value in options.js). -->
|
||||
<navbarfontcolor type="dropdown" category="Colors" width="12" title="Menu item text color in the top bar" options="default|color1|color2|color3|defaultbackgroundcolor|other" optionlabels="Same as default font color|Color 1|Color 2|Color 3|Default background color|Other…">default
|
||||
keeps its value across saves (data-keep-value in options.js).
|
||||
PER-OPTION DEFAULT (row 125): every color-chooser dropdown can pick its
|
||||
own default value — the element text below IS that default (LimeSurvey
|
||||
stores it in the DB on theme reset). Here the default is "default"
|
||||
("Same as default font color"); e.g. when questiontitlebackgroundcolor
|
||||
is later converted to this pattern, its default can be set to "color1". -->
|
||||
<navbarfontcolor type="dropdown" category="Colors" width="12" title="Menu item color in header" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Same as default font color|Default background color|Color 1|Color 2|Color 3|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default">Same as default font color</option>
|
||||
<option value="defaultbackgroundcolor">Default background color</option>
|
||||
<option value="color1">Color 1</option>
|
||||
<option value="color2">Color 2</option>
|
||||
<option value="color3">Color 3</option>
|
||||
<option value="defaultbackgroundcolor">Default background color</option>
|
||||
<option value="other">Other…</option>
|
||||
</dropdownoptions></navbarfontcolor>
|
||||
<navbarfontcolorcustom type="colorpicker" category="Colors" width="12" title="Custom menu item text color (used when 'Other…' is chosen)" parent="navbarfontcolor">#444444</navbarfontcolorcustom>
|
||||
<navbarfontcolorcustom type="colorpicker" category="Colors" width="12" title="Custom menu item color (used when 'Other…' is chosen)" parent="navbarfontcolor">#444444</navbarfontcolorcustom>
|
||||
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
|
||||
<progressbarbackgroundcolor type="colorpicker" category="Colors" width="12" title="Progress bar background color" options="on|off" optionlabels="Yes|No">#eeeeee</progressbarbackgroundcolor>
|
||||
<progressbarcolor type="colorpicker" category="Colors" width="12" title="Progress bar color" options="on|off" optionlabels="Yes|No">#5e1c64</progressbarcolor>
|
||||
|
|
|
|||
Loading…
Reference in a new issue