]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
mdhelp: more help tweaks webui: add toolbar and "back to top" button to help window
authormpmc <git@markclarkstone.co.uk>
Mon, 20 Nov 2017 17:19:38 +0000 (17:19 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 14 Dec 2017 07:18:16 +0000 (08:18 +0100)
docs/class/mpegts_mux.md
docs/class/mpegts_mux_sched.md
docs/class/mpegts_service.md
docs/markdown/inc/networks_contents.md
src/esfilter.c
src/webui/doc_md.c
src/webui/static/app/tvheadend.js

index 14192d74abdc5cc9b91a6987c8e81b6fa28195a8..e515e08e079a9affec2c029c6d09f6a6f8985722 100644 (file)
@@ -3,6 +3,8 @@ Contents                               | Description
 [Overview](#overview)                  | Tab overview
 [Items/Properties](#items)             | Items and Properties
 
+[Return to DVB Inputs](dvbinputs)
+
 ---
 
 ## Overview
@@ -22,4 +24,3 @@ streams - so an IP address, in effect.
 <tvh_include>inc/buttons</tvh_include>
 
 ---
-
index 8b176f4a1c8469cddb8eda8bf8ce65f944ace65e..65a4f173ae8f7212344e63a134ea2100258a589d 100644 (file)
@@ -3,6 +3,8 @@ Contents                               | Description
 [Overview](#overview)                  | Tab overview
 [Items/Properties](#items)             | Items and Properties
 
+[Return to DVB Inputs](dvbinputs)
+
 ---
 
 ## Overview
@@ -19,4 +21,3 @@ useful to get EPG, services or access rights updates.
 <tvh_include>inc/buttons</tvh_include>
 
 ---
-
index 2e76befe4e0fa78cafcb83542c5288243553cf5d..77ae6f26e8c4b4808c93b2cf17bba5f1f7d89b63 100644 (file)
@@ -4,6 +4,8 @@ Contents                                   | Description
 [Service information](#service-information)| How to display service information
 [Items/Properties](#items)                 | Items and Properties
 
+[Return to DVB Inputs](dvbinputs)
+
 ---
 
 ## Overview
index e68f5b5360a8869d6ed49da133d1b64da2b1162e..efefa72b8d73ae9b0d21aab83df50db54f955c02 100644 (file)
@@ -5,3 +5,5 @@ Contents                                                    | Description
 [Force Scanning](#force-scanning)                           | Force scanning a network
 [Service Probing (IPTV only)](#service-probing-iptv-only-)  | Service probing information (IPTV only)
 [Items/Properties](#items)                                  | Items and properties
+
+[Return to DVB Inputs](dvbinputs)
index 42fc856abdd76d60fba8b5b151aa1d7ea1dbb0dc..76b2097baba8c6420a700c18db3af5ae3be51a31 100644 (file)
@@ -632,6 +632,7 @@ const idclass_t esfilter_class_video = {
       .set      = esfilter_class_type_set_video,
       .list     = esfilter_class_type_enum_video,
       .rend     = esfilter_class_type_rend,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
@@ -726,6 +727,7 @@ const idclass_t esfilter_class_audio = {
       .set      = esfilter_class_type_set_audio,
       .list     = esfilter_class_type_enum_audio,
       .rend     = esfilter_class_type_rend,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
@@ -821,6 +823,7 @@ const idclass_t esfilter_class_teletext = {
       .set      = esfilter_class_type_set_teletext,
       .list     = esfilter_class_type_enum_teletext,
       .rend     = esfilter_class_type_rend,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
@@ -1011,6 +1014,7 @@ const idclass_t esfilter_class_ca = {
       .set      = esfilter_class_type_set_ca,
       .list     = esfilter_class_type_enum_ca,
       .rend     = esfilter_class_type_rend,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
@@ -1021,6 +1025,7 @@ const idclass_t esfilter_class_ca = {
       .get      = esfilter_class_caid_get,
       .set      = esfilter_class_caid_set,
       .list     = esfilter_class_caid_enum,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
@@ -1031,6 +1036,7 @@ const idclass_t esfilter_class_ca = {
       .get      = esfilter_class_caprovider_get,
       .set      = esfilter_class_caprovider_set,
       .list     = esfilter_class_caprovider_enum,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
@@ -1116,6 +1122,7 @@ const idclass_t esfilter_class_other = {
       .set      = esfilter_class_type_set_other,
       .list     = esfilter_class_type_enum_other,
       .rend     = esfilter_class_type_rend,
+      .opts     = PO_DOC_NLIST,
     },
     {
       .type     = PT_STR,
index 3a7717fc3b8754355f13bc12850279ae4bd42ce6..da14e68a97fa45be84c36e9acdee3e596864ac94 100644 (file)
@@ -114,12 +114,12 @@ md_props(htsbuf_queue_t *hq, htsmsg_t *m, const char *lang, int nl)
     if (!s) continue;
     if (first) {
       nl = md_nl(hq, nl);
-      htsbuf_append_str(hq, "#### ");
+      htsbuf_append_str(hq, "### ");
       htsbuf_append_str(hq, tvh_gettext_lang(lang, N_("Items")));
       md_nl(hq, 1);
       md_nl(hq, 1);
-      htsbuf_append_str(hq, tvh_gettext_lang(lang, N_("The items have the following functions:")));
-      md_nl(hq, 1);
+      //htsbuf_append_str(hq, tvh_gettext_lang(lang, N_("The items have the following functions:")));
+      //md_nl(hq, 1);
       first = 0;
     }
     nl = md_nl(hq, nl);
index 7af36fd298dd45dde744b670abd20089ef700147..506087c3d8ce91c6b19f3f22956375f129c001ac 100644 (file)
@@ -385,6 +385,7 @@ tvheadend.mdhelp = function(pagename) {
 
     var parse = function(text) {
         var renderer = new marked.Renderer;
+        var lastanchor = null;
         renderer.link = function(href, title, text) {
             var x = href.indexOf('#');
             if (href.indexOf(':/') === -1 && (x === -1 || x > 1)) {
@@ -439,7 +440,7 @@ tvheadend.mdhelp = function(pagename) {
         }
 
         var bodyid = Ext.id();
-        var text = '<div id="' + bodyid + '">';
+        var text = '<div id="jump"></div><div id="' + bodyid + '">';
         if (tvheadend.docs_toc || history)
             text += '<div class="hts-doc-toc">' + history + tvheadend.docs_toc + '</div>';
         text += '<div class="hts-doc-text">' + parse(mdtext) + '</div>';
@@ -485,12 +486,21 @@ tvheadend.mdhelp = function(pagename) {
         }
 
         var win = new Ext.Window({
-            title: _('Help for') + ' ' + title,
+            title: title,
             iconCls: 'help',
             layout: 'fit',
             width: 900,
             height: 400,
             constrainHeader: true,
+            bbar: [
+            {
+                iconCls: 'moveup',
+                text: _('Back to top'),
+                tooltip: _('Back to top'),
+                handler: function() {
+                    document.getElementById('jump').scrollIntoView();
+                },
+            }],
             items: [content],
             listeners: {
                 render: function(win) {
@@ -542,24 +552,25 @@ tvheadend.mdhelp = function(pagename) {
     var helpfailuremsg = function() {
         Ext.MessageBox.show({
             title:_('Error'),
-            msg: _('There was a problem displaying the Help!') + '<br>' + 
-                 _('Please check Tvheadend is running and try again.'), 
+            msg: _('There was a problem displaying the Help!') + '<br>' +
+                 _('Please check Tvheadend is running and try again.'),
             buttons: Ext.Msg.OK,
             icon: Ext.MessageBox.ERROR,
         });
     }
-    
-    var helppagefail = function() { 
+
+    var helppagefail = function() {
         title = _('Not Available');
-        msg = _('There is no documentation associated with the Help button pressed, or there was an problem loading the page.\n\n') + 
-              _('Please take a look at the other Help pages (Table of Contents). If you still can\'t find what you\'re ') + 
-              _('looking for please see the [Wiki](http://tvheadend.org/projects/tvheadend/wiki) ') + 
+        msg = _('There\'s no documentation available, or there was a problem loading the page.\n\n') +
+              _('**You\'ll also see this page if you try and view documentation (for a feature) not included with your version of Tvheadend.**\n\n\n\n') +
+              _('Please take a look at the other Help pages (Table of Contents), if you still can\'t find what you\'re ') +
+              _('looking for please see the [Wiki](http://tvheadend.org/projects/tvheadend/wiki) ') +
               _('or join the [IRC channel on freenode](https://kiwiirc.com/client/chat.freenode.net/?nick=tvhhelp|?#hts).');
-              
+
         // Fake the result.
         result = [];
         result['responseText'] = "## " + title + '\n\n' + msg;
-        
+
         // Load the TOC.
         if (!tvheadend.docs_toc) {
             Ext.Ajax.request({
@@ -648,7 +659,7 @@ tvheadend.AjaxUUID = function(sel, conf)
             conf.params = {};
         conf.params.uuid = Ext.encode(uuids);
         tvheadend.Ajax(conf);
-    }    
+    }
 }
 
 tvheadend.loading = function(on) {
@@ -840,7 +851,7 @@ tvheadend.VideoPlayer = function(channelId) {
     var videoPlayer = new tv.ui.VideoPlayer({
         params: { }
     });
-    
+
     var initialChannelName;
     if (channelId) {
         var record = tvheadend.channels.getById(channelId);
@@ -992,7 +1003,7 @@ tvheadend.VideoPlayer = function(channelId) {
             videoPlayer.zapTo(channelId);
         }
     });
-    
+
     win.on('close', function() {
         videoPlayer.stop();
     });