@@ -16,7 +16,6 @@ class ImageGalleryOption extends Plugin {
16
16
builder_actions : this . getActions ( ) ,
17
17
system_classes : [ "o_empty_gallery_alert" ] ,
18
18
clean_for_save_handlers : this . cleanForSave . bind ( this ) ,
19
- normalize_handlers : this . updateAlertBanner . bind ( this ) ,
20
19
on_reorder_items_handlers : this . reorderGalleryItems . bind ( this ) ,
21
20
on_remove_handlers : this . onRemove . bind ( this ) ,
22
21
after_remove_handlers : this . afterRemove . bind ( this ) ,
@@ -70,20 +69,12 @@ class ImageGalleryOption extends Plugin {
70
69
}
71
70
72
71
cleanForSave ( { root } ) {
72
+ // TODO This should not be needed if interaction's lifecycle worked.
73
73
for ( const emptyGalleryAlert of root . querySelectorAll ( ".o_empty_gallery_alert" ) ) {
74
74
emptyGalleryAlert . remove ( ) ;
75
75
}
76
76
}
77
77
78
- updateAlertBanner ( ) {
79
- const imageGalleries = this . document . querySelectorAll ( ".s_image_gallery" ) ;
80
- for ( const imageGallery of imageGalleries ) {
81
- const container = this . getContainer ( imageGallery ) ;
82
- if ( ! container . querySelector ( "img" ) && ! container . querySelector ( ".alert" ) ) {
83
- this . insertEmptyGalleryAlert ( container ) ;
84
- }
85
- }
86
- }
87
78
reorderGalleryItems ( { elementToReorder, position, optionName } ) {
88
79
if ( optionName === "GalleryImageList" ) {
89
80
const editingGalleryElement = elementToReorder . closest ( ".s_image_gallery" ) ;
0 commit comments