dont deselect on delete/purge closes #2352

This commit is contained in:
barisusakli
2014-11-07 18:48:53 -05:00
parent 93f414892b
commit 467fb1ab4a

View File

@@ -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);