]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI: Add quick tips configuration to the general config
authorJaroslav Kysela <perex@perex.cz>
Sat, 5 Dec 2015 18:06:57 +0000 (19:06 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 5 Dec 2015 18:06:57 +0000 (19:06 +0100)
src/config.c
src/config.h
src/webui/comet.c
src/webui/static/app/idnode.js
src/webui/static/app/tvheadend.js

index e814f10ebd2efec4770e8d22606304194ed86d86..8b90d8b09653d21ca8abcb044964d2eadbba7a60 100644 (file)
@@ -1626,6 +1626,7 @@ config_boot ( const char *path, gid_t gid, uid_t uid )
 
   memset(&config, 0, sizeof(config));
   config.idnode.in_class = &config_class;
+  config.ui_quicktips = 1;
   config.wizard = strdup("hello");
   config.info_area = strdup("login,storage,time");
   config.cookie_expires = 7;
@@ -1992,6 +1993,15 @@ const idclass_t config_class = {
       .opts   = PO_ADVANCED,
       .group  = 1
     },
+    {
+      .type   = PT_BOOL,
+      .id     = "ui_quicktips",
+      .name   = N_("User interface quick tips"),
+      .desc   = N_("Allow to show the quick tips for the form fields."),
+      .off    = offsetof(config_t, ui_quicktips),
+      .opts   = PO_ADVANCED,
+      .group  = 1
+    },
     {
       .type   = PT_U32,
       .id     = "cookie_expires",
index ec733914b1ba633fb59574f58e423d0a04d9c05e..b31b1ac8f94c11003a417b5799ea34d12c2f3354 100644 (file)
@@ -32,6 +32,7 @@ typedef struct config {
   uint32_t version;
   int uilevel;
   int uilevel_nochange;
+  int ui_quicktips;
   char *wizard;
   char *full_version;
   char *server_name;
index b35308ef11e16f6b9118760d48ae99bab076a27f..903af03d7200129447af90e51cd92cad729f80f1 100644 (file)
@@ -166,6 +166,7 @@ comet_access_update(http_connection_t *hc, comet_mailbox_t *cmb)
     if (config.uilevel_nochange)
       htsmsg_add_u32(m, "uilevel_nochange", config.uilevel_nochange);
   }
+  htsmsg_add_u32(m, "quicktips", config.ui_quicktips);
   if (!access_noacl)
     htsmsg_add_str(m, "username", username);
   if (hc->hc_peer_ipstr)
index d581996660edf9c4fdafacfd345bacef0f539da4..74b1a90536715dac47e6649a9dab1c7932181a77 100644 (file)
@@ -635,7 +635,7 @@ tvheadend.idnode_editor_field = function(f, conf)
         value = f['default'];
 
     function postfield(r, f) {
-        if (f.description) {
+        if (f.description && tvheadend.quicktips) {
             r.on('render', function(c) {
                  Ext.QuickTips.register({
                      target: c.getEl(),
index 92427793a4eabfb5c1e750bce8785001ff76cf47..806e0ddfd076a066a688f7612f7c8a3a50c4cab9 100644 (file)
@@ -5,6 +5,7 @@ tvheadend.admin = false;
 tvheadend.dialog = null;
 tvheadend.uilevel = 'expert';
 tvheadend.uilevel_nochange = false;
+tvheadend.quicktips = true;
 tvheadend.wizard = null;
 
 tvheadend.cookieProvider = new Ext.state.CookieProvider({
@@ -424,6 +425,8 @@ function accessUpdate(o) {
 
     if (o.uilevel)
         tvheadend.uilevel = o.uilevel;
+        
+    tvheadend.quicktips = o.quicktips;
 
     if (o.uilevel_nochange)
         tvheadend.uilevel_nochange = true;