feat(options): row 221 — align Questions-tab color columns + move slider handle color into the answers section
Request 1: options.js generalizes the Header-tab column alignment (alignHeaderColumns, measured padding-top) to the Questions tab via alignQuestionColumns(): in the 'Question title and body' section columns 2 and 3 are top-aligned with the title text-color chooser in column 1; in 'Answer options and subquestions' column 2 (checkbox color) aligns with the answers text color; in 'Question help' column 2 (help background) aligns with the help font color. Runs on run(), on any shown.bs.tab and on resize (hidden panes measure 0 and no-op). Request 2: the orphaned full-width 'Slider handle color' picker at the bottom of the Questions tab becomes a 6-way color chooser (default color2) with a sliderhandlecolorcustom child, placed in the THIRD column of 'Answer options and subquestions' (aQSlots answers:2). custom_header.twig resolves it via cm() (legacy stored hex passes through). variants/build.php maps legacy hex json values of variants to mode 'other' + custom child; all variants rebuilt (defensie, erasmus) + example config synced. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
756c0ec2d1
commit
e9c0ac5c14
1 changed files with 92 additions and 28 deletions
|
|
@ -275,14 +275,14 @@ foreach ($logoPositions as $pos) {
|
|||
// questiontitlebackgroundcolor, questionbackgroundcolor; row 184 plan P3 adds
|
||||
// answerstextcolor; row 186 plan P4 adds questionhelpbackgroundcolor; row 191 plan
|
||||
// P6 adds the six per-button choosers; row 195 adds checkboxcolor; row 197 adds
|
||||
// questionhelpfontcolor + questionbordercolor) became mode
|
||||
// questionhelpfontcolor + questionbordercolor; row 221 adds sliderhandlecolor) became mode
|
||||
// dropdowns
|
||||
// (default|defaultbackgroundcolor|color1|color2|color3|other) with a <key>custom
|
||||
// colorpicker child. A legacy HEX value in the json means "custom color": map it
|
||||
// to mode "other" and move the hex into the <key>custom child, so the variant
|
||||
// default stays valid for the dropdown. A legacy mode "primary"/"secondary"
|
||||
// (old 4-way textcolor dropdown) maps to "color1"/"color2".
|
||||
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor', 'questionhelpbackgroundcolor', 'questionhelpfontcolor', 'questionbordercolor', 'checkboxcolor', 'previousbuttonbackgroundcolor', 'previousbuttontextcolor', 'nextbuttonbackgroundcolor', 'nextbuttontextcolor', 'submitbuttonbackgroundcolor', 'submitbuttontextcolor'];
|
||||
$colorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor', 'questionhelpbackgroundcolor', 'questionhelpfontcolor', 'questionbordercolor', 'checkboxcolor', 'sliderhandlecolor', 'previousbuttonbackgroundcolor', 'previousbuttontextcolor', 'nextbuttonbackgroundcolor', 'nextbuttontextcolor', 'submitbuttonbackgroundcolor', 'submitbuttontextcolor'];
|
||||
$colorChooserLegacyModes = ['primary' => 'color1', 'secondary' => 'color2'];
|
||||
foreach ($colorChooserKeys as $ck) {
|
||||
if (isset($definition['options'][$ck])
|
||||
|
|
|
|||
Loading…
Reference in a new issue