diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-08-11 11:24:35 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-08-11 12:14:58 -0400 |
commit | e52405f47ad7faab0a7a100a622eae2fe420a9db (patch) | |
tree | 834ae92971e2b3504bcd6224976d749fb01908e9 /web/react/components/new_channel.jsx | |
parent | 1692fca1c3eb2569620813caa59b6a4b82f1872a (diff) | |
download | chat-e52405f47ad7faab0a7a100a622eae2fe420a9db.tar.gz chat-e52405f47ad7faab0a7a100a622eae2fe420a9db.tar.bz2 chat-e52405f47ad7faab0a7a100a622eae2fe420a9db.zip |
don't refresh page on channel creation and ignore case when sorting channels in sidebar
Diffstat (limited to 'web/react/components/new_channel.jsx')
-rw-r--r-- | web/react/components/new_channel.jsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/web/react/components/new_channel.jsx b/web/react/components/new_channel.jsx index 8d07c7b64..973643de7 100644 --- a/web/react/components/new_channel.jsx +++ b/web/react/components/new_channel.jsx @@ -55,16 +55,17 @@ module.exports = React.createClass({ channel.description = this.refs.channel_desc.getDOMNode().value.trim(); channel.type = this.state.channelType; - var self = this; client.createChannel(channel, function(data) { + $(this.refs.modal.getDOMNode()).modal('hide'); + + asyncClient.getChannel(data.id); + utils.updateTabTitle(channel.display_name); + utils.updateAddressBar(channel.name); + this.refs.display_name.getDOMNode().value = ''; this.refs.channel_name.getDOMNode().value = ''; this.refs.channel_desc.getDOMNode().value = ''; - - $(self.refs.modal.getDOMNode()).modal('hide'); - window.location = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name; - asyncClient.getChannel(data.id); }.bind(this), function(err) { state.serverError = err.message; |