From: Jaroslav Kysela Date: Fri, 4 Dec 2015 12:04:24 +0000 (+0100) Subject: WEBUI: fix multi-level create selectors, fixes #3380 X-Git-Tag: v4.2.1~1373 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b6862b49a5ad488b733342a680cca3a335bce707;p=thirdparty%2Ftvheadend.git WEBUI: fix multi-level create selectors, fixes #3380 --- diff --git a/src/webui/static/app/caclient.js b/src/webui/static/app/caclient.js index b1886dd37..2661a86c7 100644 --- a/src/webui/static/app/caclient.js +++ b/src/webui/static/app/caclient.js @@ -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 }); @@ -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: { } diff --git a/src/webui/static/app/esfilter.js b/src/webui/static/app/esfilter.js index 46b6f1380..6e2c50305 100644 --- a/src/webui/static/app/esfilter.js +++ b/src/webui/static/app/esfilter.js @@ -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 }); @@ -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: { } diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 1985de751..716f834bd 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -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 = {}; @@ -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); diff --git a/src/webui/static/app/mpegts.js b/src/webui/static/app/mpegts.js index 410faefa3..c83f11faf 100644 --- a/src/webui/static/app/mpegts.js +++ b/src/webui/static/app/mpegts.js @@ -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 }); @@ -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'