diff --git a/install/package.json b/install/package.json index 1787833057..1fadb0fc7c 100644 --- a/install/package.json +++ b/install/package.json @@ -103,10 +103,10 @@ "nodebb-plugin-ntfy": "1.7.4", "nodebb-plugin-spam-be-gone": "2.2.2", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "1.2.49", + "nodebb-theme-harmony": "1.2.50", "nodebb-theme-lavender": "7.1.8", "nodebb-theme-peace": "2.2.4", - "nodebb-theme-persona": "13.3.14", + "nodebb-theme-persona": "13.3.15", "nodebb-widget-essentials": "7.0.15", "nodemailer": "6.9.13", "nprogress": "0.2.0", diff --git a/public/src/client/topic/merge.js b/public/src/client/topic/merge.js index 1dce760c1b..a2d1131365 100644 --- a/public/src/client/topic/merge.js +++ b/public/src/client/topic/merge.js @@ -38,10 +38,22 @@ define('forum/topic/merge', ['search', 'alerts', 'api'], function (search, alert searchOptions: { in: 'titles', }, + dropdown: { + maxWidth: '400px', + maxHeight: '350px', + }, }); modal.on('click', '[data-tid]', function () { - if ($(this).attr('data-tid')) { - Merge.addTopic($(this).attr('data-tid')); + const addTid = $(this).attr('data-tid'); + if (addTid) { + Merge.addTopic(addTid); + } + return false; + }); + modal.on('click', '[data-remove-tid]', function () { + const removeTid = $(this).attr('data-remove-tid'); + if (removeTid) { + Merge.removeTopic(removeTid); } return false; }); @@ -65,6 +77,14 @@ define('forum/topic/merge', ['search', 'alerts', 'api'], function (search, alert }).catch(alerts.error); }; + Merge.removeTopic = function (tid) { + if (selectedTids[tid]) { + delete selectedTids[tid]; + } + checkButtonEnable(); + showTopicsSelected(); + }; + function onTopicClicked(ev) { if (!modal) { return; @@ -116,10 +136,13 @@ define('forum/topic/merge', ['search', 'alerts', 'api'], function (search, alert topics: topics, }, function (html) { modal.find('.topics-section').html(html.find('.topics-section').html()); - modal.find('.merge-main-topic-select').html(html.find('.merge-main-topic-select').html()); + modal.find('.merge-main-topic-select').html( + html.find('.merge-main-topic-select').html() + ); }); } else { modal.find('.topics-section').translateHtml('[[error:no-topics-selected]]'); + modal.find('.merge-main-topic-select').html(''); } } diff --git a/public/src/modules/search.js b/public/src/modules/search.js index f0550dd864..0d87e398f4 100644 --- a/public/src/modules/search.js +++ b/public/src/modules/search.js @@ -136,6 +136,7 @@ define('search', [ text.slice(start, start + 80) + (text.length - start > 80 ? '...' : '')); }); + data.dropdown = { maxWidth: '400px', maxHeight: '500px', ...options.dropdown }; app.parseAndTranslate('partials/quick-search-results', data, function (html) { if (html.length) { html.find('.timeago').timeago(); diff --git a/src/views/modals/merge-topic.tpl b/src/views/modals/merge-topic.tpl index 7b4af828a4..2fc99924f2 100644 --- a/src/views/modals/merge-topic.tpl +++ b/src/views/modals/merge-topic.tpl @@ -1,10 +1,5 @@
-
- -
+
[[topic:thread-tools.merge-topics]]
@@ -17,13 +12,23 @@
+ +

[[topic:merge-topic-list-title]]

[[topic:merge-options]] @@ -34,9 +39,9 @@