Browse Source

upgrade to react-router 2.0 yay

master
Julian Steinwachs 9 years ago
parent
commit
e51c9ce13e
  1. 24
      jsx/home/NewPostModalButton.js

24
jsx/home/NewPostModalButton.js

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
var ReactBootstrap = require('react-bootstrap')
, OverlayMixin = ReactBootstrap.OverlayMixin
, Button = ReactBootstrap.Button
, ButtonGroup = ReactBootstrap.ButtonGroup
, Glyphicon = ReactBootstrap.Glyphicon
@ -14,7 +13,6 @@ var SetIntervalMixin = require("../common/SetIntervalMixin.js"); @@ -14,7 +13,6 @@ var SetIntervalMixin = require("../common/SetIntervalMixin.js");
var TwistComposer = require("../common/TwistComposer.js");
module.exports = NewPostModalButton = React.createClass({
mixins: [OverlayMixin],
getInitialState: function () {
return {
isModalOpen: false
@ -52,21 +50,11 @@ module.exports = NewPostModalButton = React.createClass({ @@ -52,21 +50,11 @@ module.exports = NewPostModalButton = React.createClass({
},
render: function() {
return (
<div>
<Button onClick={this.handleToggle} className="link-button-gray pull-right fullytight_all" bsStyle="link">
<Glyphicon glyph='pencil' />
</Button>
);
},
renderOverlay: function() {
if (!this.state.isModalOpen) {
return <span/>;
}
/*
*/
return (
<Modal bsStyle='primary' title={<Glyphicon glyph='pencil'/>} onRequestHide={this.handleToggle}>
<Modal show={this.state.isModalOpen} bsStyle='primary' title={<Glyphicon glyph='pencil'/>} onRequestHide={this.handleToggle}>
<div className='modal-body'>
<form onSubmit={this.handleNewPost}>
<Input type='textarea' label='Write Something' placeholder='textarea'/>
@ -74,7 +62,15 @@ module.exports = NewPostModalButton = React.createClass({ @@ -74,7 +62,15 @@ module.exports = NewPostModalButton = React.createClass({
</form>
</div>
</Modal>
</div>
);
},
renderOverlay: function() {
if (!this.state.isModalOpen) {
return <span/>;
}
}
});
Loading…
Cancel
Save