discourse/config
Jeff Wong 111fa7e277 FEATURE: prevent accidental canceling when drafting penalties (#9129)
Pop up a confirmation box when there is input. This prevents accidental closing
of the dialog boxes due to clicking outside.

This adds a development hook on modals in the form of a `beforeClose`
function. Modal windows can abort the close if the funtion returns false.

Additionally fixing a few issues with loop and state on the modal popups:

Escape key with bootbox is keyup.
Updating modal to close on keyup as well so escape key is working.
Fixes an issue where pressing esc will loop immediately back to the modal by:
keydown -> bootbox -> keyup -> acts as "cancel", restores modal

Needs a next call to reopenModal otherwise, keyup is handled again by the modal.
Fixes an issue where pressing esc will loop immediately back to the confirm:
esc keyup will be handled and bubble immediately back to the modal.

Additionally, only handle key events when the #discourse-modal is visible.
This resolves issues where escape or enter events were being handled by
a hidden modal window.
2020-03-23 16:01:39 -07:00
..
cloud/cloud66 DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
environments DEV: flag MRI specific gems 2020-02-18 11:04:56 +11:00
initializers DEV: Silence spurious rubocop lint warning 2020-02-19 13:10:30 +11:00
locales FEATURE: prevent accidental canceling when drafting penalties (#9129) 2020-03-23 16:01:39 -07:00
application.rb DEV: Use .hbr for raw template file extension (#8883) 2020-02-11 13:38:12 -06:00
boot.rb DEV: Remove logging when redis is terminated 2019-06-21 10:31:48 +01:00
cdn.yml.sample
database.yml DEV: correct parallel specs rake tasks 2019-12-31 14:07:55 +11:00
deploy.rb.sample
discourse_defaults.conf FEATURE: support MaxMind DB downloads using a license key 2020-02-05 16:40:04 +11:00
discourse.config.sample
discourse.pill.sample
environment.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
logrotate.conf
multisite.yml.production-sample
nginx.global.conf
nginx.sample.conf FIX: Serve .ico files without nginx 404 for secure media uploads (#8826) 2020-01-31 12:45:02 +10:00
projections.json DEV: Use .hbr for raw template file extension (#8883) 2020-02-11 13:38:12 -06:00
puma.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
routes.rb DEV: remove unused 'composer/parse_html' route 2020-02-14 16:15:34 +01:00
sidekiq.yml FEATURE: introduce ultra_low priority queue 2019-01-17 14:53:19 +11:00
site_settings.yml FEATURE: limit number of notifications per user to 10,000 2020-02-24 11:42:50 +11:00
spring.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
thin.yml.sample
unicorn_launcher FIX: Increase timeout when trying to reload unicorn. 2018-12-04 13:43:14 +08:00
unicorn_upstart.conf
unicorn.conf.rb Revert "DEV: Bind to ipv6 loopback address in addition to ipv4 (#8544)" 2019-12-16 15:51:04 +00:00