File tree 2 files changed +20
-6
lines changed
addons/website/static/src/snippets/s_dynamic_snippet_carousel
2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change
1
+ import { DynamicSnippetCarousel } from "@website/snippets/s_dynamic_snippet_carousel/dynamic_snippet_carousel" ;
2
+ import { registry } from "@web/core/registry" ;
3
+
4
+ const DynamicSnippetCarouselEdit = ( I ) =>
5
+ class extends I {
6
+ getConfigurationSnapshot ( ) {
7
+ let snapshot = super . getConfigurationSnapshot ( ) ;
8
+ if ( this . el . classList . contains ( "o_carousel_multi_items" ) ) {
9
+ snapshot = JSON . parse ( snapshot || "{}" ) ;
10
+ snapshot . multi_items = true ;
11
+ snapshot = JSON . stringify ( snapshot ) ;
12
+ }
13
+ return snapshot ;
14
+ }
15
+ } ;
16
+
17
+ registry . category ( "public.interactions.edit" ) . add ( "website.dynamic_snippet_carousel" , {
18
+ Interaction : DynamicSnippetCarousel ,
19
+ mixin : DynamicSnippetCarouselEdit ,
20
+ } ) ;
Original file line number Diff line number Diff line change @@ -28,9 +28,3 @@ export class DynamicSnippetCarousel extends DynamicSnippet {
28
28
registry
29
29
. category ( "public.interactions" )
30
30
. add ( "website.dynamic_snippet_carousel" , DynamicSnippetCarousel ) ;
31
-
32
- registry
33
- . category ( "public.interactions.edit" )
34
- . add ( "website.dynamic_snippet_carousel" , {
35
- Interaction : DynamicSnippetCarousel ,
36
- } ) ;
You can’t perform that action at this time.
0 commit comments