--- a/client/src/components/SessionList.js Wed Aug 29 11:02:36 2018 +0200
+++ b/client/src/components/SessionList.js Fri Aug 31 15:14:18 2018 +0200
@@ -25,6 +25,10 @@
this.hide = this.hide.bind(this);
}
+ componentWillMount() {
+ Modal.setAppElement('body');
+}
+
doSomething(e){
e.preventDefault();
console.log(e.target.innerHTML);
@@ -102,27 +106,27 @@
render() {
return (
<div>
- <button id="session-button" type="button" className="btn btn-primary btn-lg" onClick={this.createSession}>Créer une nouvelle session</button>
<Navbar history={this.props.history} />
<div className="top-fade"></div>
+ <button id="session-button" type="button" className="btn btn-primary btn-lg text-secondary" onClick={ this.createSession}>Créer une nouvelle session</button>
<div className="container-fluid">
<div className="row">
{this.props.sessions.map((session) =>
<div>
- <div className="col-md-4 session" key={session.get('_id')}>
- <a className="sessions" href="#session" onClick={() => this.props.history.push('/sessions/' + session.get('_id'))}>
- <span className="session-title">{session.title || 'Session sans titre'}<br /></span>
+ <div className="col-lg-4 session" key={session.get('_id')}>
+ <a className="sessions" onClick={() => this.props.history.push('/sessions/' + session.get('_id'))}>
+ <span className="session-title text-primary">{session.title || 'Session sans titre'}<br /></span>
<span className="session-date text-muted">{moment(session.get('date')).format('DD/MM/YYYY')}<br /></span>
- <span className="session-description">{session.description}<br /></span>
+ <span className="session-description text-dark">{session.description}<br /></span>
</a>
- <button className="btn btn-link pull-left" key={session.get('_id')} id="toggle-edit" type="button" onClick={this.toggleShow} onBlur={this.hide}>
+ <button className="btn btn-link float-left" key={session.get('_id')} id="toggle-edit" type="button" onClick={this.toggleShow} onBlur={this.hide}>
<span className="material-icons edit">edit</span>
</button>
{
this.state.show &&
(
- <button type="button" className="btn btn-link pull-left" style={{display: 'block'}} onClick={ this.onClickDelete.bind(this, session) }>
- <span className="material-icons delete">delete</span>
+ <button type="button" className="btn btn-link float-left" style={{display: 'block'}} onClick={ this.onClickDelete.bind(this, session) }>
+ <span className="material-icons delete text-dark">delete</span>
</button>
)
}
@@ -138,12 +142,10 @@
onRequestClose={this.handleModalCloseRequest}
>
<div id="delete-session-modal" className="modal-content text-center">
- <button type="button" id="delete-session-close-modal-button" className="btn btn-default pull-right" onClick={ this.handleModalCloseRequest }><span className="material-icons">close</span></button>
- {/* <div className="modal-body"> */}
+ <button type="button" id="delete-session-close-modal-button" className="btn btn-secondary float-right" onClick={ this.handleModalCloseRequest }><span className="material-icons">close</span></button>
<span className="modal-text">Êtes-vous sûr(e) de vouloir supprimer cette session ?</span>
- {/* </div> */}
- <div className="modal-footer">
- <button type="button" className="btn btn-primary" id="delete-session-modal-button" onClick={ this.deleteSession }>Confirmer</button>
+ <div className="modal-footer text-center">
+ <button type="button" className="btn btn-primary text-secondary" id="delete-session-modal-button" onClick={ this.deleteSession }>Confirmer</button>
</div>
</div>
</Modal>