]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
idnode property: add PO_EXPERT
authorJaroslav Kysela <perex@perex.cz>
Tue, 1 Dec 2015 09:21:59 +0000 (10:21 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 1 Dec 2015 09:21:59 +0000 (10:21 +0100)
src/prop.c
src/prop.h
src/webui/static/app/idnode.js

index 905135e5dd023c54b2f0933bff850929d4e41223..884205fdf4728218d0257360b42565d023d8c25a 100644 (file)
@@ -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);
index 3c9ba7a5f81dc4cf62e32d9296c424932d78bcf9..cf06b5c17b9d616dbf7502a2b683387e267a3b7d 100644 (file)
@@ -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
index d71c33501ef825cf4856bfa3bdd88e54e7a7f9c7..1d1f443525c077fcdaa8d851e89d4e32c586218b 100644 (file)
@@ -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'}));
     }