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;
|
||||
switch(f.type) {
|
||||
case 'str':
|
||||
if (f.enum) {
|
||||
fields.push(new Ext.form.ComboBox({
|
||||
fieldLabel: f.caption,
|
||||
name: f.id,
|
||||
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;
|
||||
|
||||
case 'bool':
|
||||
|
|
Loading…
Add table
Reference in a new issue