Node.js based forum software built for the modern web
Fixes flag note editing, deletion, and template update (#9581)
Matsc448ba6f5a31
diff --git a/public/src/client/flags/detail.js b/public/src/client/flags/detail.jsindex df2a3a89b1..9760fc8791 100644--- a/public/src/client/flags/detail.js+++ b/public/src/client/flags/detail.js@@ -35,7 +35,7 @@ define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'bsocket.emit('flags.appendNote', {flagId: ajaxify.data.flagId,note: noteEl.value,- datetime: noteEl.getAttribute('data-datetime'),+ datetime: parseInt(noteEl.getAttribute('data-datetime'), 10),}, function (err, payload) {if (err) {return app.alertError(err.message);@@ -44,7 +44,6 @@ define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'bDetail.reloadNotes(payload.notes);Detail.reloadHistory(payload.history);- noteEl.setAttribute('data-action', 'appendNote');noteEl.removeAttribute('data-datetime');});break;@@ -82,7 +81,7 @@ define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'bbreak;case 'delete-note':- var datetime = this.closest('[data-datetime]').getAttribute('data-datetime');+ var datetime = parseInt(this.closest('[data-datetime]').getAttribute('data-datetime'), 10);bootbox.confirm('[[flags:delete-note-confirm]]', function (ok) {if (ok) {socket.emit('flags.deleteNote', {@@ -144,9 +143,9 @@ define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'bDetail.reloadNotes = function (notes) {ajaxify.data.notes = notes;- Benchpress.render('flags/detail', 'notes', {+ Benchpress.render('flags/detail', {notes: notes,- }).then(function (html) {+ }, 'notes').then(function (html) {var wrapperEl = components.get('flag/notes');wrapperEl.empty();wrapperEl.html(html);