diff options
Diffstat (limited to 'web/react/components/post_deleted_modal.jsx')
-rw-r--r-- | web/react/components/post_deleted_modal.jsx | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/web/react/components/post_deleted_modal.jsx b/web/react/components/post_deleted_modal.jsx index d284a9d1b..024097428 100644 --- a/web/react/components/post_deleted_modal.jsx +++ b/web/react/components/post_deleted_modal.jsx @@ -2,13 +2,38 @@ // See License.txt for license information. var UserStore = require('../stores/user_store.jsx'); +var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); +var Constants = require('../utils/constants.jsx'); +var ActionTypes = Constants.ActionTypes; export default class PostDeletedModal extends React.Component { constructor(props) { super(props); + this.handleClose = this.handleClose.bind(this); + this.state = {}; } + handleClose(e) { + e.preventDefault(); + + AppDispatcher.handleServerAction({ + type: ActionTypes.RECIEVED_SEARCH, + results: null + }); + + AppDispatcher.handleServerAction({ + type: ActionTypes.RECIEVED_SEARCH_TERM, + term: null, + do_search: false, + is_mention_search: false + }); + + AppDispatcher.handleServerAction({ + type: ActionTypes.RECIEVED_POST_SELECTED, + results: null + }); + } render() { var currentUser = UserStore.getCurrentUser(); @@ -37,17 +62,18 @@ export default class PostDeletedModal extends React.Component { className='modal-title' id='myModalLabel' > - Comment could not be posted + Post deleted </h4> </div> <div className='modal-body'> - <p>Someone deleted the message on which you tried to post a comment.</p> + <p>The post you were viewing was deleted by the owner.</p> </div> <div className='modal-footer'> <button type='button' className='btn btn-primary' data-dismiss='modal' + onClick={this.handleClose} > Okay </button> |