From 16cee7f0702e7c18d131f0a30c0ba837abcc2a0c Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Fri, 25 Sep 2015 14:33:27 -0700 Subject: Initial changes to how trying to comment on a deleted post is handled --- web/react/components/post_deleted_modal.jsx | 30 +++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'web/react/components/post_deleted_modal.jsx') 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
-

Someone deleted the message on which you tried to post a comment.

+

The post you were viewing was deleted by the owner.

-- cgit v1.2.3-1-g7c22