This commit is contained in:
barisusakli
2015-09-16 08:35:40 -04:00
parent f80a6350c4
commit 11c70f3a28
6 changed files with 70 additions and 13 deletions

View File

@@ -94,9 +94,15 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'comp
function topicCommand(command, tid) {
translator.translate('[[topic:thread_tools.' + command + '_confirm]]', function(msg) {
bootbox.confirm(msg, function(confirm) {
if (confirm) {
socket.emit('topics.' + command, {tids: [tid], cid: ajaxify.data.cid});
if (!confirm) {
return;
}
socket.emit('topics.' + command, {tids: [tid], cid: ajaxify.data.cid}, function(err) {
if (err) {
app.alertError(err.message);
}
});
});
});
}