Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI: fix multi-level create selectors, fixes #3380
  • Loading branch information
perexg committed Dec 4, 2015
1 parent d820aa0 commit b6862b4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/webui/static/app/caclient.js
Expand Up @@ -8,7 +8,7 @@ tvheadend.caclient = function(panel, index) {
tvheadend.caclient_builders = new Ext.data.JsonStore({
url: 'api/caclient/builders',
root: 'entries',
fields: ['class', 'caption', 'props'],
fields: ['class', 'caption', 'order', 'groups', 'props'],
id: 'class',
autoLoad: true
});
Expand Down Expand Up @@ -46,9 +46,9 @@ tvheadend.caclient = function(panel, index) {
select: {
label: _('Type'),
store: tvheadend.caclient_builders,
fullRecord: true,
displayField: 'caption',
valueField: 'class',
propField: 'props',
list: list
},
create: { }
Expand Down
4 changes: 2 additions & 2 deletions src/webui/static/app/esfilter.js
Expand Up @@ -8,7 +8,7 @@ tvheadend.esfilter_tab = function(panel)
tvheadend.profile_builders = new Ext.data.JsonStore({
url: 'api/profile/builders',
root: 'entries',
fields: ['class', 'caption', 'props'],
fields: ['class', 'caption', 'order', 'groups', 'params'],
id: 'class',
autoLoad: true
});
Expand All @@ -31,9 +31,9 @@ tvheadend.esfilter_tab = function(panel)
select: {
label: _('Type'),
store: tvheadend.profile_builders,
fullRecord: true,
displayField: 'caption',
valueField: 'class',
propField: 'props',
list: list
},
create: { }
Expand Down
8 changes: 4 additions & 4 deletions src/webui/static/app/idnode.js
Expand Up @@ -860,7 +860,7 @@ tvheadend.idnode_editor_form = function(uilevel, d, meta, panel, conf)
]
});
}
if (p.group && meta.groups) {
if (p.group && meta && meta.groups) {
f.tvh_uilevel = p.expert ? 'expert' : (p.advanced ? 'advanced' : 'basic');
if (!groups)
groups = {};
Expand Down Expand Up @@ -1268,17 +1268,17 @@ tvheadend.idnode_create = function(conf, onlyDefault)
});
}
var select = null;
if (conf.select.propField) {
if (conf.select.fullRecord) {
select = function(s, n, o) {
var r = store.getAt(s.selectedIndex);
if (r) {
var d = r.get(conf.select.propField);
var d = r.json.props;
if (d) {
d = tvheadend.idnode_filter_fields(d, conf.select.list || null);
pclass = r.get(conf.select.valueField);
win.setTitle(String.format(_('Add {0}'), s.lastSelectionText));
panel.remove(s);
tvheadend.idnode_editor_form(uilevel, d, null, panel, { create: true, showpwd: true });
tvheadend.idnode_editor_form(uilevel, d, r.json, panel, { create: true, showpwd: true });
saveBtn.setVisible(true);
applyBtn.setVisible(true);
win.setOriginSize(true);
Expand Down
6 changes: 3 additions & 3 deletions src/webui/static/app/mpegts.js
Expand Up @@ -16,7 +16,7 @@ tvheadend.networks = function(panel, index)
tvheadend.network_builders = new Ext.data.JsonStore({
url: 'api/mpegts/network/builders',
root: 'entries',
fields: ['class', 'caption', 'props'],
fields: ['class', 'caption', 'order', 'groups', 'props'],
id: 'class',
autoLoad: true
});
Expand Down Expand Up @@ -76,9 +76,9 @@ tvheadend.networks = function(panel, index)
select: {
label: _('Type'),
store: tvheadend.network_builders,
fullRecord: true,
displayField: 'caption',
valueField: 'class',
propField: 'props'
valueField: 'class'
},
create: {
url: 'api/mpegts/network/create'
Expand Down

0 comments on commit b6862b4

Please sign in to comment.