49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
|
|
tvheadend.cwceditor = function() {
|
|
var fm = Ext.form;
|
|
|
|
var enabledColumn = new Ext.grid.CheckColumn({
|
|
header: "Enabled",
|
|
dataIndex: 'enabled',
|
|
width: 60
|
|
});
|
|
|
|
var cm = new Ext.grid.ColumnModel([
|
|
enabledColumn,
|
|
{
|
|
header: "Hostname",
|
|
dataIndex: 'hostname',
|
|
width: 200,
|
|
editor: new fm.TextField({allowBlank: false})
|
|
},{
|
|
header: "Port",
|
|
dataIndex: 'port',
|
|
editor: new fm.TextField({allowBlank: false})
|
|
},{
|
|
header: "Username",
|
|
dataIndex: 'username',
|
|
editor: new fm.TextField({allowBlank: false})
|
|
},{
|
|
header: "Password",
|
|
dataIndex: 'password',
|
|
editor: new fm.TextField({allowBlank: false})
|
|
},{
|
|
header: "DES Key",
|
|
dataIndex: 'deskey',
|
|
width: 300,
|
|
editor: new fm.TextField({allowBlank: false})
|
|
},{
|
|
header: "Comment",
|
|
dataIndex: 'comment',
|
|
width: 400,
|
|
editor: new fm.TextField()
|
|
}
|
|
]);
|
|
|
|
var rec = Ext.data.Record.create([
|
|
'enabled','hostname','port','username','password','deskey','comment'
|
|
]);
|
|
|
|
return new tvheadend.tableEditor('Code Word Client', 'cwc', cm, rec,
|
|
[enabledColumn]);
|
|
}
|