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
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
..
acceptance FEATURE: Ask user to confirm topic deletion when views exceed a certain amount (#11006) 2020-10-29 14:18:43 +11:00
fixtures UX: Move category editing/creation to its own page (#10973) 2020-10-23 12:49:02 -04:00
helpers REFACTOR: Test assertions should be imported. 2020-10-28 11:39:06 -04:00
integration REFACTOR: Test assertions should be imported. 2020-10-28 11:39:06 -04:00
unit FEATURE: Ask user to confirm topic deletion when views exceed a certain amount (#11006) 2020-10-29 14:18:43 +11:00
plugin_tests.js.erb REFACTOR: Move javascript tests inside discourse app 2020-10-02 11:29:36 -04:00
setup-tests.js REFACTOR: Test assertions should be imported. 2020-10-28 11:39:06 -04:00
test_helper.js REFACTOR: Continue to converge on what Ember CLI wants us to do 2020-10-16 10:53:13 -04:00