Skip to content

Commit 857d0e5

Browse files
committed
Merge branch 'MAGETWO-92821-slider-forms-update-true' into cms-team-1-delivery
2 parents a0514a5 + 46c6f75 commit 857d0e5

File tree

6 files changed

+36
-30
lines changed

6 files changed

+36
-30
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Data/SliderData.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
<data key="name">Autoplay</data>
1414
<data key="section">settings</data>
1515
<data key="fieldName">autoplay</data>
16-
<data key="value">0</data>
16+
<data key="value">false</data>
1717
</entity>
1818
<entity name="PageBuilderSliderAutoplayOnProperty" type="pagebuilder_slider_property">
1919
<data key="name">Autoplay</data>
2020
<data key="section">settings</data>
2121
<data key="fieldName">autoplay</data>
22-
<data key="value">1</data>
22+
<data key="value">true</data>
2323
</entity>
2424
<!-- Autoplay Speed -->
2525
<entity name="PageBuilderSliderAutoplaySpeed5000Property" type="pagebuilder_slider_property">
@@ -33,28 +33,34 @@
3333
<data key="name">Fade</data>
3434
<data key="section">settings</data>
3535
<data key="fieldName">fade</data>
36-
<data key="value">1</data>
36+
<data key="value">true</data>
3737
</entity>
3838
<!-- Infinite Loop -->
3939
<entity name="PageBuilderSliderIsInfiniteProperty" type="pagebuilder_slider_property">
4040
<data key="name">Is Infinite</data>
4141
<data key="section">settings</data>
4242
<data key="fieldName">is_infinite</data>
43-
<data key="value">1</data>
43+
<data key="value">true</data>
4444
</entity>
4545
<!-- Show Arrows -->
4646
<entity name="PageBuilderSliderShowArrowsYesProperty" type="pagebuilder_slider_property">
4747
<data key="name">Show Arrows</data>
4848
<data key="section">settings</data>
4949
<data key="fieldName">show_arrows</data>
50-
<data key="value">1</data>
50+
<data key="value">true</data>
5151
</entity>
5252
<!-- Show Dots -->
5353
<entity name="PageBuilderSliderShowDotsNoProperty" type="pagebuilder_slider_property">
5454
<data key="name">Show dots</data>
5555
<data key="section">settings</data>
5656
<data key="fieldName">show_dots</data>
57-
<data key="value">0</data>
57+
<data key="value">false</data>
58+
</entity>
59+
<entity name="PageBuilderSliderShowDotsYesProperty" type="pagebuilder_slider_property">
60+
<data key="name">Show dots</data>
61+
<data key="section">settings</data>
62+
<data key="fieldName">show_dots</data>
63+
<data key="value">true</data>
5864
</entity>
5965
<!-- Minimum Height -->
6066
<entity name="PageBuilderSliderMinHeightDefault300Property" type="pagebuilder_slider_property">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderSlideCommonTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
<seeElement selector="{{SliderOnFrontend.Fade(PageBuilderSliderFadeYesProperty.value)}}" stepKey="seeSliderFadeSetting"/>
195195
<seeElement selector="{{SliderOnFrontend.IsInfinite(PageBuilderSliderIsInfiniteProperty.value)}}" stepKey="seeSliderIsInfiniteSetting"/>
196196
<seeElement selector="{{SliderOnFrontend.ShowArrows(PageBuilderSliderShowArrowsYesProperty.value)}}" stepKey="seeSliderShowArrowsSetting"/>
197-
<seeElement selector="{{SliderOnFrontend.ShowDots(PageBuilderSliderShowDotsNoProperty.value)}}" stepKey="seeSliderShowDotsOffOnFrontendSetting"/>
197+
<seeElement selector="{{SliderOnFrontend.ShowDots(PageBuilderSliderShowDotsYesProperty.value)}}" stepKey="seeSliderShowDotsOffOnFrontendSetting"/>
198198
<seeElement selector="{{SliderOnFrontend.sliderBorder(PageBuilderAdvancedBorderWidthProperty10.value, PageBuilderAdvancedBorderPropertyDotted.value, PageBuilderAdvancedBorderColorProperty_green.rbg)}}" stepKey="verifyBorderStyleOnStorefront"/>
199199
<seeElement selector="{{SliderOnFrontend.sliderMinHeight(PageBuilderSliderMinHeight500Property.value)}}" stepKey="verifyMinHeightOnFrontEnd"/>
200200
<seeElement selector="{{SliderOnFrontend.sliderMarginPaddings(PageBuilderAdvancedMarginsAndPaddingProperty.marginTop, PageBuilderAdvancedMarginsAndPaddingProperty.paddingTop)}}" stepKey="verifySliderMarginPaddingOnFrontEnd"/>

app/code/Magento/PageBuilder/view/adminhtml/ui_component/pagebuilder_slider_form.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@
9090
<checkbox>
9191
<settings>
9292
<valueMap>
93-
<map name="false" xsi:type="number">0</map>
94-
<map name="true" xsi:type="number">1</map>
93+
<map name="false" xsi:type="string">false</map>
94+
<map name="true" xsi:type="string">true</map>
9595
</valueMap>
9696
<prefer>toggle</prefer>
9797
</settings>
@@ -129,8 +129,8 @@
129129
<checkbox>
130130
<settings>
131131
<valueMap>
132-
<map name="false" xsi:type="number">0</map>
133-
<map name="true" xsi:type="number">1</map>
132+
<map name="false" xsi:type="string">false</map>
133+
<map name="true" xsi:type="string">true</map>
134134
</valueMap>
135135
<prefer>toggle</prefer>
136136
</settings>
@@ -151,8 +151,8 @@
151151
<checkbox>
152152
<settings>
153153
<valueMap>
154-
<map name="false" xsi:type="number">0</map>
155-
<map name="true" xsi:type="number">1</map>
154+
<map name="false" xsi:type="string">false</map>
155+
<map name="true" xsi:type="string">true</map>
156156
</valueMap>
157157
<prefer>toggle</prefer>
158158
</settings>
@@ -173,8 +173,8 @@
173173
<checkbox>
174174
<settings>
175175
<valueMap>
176-
<map name="false" xsi:type="number">0</map>
177-
<map name="true" xsi:type="number">1</map>
176+
<map name="false" xsi:type="string">false</map>
177+
<map name="true" xsi:type="string">true</map>
178178
</valueMap>
179179
<prefer>toggle</prefer>
180180
</settings>
@@ -195,8 +195,8 @@
195195
<checkbox>
196196
<settings>
197197
<valueMap>
198-
<map name="false" xsi:type="number">0</map>
199-
<map name="true" xsi:type="number">1</map>
198+
<map name="false" xsi:type="string">false</map>
199+
<map name="true" xsi:type="string">true</map>
200200
</valueMap>
201201
<prefer>toggle</prefer>
202202
</settings>

app/code/Magento/PageBuilder/view/adminhtml/web/js/content-type/slider/preview.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/code/Magento/PageBuilder/view/adminhtml/web/ts/js/content-type/slider/preview.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,12 @@ export default class Preview extends PreviewCollection {
350350
private buildSlickConfig() {
351351
const data = this.parent.dataStore.get();
352352
return {
353-
arrows: data.show_arrows === "1",
354-
autoplay: data.autoplay === "1",
353+
arrows: data.show_arrows === "true",
354+
autoplay: data.autoplay === "true",
355355
autoplaySpeed: data.autoplay_speed,
356356
dots: false, // We have our own dots implemented
357-
fade: data.fade === "1",
358-
infinite: data.is_infinite === "1",
357+
fade: data.fade === "true",
358+
infinite: data.is_infinite === "true",
359359
waitForAnimate: false,
360360
};
361361
}

app/code/Magento/PageBuilder/view/frontend/web/js/default.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ requirejs([
7575
}
7676

7777
$(element).slick({
78-
autoplay: $(element).data('autoplay') === 1,
78+
autoplay: $(element).data('autoplay'),
7979
autoplaySpeed: $(element).data('autoplay-speed') || 0,
80-
fade: $(element).data('fade') === 1,
81-
infinite: $(element).data('is-infinite') === 1,
82-
arrows: $(element).data('show-arrows') === 1,
83-
dots: $(element).data('show-dots') === 1
80+
fade: $(element).data('fade'),
81+
infinite: $(element).data('is-infinite'),
82+
arrows: $(element).data('show-arrows'),
83+
dots: $(element).data('show-dots')
8484
});
8585
}
8686
});

0 commit comments

Comments
 (0)