Change QPro settings to use standard UI toolkit which fixes padding around items before save button.
This commit is contained in:
parent
e1850c31db
commit
94fec0dec1
@ -413,59 +413,53 @@ var settings_view = React.createClass({
|
|||||||
</div>
|
</div>
|
||||||
<div className="section">
|
<div className="section">
|
||||||
<h3>QPro</h3>
|
<h3>QPro</h3>
|
||||||
<form className="inline">
|
{valid_qpro_options.map(function(qpro_option) {
|
||||||
<div className="fields">
|
var player = this.state.player[this.state.version]
|
||||||
{
|
var items = window.qpros[this.state.version].filter(function (qpro) {
|
||||||
valid_qpro_options.map(function(qpro_option) {
|
return qpro.type == qpro_option
|
||||||
var player = this.state.player[this.state.version]
|
});
|
||||||
var items = window.qpros[this.state.version].filter(function (qpro) {
|
var results = {};
|
||||||
return qpro.type == qpro_option
|
items
|
||||||
});
|
.map(function(item) { return { 'id': item.id, 'name': `${item.name}` } })
|
||||||
var results = {};
|
.forEach (value => results[value.id] = value.name);
|
||||||
items
|
return (
|
||||||
.map(function(item) { return { 'id': item.id, 'name': `${item.name}` } })
|
<LabelledSection
|
||||||
.forEach (value => results[value.id] = value.name);
|
className="iidx qprooption"
|
||||||
return (
|
vertical={true}
|
||||||
<div className="field">
|
label={qpro_option}
|
||||||
<b>{qpro_option}</b>
|
>
|
||||||
<br/>
|
<SelectInt
|
||||||
<SelectInt
|
name={qpro_option}
|
||||||
name={qpro_option}
|
value={player.qpro[qpro_option]}
|
||||||
value={player.qpro[qpro_option]}
|
choices={results}
|
||||||
choices={results}
|
onChange={function(choice) {
|
||||||
onChange={function(choice) {
|
var player = this.state.player;
|
||||||
var player = this.state.player;
|
player[this.state.version].qpro[qpro_option] = choice;
|
||||||
player[this.state.version].qpro[qpro_option] = choice;
|
this.setState({
|
||||||
this.setState({
|
player: player,
|
||||||
player: player,
|
qpro_changed: this.setQproChanged(true),
|
||||||
qpro_changed: this.setQproChanged(true),
|
})
|
||||||
})
|
|
||||||
}.bind(this)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}.bind(this))
|
|
||||||
}
|
|
||||||
<div className="field">
|
|
||||||
<input
|
|
||||||
type="submit"
|
|
||||||
value="save"
|
|
||||||
disabled={!this.state.qpro_changed[this.state.version]}
|
|
||||||
onClick={function(event) {
|
|
||||||
this.saveQproOptions(event);
|
|
||||||
}.bind(this)}
|
}.bind(this)}
|
||||||
/>
|
/>
|
||||||
{ this.state.qpro_saving[this.state.version] ?
|
</LabelledSection>
|
||||||
<img className="loading" src={Link.get('static', 'loading-16.gif')} /> :
|
)
|
||||||
null
|
}.bind(this))}
|
||||||
}
|
<input
|
||||||
{ this.state.qpro_saved[this.state.version] ?
|
type="submit"
|
||||||
<span>✓</span> :
|
value="save"
|
||||||
null
|
disabled={!this.state.qpro_changed[this.state.version]}
|
||||||
}
|
onClick={function(event) {
|
||||||
</div>
|
this.saveQproOptions(event);
|
||||||
</div>
|
}.bind(this)}
|
||||||
</form>
|
/>
|
||||||
|
{ this.state.qpro_saving[this.state.version] ?
|
||||||
|
<img className="loading" src={Link.get('static', 'loading-16.gif')} /> :
|
||||||
|
null
|
||||||
|
}
|
||||||
|
{ this.state.qpro_saved[this.state.version] ?
|
||||||
|
<span>✓</span> :
|
||||||
|
null
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className="section">
|
<div className="section">
|
||||||
<h3>Theme</h3>
|
<h3>Theme</h3>
|
||||||
|
@ -65,6 +65,10 @@ div.labelledsection.iidx.themeoption select {
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.labelledsection.iidx.qprooption select {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
div.labelledsection.ddr.option select {
|
div.labelledsection.ddr.option select {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user