From: Jaroslav Kysela Date: Tue, 1 Dec 2015 09:21:59 +0000 (+0100) Subject: idnode property: add PO_EXPERT X-Git-Tag: v4.2.1~1424 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2eb0a8ce3cc1e0c009f2ef8c2cf4f341a66b1c6;p=thirdparty%2Ftvheadend.git idnode property: add PO_EXPERT --- diff --git a/src/prop.c b/src/prop.c index 905135e5d..884205fdf 100644 --- a/src/prop.c +++ b/src/prop.c @@ -466,7 +466,9 @@ prop_serialize_value htsmsg_add_bool(m, "nosave", 1); if (opts & PO_WRONCE) htsmsg_add_bool(m, "wronce", 1); - if (opts & PO_ADVANCED) + if (opts & PO_EXPERT) + htsmsg_add_bool(m, "expert", 1); + else if (opts & PO_ADVANCED) htsmsg_add_bool(m, "advanced", 1); if (opts & PO_HIDDEN) htsmsg_add_bool(m, "hidden", 1); diff --git a/src/prop.h b/src/prop.h index 3c9ba7a5f..cf06b5c17 100644 --- a/src/prop.h +++ b/src/prop.h @@ -44,21 +44,22 @@ typedef enum { /* * Property options */ -#define PO_NONE 0x0000 -#define PO_RDONLY 0x0001 // Property is read-only -#define PO_NOSAVE 0x0002 // Property is transient (not saved) -#define PO_WRONCE 0x0004 // Property is write-once (i.e. on creation) -#define PO_ADVANCED 0x0008 // Property is advanced -#define PO_HIDDEN 0x0010 // Property is hidden (by default) -#define PO_USERAW 0x0020 // Only save the RAW (off) value if it exists -#define PO_SORTKEY 0x0040 // Sort using key (not display value) -#define PO_PASSWORD 0x0080 // String is a password -#define PO_DURATION 0x0100 // For PT_TIME - differentiate between duration and datetime -#define PO_HEXA 0x0200 // Hexadecimal value -#define PO_DATE 0x0400 // Show date only -#define PO_LOCALE 0x0800 // Call tvh_locale_lang on string -#define PO_LORDER 0x1000 // Manage order in lists -#define PO_MULTILINE 0x2000 // Multiline string +#define PO_NONE (0<<0) +#define PO_RDONLY (1<<1) // Property is read-only +#define PO_NOSAVE (1<<2) // Property is transient (not saved) +#define PO_WRONCE (1<<3) // Property is write-once (i.e. on creation) +#define PO_ADVANCED (1<<4) // Property is advanced +#define PO_EXPERT (1<<5) // Property is for experts +#define PO_HIDDEN (1<<6) // Property is hidden (by default) +#define PO_USERAW (1<<7) // Only save the RAW (off) value if it exists +#define PO_SORTKEY (1<<8) // Sort using key (not display value) +#define PO_PASSWORD (1<<9) // String is a password +#define PO_DURATION (1<<10) // For PT_TIME - differentiate between duration and datetime +#define PO_HEXA (1<<11) // Hexadecimal value +#define PO_DATE (1<<12) // Show date only +#define PO_LOCALE (1<<13) // Call tvh_locale_lang on string +#define PO_LORDER (1<<14) // Manage order in lists +#define PO_MULTILINE (1<<15) // Multiline string /* * Property definition diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index d71c33501..1d1f44352 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -761,6 +761,7 @@ tvheadend.idnode_editor_field = function(f, conf) tvheadend.idnode_editor_form = function(d, meta, panel, conf) { var af = []; + var ef = []; var rf = []; var df = []; var groups = null; @@ -808,6 +809,8 @@ tvheadend.idnode_editor_form = function(d, meta, panel, conf) } else { if (p.rdonly) rf.push(f); + else if (p.expert) + ef.push(f); else if (p.advanced) af.push(f); else @@ -891,6 +894,8 @@ tvheadend.idnode_editor_form = function(d, meta, panel, conf) panel.add(newFieldSet({ title: _("Basic Settings"), items: df })); if (af.length) panel.add(newFieldSet({ title: _("Advanced Settings"), items: af })); + if (ef.length) + panel.add(newFieldSet({ title: _("Expert Settings"), items: ef })); if (rf.length) panel.add(newFieldSet({ title: _("Read-only Info"), items: rf, collapsed: 'true'})); }