From a76b240ed8a7f994df20554074d9823d40afeb3c Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Fri, 29 Dec 2023 07:43:26 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E2=80=94=20update=20gallery,=20?= =?UTF-8?q?zip=20and=20random=20URLs=20when=20closing=20image=20dialog=20b?= =?UTF-8?q?ox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG | 1 + themes/default/templates/partial/lutim.js.ep | 8 +++++++- themes/korrigan/templates/partial/korrigan.js.ep | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 896d67e..9aa0936 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Revision history for Lutim - ⬆️ UUpdate jQuery - 💥 BREAKING CHANGE: no more twitter cards - 🎨 — Use template literals in js + - 🐛 — Gallery, zip and random URLs are now updated when closing image dialog box 0.15.0 2023-12-19 - ✨ — Add --nuke option to image command diff --git a/themes/default/templates/partial/lutim.js.ep b/themes/default/templates/partial/lutim.js.ep index 4488845..b614e4e 100644 --- a/themes/default/templates/partial/lutim.js.ep +++ b/themes/default/templates/partial/lutim.js.ep @@ -49,7 +49,7 @@ function buildMessage(success, msg) { ` : ''; return `
- +
${thumb}

@@ -208,6 +208,12 @@ function bindddz(firstview, deleteday) {

`); } $('.messages').append(buildMessage(data.success, data.msg)); + $(`#close-${data.msg.real_short}`).on('click', function(e) { + e.preventDefault(); + rmFromShortHash(`${data.msg.short}.${data.msg.ext}`); + rmFromZipHash(data.msg.short); + rmFromRandomHash(data.msg.short); + }); $(`#del-${data.msg.real_short}`).on('click', function(e) { e.preventDefault(); rmFromShortHash(`${data.msg.short}.${data.msg.ext}`); diff --git a/themes/korrigan/templates/partial/korrigan.js.ep b/themes/korrigan/templates/partial/korrigan.js.ep index 41625da..0d3a0fb 100644 --- a/themes/korrigan/templates/partial/korrigan.js.ep +++ b/themes/korrigan/templates/partial/korrigan.js.ep @@ -8,7 +8,7 @@ function buildMessage(success, msg) {
` : ''; return `
- +
${thumb}