From: Jaroslav Kysela Date: Fri, 4 Dec 2015 19:39:22 +0000 (+0100) Subject: WEBUI: fix the wrong code logic in idnode_editor_field X-Git-Tag: v4.2.1~1368 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1bf77c5b5c0e40f0954ad87246c0593994d57267;p=thirdparty%2Ftvheadend.git WEBUI: fix the wrong code logic in idnode_editor_field --- diff --git a/src/config.c b/src/config.c index 4c42afa6a..ac73f4dd7 100644 --- a/src/config.c +++ b/src/config.c @@ -1949,6 +1949,7 @@ const idclass_t config_class = { .type = PT_U32, .id = "version", .name = N_("Configuration version"), + .desc = N_("AA"), .off = offsetof(config_t, version), .opts = PO_RDONLY | PO_HIDDEN | PO_EXPERT, .group = 1 diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 1db2e3f35..d58199666 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -634,6 +634,31 @@ tvheadend.idnode_editor_field = function(f, conf) if (value == null) value = f['default']; + function postfield(r, f) { + if (f.description) { + r.on('render', function(c) { + Ext.QuickTips.register({ + target: c.getEl(), + text: f.description + }); + Ext.QuickTips.register({ + target: c.wrap, + text: f.description + }); + Ext.QuickTips.register({ + target: c.label, + text: f.description + }); + }); + r.on('beforedestroy', function(c) { + Ext.QuickTips.unregister(c.getEl()); + Ext.QuickTips.unregister(c.wrap); + Ext.QuickTips.unregister(c.label); + }); + } + return r; + } + /* Ordered list */ if (f['enum'] && f.lorder) { @@ -708,6 +733,9 @@ tvheadend.idnode_editor_field = function(f, conf) */ } + if (r) + return postfield(r, f); + /* Singular */ switch (f.type) { case 'bool': @@ -820,28 +848,7 @@ tvheadend.idnode_editor_field = function(f, conf) } - if (f.description) { - r.on('render', function(c) { - Ext.QuickTips.register({ - target: c.getEl(), - text: f.description - }); - Ext.QuickTips.register({ - target: c.wrap, - text: f.description - }); - Ext.QuickTips.register({ - target: c.label, - text: f.description - }); - }); - r.on('beforedestroy', function(c) { - Ext.QuickTips.unregister(c.getEl()); - Ext.QuickTips.unregister(c.wrap); - Ext.QuickTips.unregister(c.label); - }); - } - return r; + return postfield(r, f); }; /*