Move all element specific code into skins/

This commit is contained in:
Erik Johnston 2015-07-14 16:59:11 +01:00
parent b53e710d20
commit a748c090fb
4 changed files with 8 additions and 8 deletions

View File

@ -24,6 +24,10 @@ module.exports = React.createClass({
displayName: 'CreateRoomPresets', displayName: 'CreateRoomPresets',
mixins: [PresetsController], mixins: [PresetsController],
onValueChanged: function(ev) {
this.setState({preset: ev.target.value})
},
render: function() { render: function() {
return ( return (
<select className="mx_PresetOption" onChange={this.onValueChanged} defaultValue={this.state.preset}> <select className="mx_PresetOption" onChange={this.onValueChanged} defaultValue={this.state.preset}>

View File

@ -24,6 +24,10 @@ module.exports = React.createClass({
displayName: 'CreateRoomButton', displayName: 'CreateRoomButton',
mixins: [RoomNameTextboxController], mixins: [RoomNameTextboxController],
onValueChanged: function(ev) {
this.setState({room_name: ev.target.value})
},
render: function() { render: function() {
return ( return (
<input type="text" className="mx_RoomNameTextbox" placeholder="ex. MyNewRoom" onChange={this.onValueChanged}/> <input type="text" className="mx_RoomNameTextbox" placeholder="ex. MyNewRoom" onChange={this.onValueChanged}/>

View File

@ -23,10 +23,6 @@ module.exports = {
default_preset: React.PropTypes.string default_preset: React.PropTypes.string
}, },
onValueChanged: function(ev) {
this.setState({preset: ev.target.value})
},
getDefaultProps: function() { getDefaultProps: function() {
return { return {
default_preset: 'private_chat', default_preset: 'private_chat',

View File

@ -23,10 +23,6 @@ module.exports = {
default_name: React.PropTypes.string default_name: React.PropTypes.string
}, },
onValueChanged: function(ev) {
this.setState({room_name: ev.target.value})
},
getDefaultProps: function() { getDefaultProps: function() {
return { return {
default_name: '', default_name: '',