webui: added support for enumerated types in the editor panel
This commit is contained in:
parent
181e925313
commit
2abe546e32
1 changed files with 21 additions and 6 deletions
|
@ -22,12 +22,27 @@ tvheadend.idnode_editor = function(item)
|
||||||
var d = f.rdonly || false;
|
var d = f.rdonly || false;
|
||||||
switch(f.type) {
|
switch(f.type) {
|
||||||
case 'str':
|
case 'str':
|
||||||
fields.push({
|
if (f.enum) {
|
||||||
fieldLabel: f.caption,
|
fields.push(new Ext.form.ComboBox({
|
||||||
name: f.id,
|
fieldLabel: f.caption,
|
||||||
value: f.value,
|
name: f.id,
|
||||||
disabled: d
|
value: f.value,
|
||||||
});
|
mode: 'local',
|
||||||
|
disabled: d,
|
||||||
|
store: f.enum,
|
||||||
|
typeAhead: true,
|
||||||
|
forceSelection: true,
|
||||||
|
triggerAction: 'all',
|
||||||
|
emptyText:'Select ' + f.caption +' ...'
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
fields.push({
|
||||||
|
fieldLabel: f.caption,
|
||||||
|
name: f.id,
|
||||||
|
value: f.value,
|
||||||
|
disabled: d
|
||||||
|
});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bool':
|
case 'bool':
|
||||||
|
|
Loading…
Add table
Reference in a new issue