mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
closes #2086
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
"topic_will_be_moved_to": "This topic will be moved to the category",
|
||||
"fork_topic_instruction": "Click the posts you want to fork",
|
||||
"fork_no_pids": "No posts selected!",
|
||||
"fork_success": "Succesfully forked topic!",
|
||||
"fork_success": "Succesfully forked topic! Click here to go to the forked topic.",
|
||||
|
||||
"composer.title_placeholder": "Enter your topic title here...",
|
||||
"composer.discard": "Discard",
|
||||
|
||||
@@ -42,18 +42,26 @@ define('forum/topic/fork', function() {
|
||||
socket.emit('topics.createTopicFromPosts', {
|
||||
title: forkModal.find('#fork-title').val(),
|
||||
pids: pids
|
||||
}, function(err) {
|
||||
}, function(err, newTopic) {
|
||||
function fadeOutAndRemove(pid) {
|
||||
$('#post-container li[data-pid="' + pid + '"]').fadeOut(500, function() {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
|
||||
if(err) {
|
||||
if (err) {
|
||||
return app.alertError(err.message);
|
||||
}
|
||||
|
||||
app.alertSuccess('[[topic:fork_success]]');
|
||||
app.alert({
|
||||
timeout: 5000,
|
||||
title: '[[global:alert.success]]',
|
||||
message: '[[topic:fork_success]]',
|
||||
type: 'success',
|
||||
clickfn: function() {
|
||||
ajaxify.go('topic/' + newTopic.slug);
|
||||
}
|
||||
});
|
||||
|
||||
for(var i=0; i<pids.length; ++i) {
|
||||
fadeOutAndRemove(pids[i]);
|
||||
|
||||
Reference in New Issue
Block a user