discourse/app/assets/javascripts/discourse/routes
Jeff Wong 86690155b3
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-06 09:36:56 -08:00
..
about.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
account-created-edit-email.js.es6 REFACTOR: Replace `Ember.Route` with proper import 2019-10-23 12:39:32 -04:00
account-created-index.js.es6 REFACTOR: Replace `Ember.Route` with proper import 2019-10-23 12:39:32 -04:00
account-created-resent.js.es6 REFACTOR: Replace `Ember.Route` with proper import 2019-10-23 12:39:32 -04:00
account-created.js.es6 REFACTOR: Replace `Ember.Route` with proper import 2019-10-23 12:39:32 -04:00
app-route-map.js.es6 FEATURE: Improving bookmarks part 2 -- Topic Bookmarking (#8954) 2020-02-13 16:26:02 +10:00
application.js.es6 FEATURE: prevent accidental canceling when drafting penalties (#9129) 2020-03-06 09:36:56 -08:00
associate-account.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
badges-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
badges-show.js.es6 DEV: Import Promise from rsvp (#8296) 2019-11-05 10:37:32 -06:00
build-admin-user-posts-route.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
build-category-route.js.es6 FIX: Show detailed error messages for category pages. (#8832) 2020-02-06 15:32:12 +11:00
build-group-messages-route.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
build-private-messages-route.js.es6 REFACTOR: Remove `Discourse.UserAction` from code 2019-11-08 12:52:39 -05:00
build-static-route.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
build-topic-route.js.es6 FIX: use dedicated site attribute in category + tag filtered pages too. 2020-02-21 15:55:17 +05:30
conduct.js.es6 FEATURE: add /conduct as an alias for /guidelines 2018-12-18 16:40:24 -05:00
discourse.js.es6 REFACTOR: Remove `Discourse.Route` in lieu of importing 2019-11-08 15:18:13 -05:00
discovery-categories.js.es6 FIX: update `Site.top_tags` in "categories" route if topic list available. 2020-02-14 09:53:41 +05:30
discovery.js.es6 DEV: Remove Discourse.User and import instead 2019-11-13 15:34:30 -05:00
email-login.js.es6 FIX: Include `.json` suffix for email login route (#9041) 2020-02-25 18:01:33 +00:00
exception-unknown.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
exception.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
faq.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
forgot-password.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
full-page-search.js.es6 FIX: When appending tags to restricted category posts, we need to pass the category id, or it won't work. (#9020) 2020-02-27 14:10:14 -03:00
group-activity-index.js.es6 Support for importing `@ember/component` and `@ember/routing/route` (#8214) 2019-10-22 09:47:27 -04:00
group-activity-mentions.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
group-activity-posts.js.es6 REFACTOR: Remove `Ember.get` 2019-11-01 13:50:15 -04:00
group-activity-topics.js.es6 FIX: set showFooter to true on group topic list (#8795) 2020-01-29 12:12:38 -05:00
group-index.js.es6 FIX: Better handling of Group model state (#8356) 2019-11-18 14:59:28 +02:00
group-manage-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-manage-interaction.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-manage-logs.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-manage-membership.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-manage-profile.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-manage.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-members.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-messages-archive.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
group-messages-inbox.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
group-messages-index.js.es6 REFACTOR: Replace `Ember.Route` with proper import 2019-10-23 12:39:32 -04:00
group-messages.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
group-requests.js.es6 FIX: Better handling of Group model state (#8356) 2019-11-18 14:59:28 +02:00
group.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
groups-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
groups-new.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
guidelines.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
invites-show.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
login.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
new-message.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
new-topic.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
password-reset.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
post.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
preferences-account.js.es6 Fix Prettier using correct version (1.19.1) 2019-11-15 10:34:26 -05:00
preferences-apps.js.es6 UX: show custom footer on user activity and preferences pages (#6080) 2018-07-10 16:14:26 +08:00
preferences-categories.js.es6 UX: Show the footer on the user summary and preferences pages 2018-02-07 11:35:36 -05:00
preferences-email.js.es6 DEV: s/this._super()/this._super(...arguments) (#6908) 2019-01-19 10:05:51 +01:00
preferences-emails.js.es6 UX: show custom footer on user activity and preferences pages (#6080) 2018-07-10 16:14:26 +08:00
preferences-index.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
preferences-interface.js.es6 DEV: Make interface route/controller more resilient to missing values 2019-02-08 16:54:15 +00:00
preferences-notifications.js.es6 UX: Show the footer on the user summary and preferences pages 2018-02-07 11:35:36 -05:00
preferences-profile.js.es6 DEV: Ember linting - disallow Ember.* variable usage (#8782) 2020-02-05 10:14:42 -06:00
preferences-second-factor.js.es6 DEV: simplify logic (#8249) 2019-10-29 12:10:27 +02:00
preferences-tags.js.es6 UX: show custom footer on user activity and preferences pages (#6080) 2018-07-10 16:14:26 +08:00
preferences-username.js.es6 DEV: s/this._super()/this._super(...arguments) (#6908) 2019-01-19 10:05:51 +01:00
preferences-users.js.es6 FEATURE: Add ignored user list to the User's preference page (#7107) 2019-03-05 14:47:51 +00:00
preferences.js.es6 UX: open the change avatar modal when clicking the profile picture 2018-07-24 15:13:21 +02:00
privacy.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
restricted-user.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
review-index.js.es6 FEATURE: Publish a message when reviewable claimer changes (#9019) 2020-02-21 19:11:50 +02:00
review-settings.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
review-show.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
review-topics.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
review.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
rules.js.es6 FIX: /rules route showed error page 2018-08-28 20:40:37 -04:00
signup.js.es6 Revert "Revert Ember.run refactors" 2019-10-30 09:48:24 -04:00
tag-groups-edit.js.es6 DEV: Tag group improvements (#8252) 2019-10-30 16:57:13 +01:00
tag-groups-new.js.es6 DEV: Tag group improvements (#8252) 2019-10-30 16:57:13 +01:00
tag-groups.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
tags-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
tags-intersection.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
tags-show.js.es6 FIX: Use new tag routes (#8683) 2020-01-21 19:23:08 +02:00
topic-by-slug-or-id.js.es6 DEV: Fix function prototype deprecations (#8681) 2020-01-16 18:56:53 +01:00
topic-from-params-near.js.es6 UX: improved our footer handling 2014-11-19 20:37:43 +01:00
topic-from-params.js.es6 DEV: Import ember ENV instead of Ember.testing (#8305) 2019-11-07 11:20:35 -06:00
topic.js.es6 DEV: Don't allow `Promise` unless imported from `"rsvp"` 2019-11-20 15:24:59 -05:00
tos.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
unknown.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-activity-bookmarks.js.es6 UX: show custom footer on user activity and preferences pages (#6080) 2018-07-10 16:14:26 +08:00
user-activity-drafts.js.es6 FIX: Don't leak event listeners in user-activity-drafts (#8682) 2020-01-08 16:55:10 +01:00
user-activity-index.js.es6 FEATURE: make summary as first tab on user page 2017-03-21 23:12:28 +05:30
user-activity-likes-given.js.es6 UX: show custom footer on user activity and preferences pages (#6080) 2018-07-10 16:14:26 +08:00
user-activity-pending.js.es6 es6 migration and fixes 2015-12-02 11:15:22 +11:00
user-activity-replies.js.es6 UX: show custom footer on user activity and preferences pages (#6080) 2018-07-10 16:14:26 +08:00
user-activity-stream.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-activity-topics.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-activity.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-badges.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-deleted-posts.js.es6 UX: improved our footer handling 2014-11-19 20:37:43 +01:00
user-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-invited-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-invited-show.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-notifications-edits.js.es6 FEATURE: User page refactor 2015-12-20 16:45:49 +11:00
user-notifications-index.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-notifications-likes-received.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-notifications-mentions.js.es6 FEATURE: User page refactor 2015-12-20 16:45:49 +11:00
user-notifications-responses.js.es6 FEATURE: User page refactor 2015-12-20 16:45:49 +11:00
user-notifications.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-private-messages-archive.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-private-messages-group-archive.js.es6 FIX: failing build with prettier (#8241) 2019-10-24 10:16:12 -05:00
user-private-messages-group.js.es6 FIX: failing build with prettier (#8241) 2019-10-24 10:16:12 -05:00
user-private-messages-index.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-private-messages-sent.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-private-messages-tags-show.js.es6 DEV: introduces prettier for es6 files 2018-06-15 17:03:24 +02:00
user-private-messages-tags.js.es6 DEV: Import EmberObject rather than global variable (#8256) 2019-10-29 14:23:50 -05:00
user-private-messages.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-summary.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user-topic-list.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00
user.js.es6 DEV: Remove Discourse.User and import instead 2019-11-13 15:34:30 -05:00
users.js.es6 DEV: Import DiscourseRoute rather than Discourse.Route (#8225) 2019-10-22 09:46:10 -04:00