close gallery on action

This commit is contained in:
Alexandre Iooss 2022-03-09 17:33:05 +01:00
parent b2c3ec5d3f
commit 9dc40279fa

View file

@ -58,7 +58,7 @@ class lgAdmin {
// Remove HTML element // Remove HTML element
document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0].remove() document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0].remove()
this.core.goToNextSlide(); this.core.closeGallery();
this.core.refresh(); this.core.refresh();
}); });
} }
@ -83,7 +83,7 @@ class lgAdmin {
const thumbnail = document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0]; const thumbnail = document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0];
if (!this.isStaff) { if (!this.isStaff) {
thumbnail.remove() thumbnail.remove()
this.core.goToNextSlide(); this.core.closeGallery();
this.core.refresh(); this.core.refresh();
} else { } else {
location.reload(); location.reload();