diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/new_channel.jsx | 11 | ||||
-rw-r--r-- | web/react/components/sidebar.jsx | 4 |
2 files changed, 8 insertions, 7 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; diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index f4992d4e3..46dfc1200 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -116,10 +116,10 @@ function getStateFromStores() { var channels = ChannelStore.getAll(); if (channels) { channels.sort(function chanSort(a, b) { - if (a.display_name < b.display_name) { + if (a.display_name.toLowerCase() < b.display_name.toLowerCase()) { return -1; } - if (a.display_name > b.display_name) { + if (a.display_name.toLowerCase() > b.display_name.toLowerCase()) { return 1; } return 0; |