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
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
..
controllers FEATURE: Ask user to confirm topic deletion when views exceed a certain amount (#11006) 2020-10-29 14:18:43 +11:00
ember REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
lib FIX: pretty text allow list (#10977) 2020-10-28 13:22:06 +11:00
mixins REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
models Remove more global variables from tests. 2020-10-26 13:32:11 -04:00
services REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00
utils REFACTOR: Test assertions should be imported. 2020-10-28 11:39:06 -04:00
localization-test.js REFACTOR: Import QUnit and related helpers rather than globals 2020-10-07 11:50:49 -04:00