Added a confirmation dialog for unsaved theme changes and removed unnecessary dialog close handling

Этот коммит содержится в:
hmhealey
2015-10-30 16:33:51 -04:00
родитель 738568e5a9
Коммит e56d21a920
10 изменённых файлов: 106 добавлений и 118 удалений

Просмотреть файл

@@ -11,24 +11,12 @@ export default class UserSettingsIntegrationsTab extends React.Component {
super(props);
this.updateSection = this.updateSection.bind(this);
this.handleClose = this.handleClose.bind(this);
this.state = {};
}
updateSection(section) {
this.props.updateSection(section);
}
handleClose() {
this.updateSection('');
$('.ps-container.modal-body').scrollTop(0);
$('.ps-container.modal-body').perfectScrollbar('update');
}
componentDidMount() {
$('#user_settings').on('hidden.bs.modal', this.handleClose);
}
componentWillUnmount() {
$('#user_settings').off('hidden.bs.modal', this.handleClose);
}
render() {
let incomingHooksSection;
let outgoingHooksSection;