dont deselect on delete/purge closes #2352

v1.18.x
barisusakli 10 years ago
parent 93f414892b
commit 467fb1ab4a

@ -20,8 +20,7 @@ define('forum/categoryTools', ['forum/topic/move', 'topicSelect'], function(move
}); });
$('.purge_thread').on('click', function() { $('.purge_thread').on('click', function() {
var tids = topicSelect.getSelectedTids(); categoryCommand('purge', topicSelect.getSelectedTids());
categoryCommand('purge', tids);
return false; return false;
}); });
@ -94,7 +93,7 @@ define('forum/categoryTools', ['forum/topic/move', 'topicSelect'], function(move
return; 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(); topicSelect.unselectAll();
} }
function onDeletePurgeComplete(err) {
if (err) {
return app.alertError(err.message);
}
closeDropDown();
}
function onTopicSelect() { function onTopicSelect() {
var tids = topicSelect.getSelectedTids(); var tids = topicSelect.getSelectedTids();
var isAnyDeleted = isAny(isTopicDeleted, tids); var isAnyDeleted = isAny(isTopicDeleted, tids);

Loading…
Cancel
Save