[IMP] website: show scroll button option only in case of fixed height
- Show "scroll down button" only when height is 100%. - Make the "scroll down button" a child of that "height" option. task-2471323 closes odoo/odoo#68825 Related: odoo/design-themes#18 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
committed by
qsm-odoo
parent
3603654006
commit
85ae7fe56e
@@ -2756,6 +2756,20 @@ options.registry.ScrollButton = options.Class.extend({
|
||||
// Options
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @see this.selectClass for parameters
|
||||
*/
|
||||
async showScrollButton(previewMode, widgetValue, params) {
|
||||
if (widgetValue) {
|
||||
this.$button.show();
|
||||
} else {
|
||||
if (previewMode) {
|
||||
this.$button.hide();
|
||||
} else {
|
||||
this.$button.detach();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Toggles the scroll down button.
|
||||
*/
|
||||
|
||||
@@ -1004,20 +1004,19 @@
|
||||
</we-button-group>
|
||||
</div>
|
||||
|
||||
<!-- Min height of section -->
|
||||
<div data-option-name="minHeight" data-selector="section" data-exclude="[data-snippet] .row > div *">
|
||||
<we-button-group string="Height">
|
||||
<we-button data-name="minheight_auto_opt" data-select-class="" title="Fit content">Auto</we-button>
|
||||
<we-button data-select-class="o_half_screen_height" title="Half screen">50%</we-button>
|
||||
<we-button data-select-class="o_full_screen_height" title="Full screen">100%</we-button>
|
||||
</we-button-group>
|
||||
</div>
|
||||
|
||||
<!-- Scroll to next section button (only for full height) -->
|
||||
<div data-js="ScrollButton" data-selector="section" data-exclude="[data-snippet] .row > div *">
|
||||
<we-checkbox string="Scroll down button"
|
||||
<!-- Min height of section -->
|
||||
<we-button-group string="Height" data-show-scroll-button="">
|
||||
<we-button data-name="minheight_auto_opt" data-select-class="" title="Fit content">Auto</we-button>
|
||||
<we-button data-select-class="o_half_screen_height" title="Half screen">50%</we-button>
|
||||
<we-button data-select-class="o_full_screen_height" title="Full screen" data-name="full_height_opt" data-show-scroll-button="true">100%</we-button>
|
||||
</we-button-group>
|
||||
|
||||
<we-checkbox string="⌙ Scroll down button"
|
||||
data-toggle-button="true"
|
||||
data-no-preview="true"
|
||||
data-dependencies="full_height_opt"
|
||||
data-name="scroll_button_opt"/>
|
||||
<!--   -->
|
||||
<we-row string=" ⌙ Colors">
|
||||
|
||||
Reference in New Issue
Block a user