This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/tests/unit/controllers
Krzysztof Kotlarek 8e7c746e56
FEATURE: Ask user to confirm topic deletion when views exceed a certain amount (#11006)
Before deleting a topic that has a high number of views (default of 5000), the user will be prompted with a confirmation popup. This works for all delete buttons on the topic located in: topic-timeline, topic-admin-menu, topic-footer-buttons, and post-menu if the post's ID is 1.

The delete button will be disabled while deletion is in progress, to prevent any unwanted behavior.

A site setting is also available to change the minimum amount of views required to display the confirmation popup.

All kudos are going to @RickyC0626. I only rebased with master and added few qunit tests to ensure that this feature works as expected.

Original PR: #10459
2020-10-29 14:18:43 +11:00
..
avatar-selector-test.js DEV: Make site setting type uploaded_image_list use upload IDs (#10401) 2020-10-13 16:17:06 +03:00
bookmark-test.js Remove more global variables from tests. 2020-10-26 13:32:11 -04:00
create-account-test.js REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
history-test.js REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
preferences-account-test.js REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
preferences-second-factor-test.js REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
reorder-categories-test.js REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
topic-test.js FEATURE: Ask user to confirm topic deletion when views exceed a certain amount (#11006) 2020-10-29 14:18:43 +11:00