diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-02 19:24:12 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-03-02 19:24:12 +0100 |
commit | b9345b3fc60c5d48828af422d3ee027abc2dea82 (patch) | |
tree | 35215ee0e2b97a2d263bad4aba7b9f2c501bf97c /app/assets/javascripts/components/features/notifications/index.jsx | |
parent | 4d23a85c29c6cfd1340b3365c081a940766e50bc (diff) |
Fix #620 - Add confirmation dialog for notifications clear
Diffstat (limited to 'app/assets/javascripts/components/features/notifications/index.jsx')
-rw-r--r-- | app/assets/javascripts/components/features/notifications/index.jsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/notifications/index.jsx b/app/assets/javascripts/components/features/notifications/index.jsx index 0da3544f6..8d3f4233d 100644 --- a/app/assets/javascripts/components/features/notifications/index.jsx +++ b/app/assets/javascripts/components/features/notifications/index.jsx @@ -13,7 +13,8 @@ import LoadMore from '../../components/load_more'; import ClearColumnButton from './components/clear_column_button'; const messages = defineMessages({ - title: { id: 'column.notifications', defaultMessage: 'Notifications' } + title: { id: 'column.notifications', defaultMessage: 'Notifications' }, + confirm: { id: 'confirmation.label', defaultMessage: 'Are you sure?' } }); const getNotifications = createSelector([ @@ -72,7 +73,9 @@ const Notifications = React.createClass({ }, handleClear () { - this.props.dispatch(clearNotifications()); + if (window.confirm(this.props.intl.formatMessage(messages.confirm))) { + this.props.dispatch(clearNotifications()); + } }, setRef (c) { |