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',
mixins: [PresetsController],
onValueChanged: function(ev) {
this.setState({preset: ev.target.value})
},
render: function() {
return (
<select className="mx_PresetOption" onChange={this.onValueChanged} defaultValue={this.state.preset}>

View File

@ -24,6 +24,10 @@ module.exports = React.createClass({
displayName: 'CreateRoomButton',
mixins: [RoomNameTextboxController],
onValueChanged: function(ev) {
this.setState({room_name: ev.target.value})
},
render: function() {
return (
<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
},
onValueChanged: function(ev) {
this.setState({preset: ev.target.value})
},
getDefaultProps: function() {
return {
default_preset: 'private_chat',

View File

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