Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import List from '../components/List';
  3. var PropTypes = React.PropTypes;
  4.  
  5.  
  6. class ListContainer extends React.Component {
  7.     constructor(props) {
  8.         super(props);
  9.         this.handleOnClickFunction = this.handleOnClickFunction.bind(this);
  10.     }
  11.  
  12.     handleOnClickFunction(e) {
  13.         $('#EditModal')
  14.           .modal({
  15.             closable  : false,
  16.             onDeny    : function(){
  17.               console.log('Wait not yet!');
  18.               return false;
  19.             },
  20.             onApprove : function() {
  21.               console.log('Approved!');
  22.             }
  23.           })
  24.           .modal('show')
  25.         ;
  26.  
  27.     }
  28.  
  29.     render() {
  30.         return (
  31.             <List
  32.                 onClickFunction={this.handleOnClickFunction}
  33.             />
  34.         );
  35.     }
  36. }
  37.  
  38. ListContainer.contextTypes = {
  39.   router: React.PropTypes.object.isRequired
  40. }
  41.  
  42. List.propTypes = {
  43.   items: PropTypes.array.isRequired,
  44. }
  45.  
  46. export default ListContainer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement