From 9dc40279fa9cd5d49893c499772c3059b7af1079 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 9 Mar 2022 17:33:05 +0100 Subject: [PATCH] close gallery on action --- photologue/static/lightgallery/plugins/admin/lg-admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/photologue/static/lightgallery/plugins/admin/lg-admin.js b/photologue/static/lightgallery/plugins/admin/lg-admin.js index 4092ee4..0a5bff5 100644 --- a/photologue/static/lightgallery/plugins/admin/lg-admin.js +++ b/photologue/static/lightgallery/plugins/admin/lg-admin.js @@ -58,7 +58,7 @@ class lgAdmin { // Remove HTML element document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0].remove() - this.core.goToNextSlide(); + this.core.closeGallery(); this.core.refresh(); }); } @@ -83,7 +83,7 @@ class lgAdmin { const thumbnail = document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0]; if (!this.isStaff) { thumbnail.remove() - this.core.goToNextSlide(); + this.core.closeGallery(); this.core.refresh(); } else { location.reload();