mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-16 00:00:03 +01:00
HTML content: pressing enter doesn't reload page anymore, Orientation: type can now be changed
This commit is contained in:
parent
9f6ee37720
commit
f3d0576dd6
2 changed files with 8 additions and 5 deletions
|
@ -60,15 +60,15 @@ class EditWidgetHTMLContent extends React.Component {
|
|||
|
||||
handleKeyIgnore(event){
|
||||
// This function prevents a keystroke from beeing handled by dialog.js
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
return (
|
||||
<FormGroup controlId={this.props.controlId}>
|
||||
<FormLabel>HTML Content</FormLabel>
|
||||
<FormControl type="text" onKeyPress={this.handleKeyIgnore} componentclass="textarea" style={{ height: 200 }} placeholder={this.props.placeholder} value={this.state.value} onChange={e => this.props.handleChange(e)} />
|
||||
<FormControl onKeyDown={this.handleKeyIgnore} componentclass="textarea" style={{ height: 200 }} placeholder={this.props.placeholder} value={this.state.value} onChange={e => this.props.handleChange(e)} />
|
||||
<FormControl.Feedback />
|
||||
</FormGroup>
|
||||
);
|
||||
|
|
|
@ -38,7 +38,9 @@ class EditWidgetOrientation extends Component {
|
|||
}
|
||||
|
||||
handleOrientationChange(orientation) {
|
||||
this.props.handleChange({ target: { id: 'orientation', value: orientation } });
|
||||
console.log("handle OrinetationChange was called. the orientation: " + orientation);
|
||||
|
||||
this.props.handleChange({ target: { id: 'customProperties.orientation', value: orientation } });
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -55,6 +57,7 @@ class EditWidgetOrientation extends Component {
|
|||
Object.keys(WidgetSlider.OrientationTypes).map( (type) => {
|
||||
let value = WidgetSlider.OrientationTypes[type].value;
|
||||
let name = WidgetSlider.OrientationTypes[type].name;
|
||||
console.log("value: " + value + " name: " + name)
|
||||
|
||||
return (
|
||||
<FormCheck inline label={name} key={value} id={value} type='radio' title='orientation' checked={ value === this.state.widget.customProperties.orientation } onChange={(e) => this.handleOrientationChange(value)}>
|
||||
|
|
Loading…
Add table
Reference in a new issue