Changed how the sidebar opens the more channels modal
Этот коммит содержится в:
@@ -39,6 +39,7 @@ export default class Sidebar extends React.Component {
|
|||||||
this.handleLeaveDirectChannel = this.handleLeaveDirectChannel.bind(this);
|
this.handleLeaveDirectChannel = this.handleLeaveDirectChannel.bind(this);
|
||||||
this.handleResize = this.handleResize.bind(this);
|
this.handleResize = this.handleResize.bind(this);
|
||||||
|
|
||||||
|
this.showMoreChannelsModal = this.showMoreChannelsModal.bind(this);
|
||||||
this.showNewChannelModal = this.showNewChannelModal.bind(this);
|
this.showNewChannelModal = this.showNewChannelModal.bind(this);
|
||||||
this.hideNewChannelModal = this.hideNewChannelModal.bind(this);
|
this.hideNewChannelModal = this.hideNewChannelModal.bind(this);
|
||||||
this.showMoreDirectChannelsModal = this.showMoreDirectChannelsModal.bind(this);
|
this.showMoreDirectChannelsModal = this.showMoreDirectChannelsModal.bind(this);
|
||||||
@@ -250,6 +251,11 @@ export default class Sidebar extends React.Component {
|
|||||||
return a.display_name.localeCompare(b.display_name);
|
return a.display_name.localeCompare(b.display_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showMoreChannelsModal() {
|
||||||
|
// manually show the modal because using data-toggle messes with keyboard focus when the modal is dismissed
|
||||||
|
$('#more_channels').modal({'data-channeltype': 'O'}).modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
showNewChannelModal(type) {
|
showNewChannelModal(type) {
|
||||||
this.setState({newChannelModalType: type});
|
this.setState({newChannelModalType: type});
|
||||||
}
|
}
|
||||||
@@ -594,10 +600,8 @@ export default class Sidebar extends React.Component {
|
|||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
data-toggle='modal'
|
|
||||||
className='nav-more'
|
className='nav-more'
|
||||||
data-target='#more_channels'
|
onClick={this.showMoreChannelsModal}
|
||||||
data-channeltype='O'
|
|
||||||
>
|
>
|
||||||
{'More...'}
|
{'More...'}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user