From: Jaroslav Kysela Date: Sat, 5 Dec 2015 18:06:57 +0000 (+0100) Subject: WEBUI: Add quick tips configuration to the general config X-Git-Tag: v4.2.1~1363 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3906ce591c9b83e132111611c2d874d3209962d;p=thirdparty%2Ftvheadend.git WEBUI: Add quick tips configuration to the general config --- diff --git a/src/config.c b/src/config.c index e814f10eb..8b90d8b09 100644 --- a/src/config.c +++ b/src/config.c @@ -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", diff --git a/src/config.h b/src/config.h index ec733914b..b31b1ac8f 100644 --- a/src/config.h +++ b/src/config.h @@ -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; diff --git a/src/webui/comet.c b/src/webui/comet.c index b35308ef1..903af03d7 100644 --- a/src/webui/comet.c +++ b/src/webui/comet.c @@ -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) diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index d58199666..74b1a9053 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -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(), diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 92427793a..806e0ddfd 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -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;