summaryrefslogtreecommitdiffstats
path: root/web/react/components/create_comment.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/create_comment.jsx')
-rw-r--r--web/react/components/create_comment.jsx37
1 files changed, 19 insertions, 18 deletions
diff --git a/web/react/components/create_comment.jsx b/web/react/components/create_comment.jsx
index 058594165..b0f33eda1 100644
--- a/web/react/components/create_comment.jsx
+++ b/web/react/components/create_comment.jsx
@@ -1,21 +1,21 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
-const AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
-const Client = require('../utils/client.jsx');
-const AsyncClient = require('../utils/async_client.jsx');
-const SocketStore = require('../stores/socket_store.jsx');
-const ChannelStore = require('../stores/channel_store.jsx');
-const UserStore = require('../stores/user_store.jsx');
-const PostStore = require('../stores/post_store.jsx');
-const PreferenceStore = require('../stores/preference_store.jsx');
-const Textbox = require('./textbox.jsx');
-const MsgTyping = require('./msg_typing.jsx');
-const FileUpload = require('./file_upload.jsx');
-const FilePreview = require('./file_preview.jsx');
-const Utils = require('../utils/utils.jsx');
-
-const Constants = require('../utils/constants.jsx');
+import AppDispatcher from '../dispatcher/app_dispatcher.jsx';
+import * as Client from '../utils/client.jsx';
+import * as AsyncClient from '../utils/async_client.jsx';
+import SocketStore from '../stores/socket_store.jsx';
+import ChannelStore from '../stores/channel_store.jsx';
+import UserStore from '../stores/user_store.jsx';
+import PostStore from '../stores/post_store.jsx';
+import PreferenceStore from '../stores/preference_store.jsx';
+import Textbox from './textbox.jsx';
+import MsgTyping from './msg_typing.jsx';
+import FileUpload from './file_upload.jsx';
+import FilePreview from './file_preview.jsx';
+import * as Utils from '../utils/utils.jsx';
+
+import Constants from '../utils/constants.jsx';
const ActionTypes = Constants.ActionTypes;
const KeyCodes = Constants.KeyCodes;
@@ -34,7 +34,6 @@ export default class CreateComment extends React.Component {
this.handleUploadError = this.handleUploadError.bind(this);
this.handleTextDrop = this.handleTextDrop.bind(this);
this.removePreview = this.removePreview.bind(this);
- this.handleSubmit = this.handleSubmit.bind(this);
this.getFileCount = this.getFileCount.bind(this);
this.handleResize = this.handleResize.bind(this);
this.onPreferenceChange = this.onPreferenceChange.bind(this);
@@ -194,7 +193,8 @@ export default class CreateComment extends React.Component {
title: 'Comment',
message: lastPost.message,
postId: lastPost.id,
- channelId: lastPost.channel_id
+ channelId: lastPost.channel_id,
+ comments: PostStore.getCommentCount(lastPost)
});
}
}
@@ -334,6 +334,7 @@ export default class CreateComment extends React.Component {
messageText={this.state.messageText}
createMessage='Add a comment...'
initialText=''
+ supportsCommands={false}
id='reply_textbox'
ref='textbox'
/>
@@ -361,11 +362,11 @@ export default class CreateComment extends React.Component {
onClick={this.handleSubmit}
/>
{uploadsInProgressText}
+ {preview}
{postError}
{serverError}
</div>
</div>
- {preview}
</form>
);
}