From 6c8f45a59b800adab6656fc38e8fe089f04d99e0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 10 Feb 2023 15:15:35 -0500 Subject: [PATCH] fix: remove old prepareEdit logic --- public/src/client/flags/detail.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/public/src/client/flags/detail.js b/public/src/client/flags/detail.js index 7a68afbe09..c8223c1bde 100644 --- a/public/src/client/flags/detail.js +++ b/public/src/client/flags/detail.js @@ -141,24 +141,6 @@ define('forum/flags/detail', [ postAction('restore', api.put, `/posts/${ajaxify.data.target.pid}/state`); break; - case 'prepare-edit': { - const selectedNoteEl = this.closest('[data-index]'); - const index = selectedNoteEl.getAttribute('data-index'); - const textareaEl = document.getElementById('note'); - textareaEl.value = ajaxify.data.notes[index].content; - textareaEl.setAttribute('data-datetime', ajaxify.data.notes[index].datetime); - - const siblings = selectedNoteEl.parentElement.children; - for (const el in siblings) { - if (siblings.hasOwnProperty(el)) { - siblings[el].classList.remove('editing'); - } - } - selectedNoteEl.classList.add('editing'); - textareaEl.focus(); - break; - } - case 'delete-flag': { bootbox.confirm('[[flags:delete-flag-confirm]]', function (ok) { if (ok) {