feat(options): rename Images tab to "Page background" after Top of the page; new "Groups" tab
Tab order is now: Default fonts and colors > Top of the page > Page background (the config.xml "Images" category, tab id kept as category-images so the stored tab preference stays valid) > Groups > Simple options > Questions. The new "Groups" tab (id "groups") contains all ten group-related options that lived in the Questions tab: grouptitlefont, grouptitletextcolor(+custom), groupdescriptionfont, groupdescriptiontextcolor(+custom), grouptitlefontsize, grouptitlefontweight, groupdescriptionfontsize, groupdescriptionfontweight. They are excluded from the Questions pane; values are stored per option key, so no theme reset is needed and stored values are untouched. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
c6bc8f1451
commit
11a617a29b
1 changed files with 37 additions and 7 deletions
|
|
@ -13,7 +13,9 @@
|
||||||
dropdown plus "Same as base font"; see the branch below.)
|
dropdown plus "Same as base font"; see the branch below.)
|
||||||
|
|
||||||
Tab order: the "Fonts" category tab is FIRST (default font + per-element font
|
Tab order: the "Fonts" category tab is FIRST (default font + per-element font
|
||||||
overrides), then the "Top of the page" tab, then the other categories.
|
overrides), then the "Top of the page" tab, then the "Page background" tab (the
|
||||||
|
config.xml "Images" category), then the "Groups" tab (all group-related options
|
||||||
|
of the "Questions" category), then the other remaining categories.
|
||||||
|
|
||||||
Exception: the options that make up the TOP OF THE PAGE (header menu, logos,
|
Exception: the options that make up the TOP OF THE PAGE (header menu, logos,
|
||||||
header colors, progress bar) are pulled out of their config.xml categories
|
header colors, progress bar) are pulled out of their config.xml categories
|
||||||
|
|
@ -280,19 +282,44 @@
|
||||||
{% set aQuestionsCol2 = ['questionborder', 'questionbordercolor', 'questionborderstyle', 'questiondropdown', 'questionborderradiusTL', 'questionborderradiusTR', 'questionborderradiusBL', 'questionborderradiusBR'] %}
|
{% set aQuestionsCol2 = ['questionborder', 'questionbordercolor', 'questionborderstyle', 'questiondropdown', 'questionborderradiusTL', 'questionborderradiusTR', 'questionborderradiusBL', 'questionborderradiusBR'] %}
|
||||||
{% set aQuestionsCol3 = ['checkboxcolor'] %}
|
{% set aQuestionsCol3 = ['checkboxcolor'] %}
|
||||||
|
|
||||||
|
{# row 147: all group-related options of the "Questions" category — they are
|
||||||
|
pulled out of the Questions tab into a dedicated "Groups" tab (aGroupsTab below).
|
||||||
|
Values are stored per option key, so moving them does not change stored values. #}
|
||||||
|
{% set aGroupKeys = [
|
||||||
|
'grouptitlefont', 'grouptitletextcolor', 'grouptitletextcolorcustom',
|
||||||
|
'groupdescriptionfont', 'groupdescriptiontextcolor', 'groupdescriptiontextcolorcustom',
|
||||||
|
'grouptitlefontsize', 'grouptitlefontweight',
|
||||||
|
'groupdescriptionfontsize', 'groupdescriptionfontweight'
|
||||||
|
] %}
|
||||||
|
|
||||||
{# Tab list: FIRST the "Fonts" tab (where the default/base font is chosen and the
|
{# Tab list: FIRST the "Fonts" tab (where the default/base font is chosen and the
|
||||||
per-element font overrides live), then the "Top of the page" tab (keys =
|
per-element font overrides live), then the "Top of the page" tab (keys =
|
||||||
aTopOfPageKeys), then one tab per remaining category from config.xml like the
|
aTopOfPageKeys), then row 147: the "Page background" tab (the config.xml "Images"
|
||||||
core options page (keys = null: all options of that category, except the
|
category, id kept as 'category-images' so the stored tab preference stays valid),
|
||||||
top-of-page keys). Category tab ids are slugs of the category name, so they
|
then the "Groups" tab (keys = aGroupKeys), then one tab per remaining category
|
||||||
stay stable regardless of the tab order. #}
|
from config.xml like the core options page (keys = null: all options of that
|
||||||
|
category, except the top-of-page and group keys). #}
|
||||||
{% set aTabs = [] %}
|
{% set aTabs = [] %}
|
||||||
{% if 'Fonts' in aOptionAttributes.categories %}
|
{% if 'Fonts' in aOptionAttributes.categories %}
|
||||||
{% set aTabs = [{ 'id': 'category-fonts', 'label': 'Default fonts and colors', 'category': 'Fonts', 'keys': null }] %}
|
{% set aTabs = [{ 'id': 'category-fonts', 'label': 'Default fonts and colors', 'category': 'Fonts', 'keys': null }] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% set aTabs = aTabs|merge([{ 'id': 'top-of-page', 'label': 'Top of the page', 'category': 'Top of the page', 'keys': aTopOfPageKeys }]) %}
|
{% set aTabs = aTabs|merge([{ 'id': 'top-of-page', 'label': 'Top of the page', 'category': 'Top of the page', 'keys': aTopOfPageKeys }]) %}
|
||||||
|
{# row 147: "Images" category -> "Page background" tab, directly after Top of the page #}
|
||||||
|
{% set aImagesKeys = [] %}
|
||||||
|
{% for key, attr in aOptionAttributes.optionAttributes %}
|
||||||
|
{% if key != 'ajaxmode' and attr.category == 'Images' and key not in aTopOfPageKeys %}
|
||||||
|
{% set aImagesKeys = aImagesKeys|merge([key]) %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if aImagesKeys is not empty %}
|
||||||
|
{% set aTabs = aTabs|merge([{ 'id': 'category-images', 'label': 'Page background', 'category': 'Images', 'keys': null }]) %}
|
||||||
|
{% endif %}
|
||||||
|
{# row 147: dedicated "Groups" tab with all group-related options (aGroupKeys).
|
||||||
|
category 'Groups' (no config.xml category of that name) so the pane renders the
|
||||||
|
normal width-based grid instead of the Questions 3-column layout. #}
|
||||||
|
{% set aTabs = aTabs|merge([{ 'id': 'groups', 'label': 'Groups', 'category': 'Groups', 'keys': aGroupKeys }]) %}
|
||||||
{% for category in aOptionAttributes.categories %}
|
{% for category in aOptionAttributes.categories %}
|
||||||
{% if category != 'Fonts' and category != 'Top of the page' and category != 'Colors' %}
|
{% if category != 'Fonts' and category != 'Top of the page' and category != 'Colors' and category != 'Images' %}
|
||||||
{# The "Colors" tab is removed on purpose. Its only remaining options are
|
{# The "Colors" tab is removed on purpose. Its only remaining options are
|
||||||
sliderhandlecolor and privacybackgroundcolor (the other Colors keys are
|
sliderhandlecolor and privacybackgroundcolor (the other Colors keys are
|
||||||
pulled into "Top of the page" via aTopOfPageKeys) — TODO: place these two
|
pulled into "Top of the page" via aTopOfPageKeys) — TODO: place these two
|
||||||
|
|
@ -331,18 +358,21 @@
|
||||||
{% if aTabKeys is null %}
|
{% if aTabKeys is null %}
|
||||||
{% set aTabKeys = [] %}
|
{% set aTabKeys = [] %}
|
||||||
{% for key, attr in aOptionAttributes.optionAttributes %}
|
{% for key, attr in aOptionAttributes.optionAttributes %}
|
||||||
{% if key != 'ajaxmode' and attr.category == tab.category and key not in aTopOfPageKeys %}
|
{# row 147: group keys are excluded here — they live in the "Groups" tab #}
|
||||||
|
{% if key != 'ajaxmode' and attr.category == tab.category and key not in aTopOfPageKeys and key not in aGroupKeys %}
|
||||||
{% set aTabKeys = aTabKeys|merge([key]) %}
|
{% set aTabKeys = aTabKeys|merge([key]) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{# the top-of-page tab also picks up options that literally carry the
|
{# the top-of-page tab also picks up options that literally carry the
|
||||||
category "Top of the page" (so config.xml may use it after a reset) #}
|
category "Top of the page" (so config.xml may use it after a reset) #}
|
||||||
|
{% if tab.id == 'top-of-page' %}
|
||||||
{% for key, attr in aOptionAttributes.optionAttributes %}
|
{% for key, attr in aOptionAttributes.optionAttributes %}
|
||||||
{% if key != 'ajaxmode' and attr.category == 'Top of the page' and key not in aTabKeys %}
|
{% if key != 'ajaxmode' and attr.category == 'Top of the page' and key not in aTabKeys %}
|
||||||
{% set aTabKeys = aTabKeys|merge([key]) %}
|
{% set aTabKeys = aTabKeys|merge([key]) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div role="tabpanel" class="CoreThemeOptions--settingsTab tab-pane {% if loop.first %}active{% endif %}"
|
<div role="tabpanel" class="CoreThemeOptions--settingsTab tab-pane {% if loop.first %}active{% endif %}"
|
||||||
id="{{ tab.id }}" aria-labelledby="tab-{{ tab.id }}">
|
id="{{ tab.id }}" aria-labelledby="tab-{{ tab.id }}">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue