webui: use the same editor field constructor for the grid view
This includes enumerated combo boxes as required for channel selection.
This commit is contained in:
parent
5a4416bbb6
commit
39766d4570
1 changed files with 2 additions and 14 deletions
|
@ -272,20 +272,8 @@ tvheadend.idnode_grid = function(panel, conf)
|
|||
for (i = 0; i < d.length; i++) {
|
||||
var type = 'string';
|
||||
var edit = null;
|
||||
if (d[i].type == 'int' || d[i].type == 'u16' || d[i].type == 'u32') {
|
||||
type = 'numeric';
|
||||
if (!d[i].rdonly)
|
||||
edit = new Ext.form.NumberField({
|
||||
// TODO: min/max
|
||||
})
|
||||
} else if (d[i].type == 'bool') {
|
||||
type = 'boolean';
|
||||
if (!d[i].rdonly)
|
||||
edit = new Ext.form.Checkbox({});
|
||||
} else if (d[i].type == 'str') {
|
||||
if (!d[i].rdonly)
|
||||
edit = new Ext.form.TextField({});
|
||||
}
|
||||
if (!d[i].rdonly && !d[i].wronce)
|
||||
edit = tvheadend.idnode_editor_field(d[i]);
|
||||
fields.push(d[i].id)
|
||||
columns.push({
|
||||
dataIndex: d[i].id,
|
||||
|
|
Loading…
Add table
Reference in a new issue