Last step

- improved watch command (much simpler robofile + truly recursive)
- split all form fields into separate files (JSX)
- improved form to allow multiple fields per row
- added selection react class for multi select using select2
- added missing files for select2 (webpack doesn't include them)
This commit is contained in:
Jonathan Labreuille
2015-10-01 12:25:25 +02:00
parent f143531a1e
commit 9d0ca85490
22 changed files with 586 additions and 375 deletions

View File

@@ -0,0 +1,24 @@
define([
'react'
],
function(
React
) {
var FormFieldText = React.createClass({
render: function() {
return (
<input
type="text"
className={ (this.props.field.size) ? '' : 'regular-text' }
size={ (this.props.field.size !== 'auto') ? this.props.field.size : false }
name={ this.props.field.name }
id={ 'field_'+this.props.field.name }
value={ this.props.item[this.props.field.name] }
placeholder={ this.props.field.placeholder }
onChange={ this.props.onValueChange } />
);
}
});
return FormFieldText;
});