[#38: Enhance new repertory release available notification - partial] [Added FocusTrap to modals]
This commit is contained in:
@@ -18,7 +18,7 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
const handleChanged = (e) => {
|
||||
const target = e.target;
|
||||
if (target.type === 'checkbox') {
|
||||
target.value = e.target.checked ? "true" : "false";
|
||||
target.value = e.target.checked ? 'true' : 'false';
|
||||
}
|
||||
props.changed(target);
|
||||
};
|
||||
@@ -30,49 +30,54 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
props.notifyInfo(props.label, description);
|
||||
};
|
||||
|
||||
infoDisplay = <a href={void(0)}
|
||||
className={'ConfigurationInfo'}
|
||||
onClick={()=>{displayInfo(); return false;}}><FontAwesomeIcon icon={faInfoCircle}/></a>;
|
||||
infoDisplay = <a href={'#'}
|
||||
className={'ConfigurationInfo'}
|
||||
onClick={()=>{displayInfo(); return false;}}><FontAwesomeIcon icon={faInfoCircle}/></a>;
|
||||
}
|
||||
|
||||
|
||||
let data;
|
||||
switch (props.template.type) {
|
||||
case "bool":
|
||||
case 'bool':
|
||||
data = <CheckBox changed={handleChanged}
|
||||
checked={props.value}
|
||||
disabled={props.readOnly}/>;
|
||||
disabled={props.readOnly}
|
||||
autoFocus={props.autoFocus}/>;
|
||||
break;
|
||||
|
||||
case "double":
|
||||
case 'double':
|
||||
data = <input min={0.0}
|
||||
autoFocus={props.autoFocus}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
step={"0.01"}
|
||||
step={'0.01'}
|
||||
className={'ConfigurationItemInput'}
|
||||
type={'number'}
|
||||
value={parseFloat(props.value).toFixed(2)}/>;
|
||||
break;
|
||||
|
||||
case "list":
|
||||
case 'list':
|
||||
data = <DropDown alt
|
||||
auto
|
||||
autoFocus={props.autoFocus}
|
||||
changed={handleChanged}
|
||||
disabled={props.readOnly}
|
||||
items={props.items}
|
||||
selected={props.value} />;
|
||||
break;
|
||||
|
||||
case "string":
|
||||
case 'string':
|
||||
data = <input onChange={e=>handleChanged(e)}
|
||||
autoFocus={props.autoFocus}
|
||||
className={'ConfigurationItemInput'}
|
||||
disabled={props.readOnly}
|
||||
type={'text'}
|
||||
value={props.value}/>;
|
||||
break;
|
||||
|
||||
case "uint8":
|
||||
case 'uint8':
|
||||
data = <input max={255}
|
||||
min={0}
|
||||
autoFocus={props.autoFocus}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
className={'ConfigurationItemInput'}
|
||||
@@ -80,9 +85,10 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
value={props.value}/>;
|
||||
break;
|
||||
|
||||
case "uint16":
|
||||
case 'uint16':
|
||||
data = <input max={65535}
|
||||
min={0}
|
||||
autoFocus={props.autoFocus}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
className={'ConfigurationItemInput'}
|
||||
@@ -90,9 +96,10 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
value={props.value}/>;
|
||||
break;
|
||||
|
||||
case "uint32":
|
||||
case 'uint32':
|
||||
data = <input max={4294967295}
|
||||
min={0}
|
||||
autoFocus={props.autoFocus}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
className={'ConfigurationItemInput'}
|
||||
@@ -100,9 +107,10 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
value={props.value}/>;
|
||||
break;
|
||||
|
||||
case "uint64":
|
||||
case 'uint64':
|
||||
data = <input max={18446744073709551615}
|
||||
min={0}
|
||||
autoFocus={props.autoFocus}
|
||||
disabled={props.readOnly}
|
||||
onChange={e=>handleChanged(e)}
|
||||
className={'ConfigurationItemInput'}
|
||||
@@ -129,4 +137,4 @@ export default connect(null, mapDispatchToProps)(props => {
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user