Fix gallery photo deletion gap and uncensor UI glitche.
This commit is contained in:
parent
ed28d4a9c4
commit
72e9344102
4 changed files with 26 additions and 2 deletions
|
|
@ -76,9 +76,15 @@ class lgAdmin {
|
|||
if (el) {
|
||||
el.dataset.isPublic = 'true';
|
||||
const img = el.querySelector('img');
|
||||
if (img) img.classList.remove('border-danger', 'border-5');
|
||||
if (img) img.classList.remove('border-danger', 'border-5', 'photo-private');
|
||||
}
|
||||
document.getElementById("lg-restore").style.display = 'none';
|
||||
const countSpan = document.getElementById('private-count');
|
||||
if (countSpan) {
|
||||
const newCount = parseInt(countSpan.textContent, 10) - 1;
|
||||
if (newCount <= 0) document.getElementById('private-count-line').remove();
|
||||
else countSpan.textContent = newCount;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -101,6 +107,7 @@ class lgAdmin {
|
|||
this.core.LGel.off('lgAfterSlide.adminRemove');
|
||||
const thumb = document.querySelector(`[data-slide-name='${photoId}']`);
|
||||
if (thumb) thumb.remove();
|
||||
if (typeof window.applyJustifiedLayout === 'function') window.applyJustifiedLayout();
|
||||
const lgId = this.core.lgId;
|
||||
const deletedItem = document.getElementById(`lg-item-${lgId}-${currentIndex}`);
|
||||
if (deletedItem) deletedItem.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue