mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
@@ -91,7 +91,9 @@
|
|||||||
"thread_tools.merge_topics": "Merge Topics",
|
"thread_tools.merge_topics": "Merge Topics",
|
||||||
"thread_tools.merge": "Merge",
|
"thread_tools.merge": "Merge",
|
||||||
|
|
||||||
"topic_move_success": "This topic will be moved shortly. Click here to undo.",
|
"topic_move_success": "This topic will be moved to \"%1\" shortly. Click here to undo.",
|
||||||
|
"topic_move_multiple_success": "These topics will be moved to \"%1\" shortly. Click here to undo.",
|
||||||
|
"topic_move_all_success": "All topics will be moved to \"%1\" shortly. Click here to undo.",
|
||||||
"topic_move_undone": "Topic move undone",
|
"topic_move_undone": "Topic move undone",
|
||||||
"topic_move_posts_success": "Posts will be moved shortly. Click here to undo.",
|
"topic_move_posts_success": "Posts will be moved shortly. Click here to undo.",
|
||||||
"topic_move_posts_undone": "Post move undone",
|
"topic_move_posts_undone": "Post move undone",
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ define('forum/topic/move', ['categorySelector', 'alerts'], function (categorySel
|
|||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
|
|
||||||
parseModal(categories, function () {
|
app.parseAndTranslate('partials/move_thread_modal', {
|
||||||
|
categories: categories,
|
||||||
|
}, function (html) {
|
||||||
|
modal = $(html);
|
||||||
modal.on('hidden.bs.modal', function () {
|
modal.on('hidden.bs.modal', function () {
|
||||||
modal.remove();
|
modal.remove();
|
||||||
});
|
});
|
||||||
@@ -39,14 +42,6 @@ define('forum/topic/move', ['categorySelector', 'alerts'], function (categorySel
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseModal(categories, callback) {
|
|
||||||
app.parseAndTranslate('partials/move_thread_modal', { categories: categories }, function (html) {
|
|
||||||
modal = $(html);
|
|
||||||
|
|
||||||
callback();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function onCategorySelected(category) {
|
function onCategorySelected(category) {
|
||||||
selectedCategory = category;
|
selectedCategory = category;
|
||||||
modal.find('#move_thread_commit').prop('disabled', false);
|
modal.find('#move_thread_commit').prop('disabled', false);
|
||||||
@@ -59,11 +54,16 @@ define('forum/topic/move', ['categorySelector', 'alerts'], function (categorySel
|
|||||||
commitEl.prop('disabled', true);
|
commitEl.prop('disabled', true);
|
||||||
|
|
||||||
modal.modal('hide');
|
modal.modal('hide');
|
||||||
|
var message = '[[topic:topic_move_success, ' + selectedCategory.name + ']]';
|
||||||
|
if (Move.tids && Move.tids.length > 1) {
|
||||||
|
message = '[[topic:topic_move_multiple_success, ' + selectedCategory.name + ']]';
|
||||||
|
} else if (!Move.tids) {
|
||||||
|
message = '[[topic:topic_move_all_success, ' + selectedCategory.name + ']]';
|
||||||
|
}
|
||||||
alerts.alert({
|
alerts.alert({
|
||||||
alert_id: 'tids_move_' + Move.tids.join('-'),
|
alert_id: 'tids_move_' + (Move.tids ? Move.tids.join('-') : 'all'),
|
||||||
title: '[[topic:thread_tools.move]]',
|
title: '[[topic:thread_tools.move]]',
|
||||||
message: '[[topic:topic_move_success, ' + selectedCategory.name + ']]',
|
message: message,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
timeout: 10000,
|
timeout: 10000,
|
||||||
timeoutfn: function () {
|
timeoutfn: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user