From 55b831e4e1d3db3ffcf1d40247018783ca76af8d Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 19 Nov 2015 21:12:56 -0500 Subject: Upgrading client dependancies. Upgrading to babel 6. Moving to es6 package system. --- web/react/components/more_channels.jsx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'web/react/components/more_channels.jsx') diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index 8a6dd84a4..29512b9b7 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -1,12 +1,12 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -var utils = require('../utils/utils.jsx'); -var client = require('../utils/client.jsx'); -var asyncClient = require('../utils/async_client.jsx'); -var ChannelStore = require('../stores/channel_store.jsx'); -var LoadingScreen = require('./loading_screen.jsx'); -var NewChannelFlow = require('./new_channel_flow.jsx'); +import * as utils from '../utils/utils.jsx'; +import * as client from '../utils/client.jsx'; +import * as AsyncClient from '../utils/async_client.jsx'; +import ChannelStore from '../stores/channel_store.jsx'; +import LoadingScreen from './loading_screen.jsx'; +import NewChannelFlow from './new_channel_flow.jsx'; function getStateFromStores() { return { @@ -31,12 +31,12 @@ export default class MoreChannels extends React.Component { } componentDidMount() { ChannelStore.addMoreChangeListener(this.onListenerChange); - $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', function shown() { - asyncClient.getMoreChannels(true); + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', () => { + AsyncClient.getMoreChannels(true); }); var self = this; - $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', function show(e) { + $(ReactDOM.findDOMNode(this.refs.modal)).on('show.bs.modal', (e) => { var button = e.relatedTarget; self.setState({channelType: $(button).attr('data-channeltype')}); }); @@ -53,15 +53,15 @@ export default class MoreChannels extends React.Component { handleJoin(channel, channelIndex) { this.setState({joiningChannel: channelIndex}); client.joinChannel(channel.id, - function joinSuccess() { + () => { $(ReactDOM.findDOMNode(this.refs.modal)).modal('hide'); - asyncClient.getChannel(channel.id); + AsyncClient.getChannel(channel.id); utils.switchChannel(channel); this.setState({joiningChannel: -1}); - }.bind(this), - function joinFail(err) { + }, + (err) => { this.setState({joiningChannel: -1, serverError: err.message}); - }.bind(this) + } ); } handleNewChannel() { -- cgit v1.2.3-1-g7c22