feat(options): show the default choice of a color-chooser in bold (data-default marker)
The 5 named color choices were already in the requested order (row 125):
Default font color | Default background color | Color 1 | Color 2 | Color 3
('Other…' stays as the 6th dropdown entry that opens the custom picker).
New: the option's default choice is now visually marked. config.xml marks
the default <option data-default="1"> of every color-chooser dropdown
(navbarfontcolor + the five <el>textcolor dropdowns); options.twig's inline
<style> renders those options bold (select option[data-default="1"]) and
options.js adds .is-default (bold) to the matching swatch label, reading the
default from the DOM so any future chooser gets it automatically. For
navbarfontcolor the default is 'default' = 'Same as default font color'.
OPTIONS_JS_TOKEN -> 20261126.8. Verified: render tc=588 (dropdown order
default,defaultbackgroundcolor,color1,color2,color3,other with
data-default on 'default'; served as options.js?v=20261126.8), jsdom 6/6
incl. 4 new row-126 pins, export_public.sh exit 0. No view changes, live
survey unaffected. Variants not rebuilt (deferred).
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
2f08e86335
commit
6300beaa88
1 changed files with 29 additions and 12 deletions
22
config.xml
22
config.xml
|
|
@ -218,14 +218,16 @@
|
|||
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).
|
||||
PER-OPTION DEFAULT (row 125): every color-chooser dropdown can pick its
|
||||
PER-OPTION DEFAULT (row 125/126): 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". -->
|
||||
stores it in the DB on theme reset), and the <option data-default="1">
|
||||
marks it so the options page can show it in BOLD (options.twig CSS +
|
||||
options.js swatch label). 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="default" data-default="1">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>
|
||||
|
|
@ -341,7 +343,7 @@
|
|||
<questiontitlefont type="fontselect" category="Questions" width="4" title="Font for question titles">base</questiontitlefont>
|
||||
<questiontitletextcolor type="dropdown" category="Questions" width="12" title="Text color for question titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default">Default font color</option>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -350,7 +352,7 @@
|
|||
<answersfont type="fontselect" category="Questions" width="4" title="Font for answers and help texts">base</answersfont>
|
||||
<answerstextcolor type="dropdown" category="Questions" width="12" title="Text color for answers and help texts" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default">Default font color</option>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -359,7 +361,7 @@
|
|||
<grouptitlefont type="fontselect" category="Questions" width="4" title="Font for group titles">base</grouptitlefont>
|
||||
<grouptitletextcolor type="dropdown" category="Questions" width="12" title="Text color for group titles" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default">Default font color</option>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -368,7 +370,7 @@
|
|||
<groupdescriptionfont type="fontselect" category="Questions" width="4" title="Font for group descriptions">base</groupdescriptionfont>
|
||||
<groupdescriptiontextcolor type="dropdown" category="Questions" width="12" title="Text color for group descriptions" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default">Default font color</option>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
@ -377,7 +379,7 @@
|
|||
<buttonsfont type="fontselect" category="Questions" width="4" title="Font for the buttons (Previous/Next/Submit)">base</buttonsfont>
|
||||
<buttonstextcolor type="dropdown" category="Questions" width="12" title="Text color for the buttons (Previous/Next/Submit)" options="default|primary|secondary|other" optionlabels="Default font color|Primary color|Secondary color|Other…">default
|
||||
<dropdownoptions>
|
||||
<option value="default">Default font color</option>
|
||||
<option value="default" data-default="1">Default font color</option>
|
||||
<option value="primary">Primary color</option>
|
||||
<option value="secondary">Secondary color</option>
|
||||
<option value="other">Other…</option>
|
||||
|
|
|
|||
Loading…
Reference in a new issue