Skip to content

Commit

Permalink
Add event listener for closed bootstrap modal.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclynperrone committed Jul 13, 2015
1 parent 01cd9e5 commit 26f4e09
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions cycledash/static/js/runs/components/RunsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@ var React = require('react'),

var NO_FILTER = 'All projects';

var ModalStates = {
NONE: 0,
PROJECT: 1,
RUN: 2,
BAM: 3
};

var Modal = React.createClass({
componentDidMount: function() {
$('.modal').on('hidden.bs.modal', () => {this.props.handleClose()});
},
render: function(){
return (
<div className="modal fade" role="dialog" tabIndex="-1">
Expand All @@ -21,13 +31,6 @@ var Modal = React.createClass({
}
});

var ModalStates = {
NONE: 0,
PROJECT: 1,
RUN: 2,
BAM: 3
};

var RunsPage = React.createClass({
propTypes: {
// cf. cycledash.projects._get_projects
Expand Down

0 comments on commit 26f4e09

Please sign in to comment.