Skip to content

Node.js based forum software built for the modern web

dont deselect on delete/purge closes #2352

barisusakli467fb1ab4a72
diff --git a/public/src/client/categoryTools.js b/public/src/client/categoryTools.js
index f200878540..c86df676f3 100644
--- a/public/src/client/categoryTools.js
+++ b/public/src/client/categoryTools.js
@@ -20,8 +20,7 @@ define('forum/categoryTools', ['forum/topic/move', 'topicSelect'], function(move
});
$('.purge_thread').on('click', function() {
- var tids = topicSelect.getSelectedTids();
- categoryCommand('purge', tids);
+ categoryCommand('purge', topicSelect.getSelectedTids());
return false;
});
@@ -94,7 +93,7 @@ define('forum/categoryTools', ['forum/topic/move', 'topicSelect'], function(move
return;
}
- socket.emit('topics.' + command, {tids: tids, cid: CategoryTools.cid}, onCommandComplete);
+ socket.emit('topics.' + command, {tids: tids, cid: CategoryTools.cid}, onDeletePurgeComplete);
});
});
}
@@ -122,6 +121,13 @@ define('forum/categoryTools', ['forum/topic/move', 'topicSelect'], function(move
topicSelect.unselectAll();
}
+ function onDeletePurgeComplete(err) {
+ if (err) {
+ return app.alertError(err.message);
+ }
+ closeDropDown();
+ }
+
function onTopicSelect() {
var tids = topicSelect.getSelectedTids();
var isAnyDeleted = isAny(isTopicDeleted, tids);