feat(options): row 197 — help/border font color choosers, box-only radii, aligned chooser columns, 'Font color for ...' labels
- questionhelpfontcolor + questionbordercolor are now 6-way color choosers (+custom children), both default mode 'default' (Default font color); resolved via cmm.cm() in custom_header.twig (legacy hex passthrough) - border radii show only for questionborder=box (per-key show-values in options.twig aShowIfValuesByKey); options.js cascades hiding to nested conditional wrappers (questionbordercolorcustom); radii stay two subcolumns (border-start on TR/BR) - chooser columns aligned with the font color: title section = one column (title-0: font, font color, size/options, legacy picker, title bg, body bg), answers-0 += checkbox chooser, help-0 = font + font color + bg chooser, help-1 = text position - all font-color labels follow 'Font color for ...' / 'Custom font color for ...' (21 labels renamed, incl. 'Font color for question titles' and 'Font color for answers and subquestions') - chooser key lists synced in options.twig/options.js/build.php (+2) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
c2930a938a
commit
8370a945d5
1 changed files with 113 additions and 64 deletions
|
|
@ -37,9 +37,9 @@ var ThemeOptions = function () {
|
|||
// row 184 / plan P3: answerstextcolor as well; row 186 / plan P4:
|
||||
// questionhelpbackgroundcolor as well; row 191 / plan P6: the six per-button
|
||||
// choosers (previous/next/submit button background + text color); row 195:
|
||||
// checkboxcolor as well.
|
||||
// checkboxcolor as well; row 197: questionhelpfontcolor + questionbordercolor.
|
||||
// Must stay in sync with aColorChooserKeys in options/options.twig.
|
||||
var aColorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor', 'questionhelpbackgroundcolor', 'checkboxcolor', 'previousbuttonbackgroundcolor', 'previousbuttontextcolor', 'nextbuttonbackgroundcolor', 'nextbuttontextcolor', 'submitbuttonbackgroundcolor', 'submitbuttontextcolor'];
|
||||
var aColorChooserKeys = ['navbarfontcolor', 'headerbackgroundcolor', 'progressbarcolor', 'progressbarbackgroundcolor', 'progressbarfontcolor', 'bodybackgroundcolor', 'grouptitletextcolor', 'groupdescriptiontextcolor', 'questiontitletextcolor', 'questiontitlebackgroundcolor', 'questionbackgroundcolor', 'answerstextcolor', 'questionhelpbackgroundcolor', 'questionhelpfontcolor', 'questionbordercolor', 'checkboxcolor', 'previousbuttonbackgroundcolor', 'previousbuttontextcolor', 'nextbuttonbackgroundcolor', 'nextbuttontextcolor', 'submitbuttonbackgroundcolor', 'submitbuttontextcolor'];
|
||||
// the 5 presets, in the SAME order as the dropdown options in config.xml
|
||||
// (object key order = swatch chip order) — row 125: "Default background color"
|
||||
// is the SECOND choice, right after "Default font color".
|
||||
|
|
@ -417,6 +417,17 @@ var ThemeOptions = function () {
|
|||
const updateVisibilityByParent = function() {
|
||||
$('.option-visibility[data-show-if-parent]').each(function (i, wrapperEl) {
|
||||
const parentName = $(wrapperEl).data('show-if-parent');
|
||||
// row 197: cascade — when the parent field itself sits inside a hidden
|
||||
// .option-visibility wrapper (nested conditional, e.g. questionbordercolorcustom
|
||||
// whose parent questionbordercolor is a child of questionborder=none), this
|
||||
// wrapper must hide as well, regardless of its own show-if-mode
|
||||
const anyParent0 = $('input[name="' + parentName + '"]');
|
||||
const anyParent1 = $('select[name="' + parentName + '"]');
|
||||
const anyParent = anyParent0.length ? anyParent0 : anyParent1;
|
||||
if (anyParent.length) {
|
||||
const pw = anyParent.first().closest('.option-visibility');
|
||||
if (pw.length && pw.hasClass('d-none')) { $(wrapperEl).addClass('d-none'); return; }
|
||||
}
|
||||
// THEME ADDITION (row 115, navbarfontcolor working example): parents with
|
||||
// data-show-if-mode="disable" never hide their children — the wrapper stays
|
||||
// visible and only the child control is disabled (updateChild/updateAllChildren).
|
||||
|
|
|
|||
Loading…
Reference in a new issue