mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
feat: closes #9684, allow event deletion
fix: topic events appearing before necro messages feat: add move topic event feat: add ability to delete specific topic events via events.purge
This commit is contained in:
@@ -49,6 +49,17 @@ define('forum/topic/threadTools', [
|
||||
return false;
|
||||
});
|
||||
|
||||
topicContainer.on('click', '[component="topic/event/delete"]', function () {
|
||||
const eventId = $(this).attr('data-topic-event-id');
|
||||
const eventEl = $(this).parents('[component="topic/event"]');
|
||||
api.del(`/topics/${tid}/events/${eventId}`, {})
|
||||
.then(function () {
|
||||
eventEl.remove();
|
||||
})
|
||||
.catch(app.alertError);
|
||||
return false;
|
||||
});
|
||||
|
||||
// todo: should also use topicCommand, but no write api call exists for this yet
|
||||
topicContainer.on('click', '[component="topic/mark-unread"]', function () {
|
||||
socket.emit('topics.markUnread', tid, function (err) {
|
||||
|
||||
Reference in New Issue
Block a user