diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-04 12:59:41 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-04 12:59:41 -0500 |
commit | aee6d9b608aceb7b68ab1e1a583917c2c3ee4485 (patch) | |
tree | 8908ba8d14cafe8dd1532cc429920b8c243dd465 /web/react/components/team_settings_modal.jsx | |
parent | 2840c317e5a88264aa044261558dda6d91ee1ff3 (diff) | |
parent | a7ceba2e57f5b693afa51b0aefd04081646c6948 (diff) | |
download | chat-aee6d9b608aceb7b68ab1e1a583917c2c3ee4485.tar.gz chat-aee6d9b608aceb7b68ab1e1a583917c2c3ee4485.tar.bz2 chat-aee6d9b608aceb7b68ab1e1a583917c2c3ee4485.zip |
Merge pull request #1287 from hmhealey/plt382
PLT-382 Refactored some modals to use React-Bootstrap and added a confirmation when discarding theme changes
Diffstat (limited to 'web/react/components/team_settings_modal.jsx')
-rw-r--r-- | web/react/components/team_settings_modal.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx index 17fe31c65..4d47db2a8 100644 --- a/web/react/components/team_settings_modal.jsx +++ b/web/react/components/team_settings_modal.jsx @@ -17,11 +17,13 @@ export default class TeamSettingsModal extends React.Component { }; } componentDidMount() { - $('body').on('click', '.modal-back', function handleBackClick() { + const modal = $(ReactDOM.findDOMNode(this.refs.modal)); + + modal.on('click', '.modal-back', function handleBackClick() { $(this).closest('.modal-dialog').removeClass('display--content'); $(this).closest('.modal-dialog').find('.settings-table .nav li.active').removeClass('active'); }); - $('body').on('click', '.modal-header .close', () => { + modal.on('click', '.modal-header .close', () => { setTimeout(() => { $('.modal-dialog.display--content').removeClass('display--content'); }, 500); |