]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI: fix multi-level create selectors, fixes #3380
authorJaroslav Kysela <perex@perex.cz>
Fri, 4 Dec 2015 12:04:24 +0000 (13:04 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 4 Dec 2015 12:04:24 +0000 (13:04 +0100)
src/webui/static/app/caclient.js
src/webui/static/app/esfilter.js
src/webui/static/app/idnode.js
src/webui/static/app/mpegts.js

index b1886dd371fab96638f6f4e2997ae6f14785e998..2661a86c76d56382f4dc45a0e8101070b5834869 100644 (file)
@@ -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: { }
index 46b6f13805f11f86c0c610ec62399bd0968f2836..6e2c50305f63220a2cac6d321156c245aa2ac521 100644 (file)
@@ -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: { }
index 1985de751f39e11c0a0ebe849019e5caf37d98db..716f834bda97c47fb0e63dce6b58dd5ac5374c01 100644 (file)
@@ -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);
index 410faefa3b30cdea4cce8095fb48090192e3fcbc..c83f11fafd184c2b372761c2108892408961b0e2 100644 (file)
@@ -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'