Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
idnode property: add PO_EXPERT
  • Loading branch information
perexg committed Dec 1, 2015
1 parent 257f19d commit e2eb0a8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
4 changes: 3 additions & 1 deletion src/prop.c
Expand Up @@ -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);
Expand Down
31 changes: 16 additions & 15 deletions src/prop.h
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/webui/static/app/idnode.js
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'}));
}
Expand Down

0 comments on commit e2eb0a8

Please sign in to comment.