aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Manning <andrew@reticu.li>2016-03-26 14:31:41 -0400
committerAndrew Manning <andrew@reticu.li>2016-03-26 14:31:41 -0400
commitc25ef1d9a86193eb5b96484d9bfaae0bd4166653 (patch)
tree07f5cc158af2394f29a4273dab504d64e26946f4
parent661b0084f3d819532c4c97c840a189d7e0c7a93d (diff)
downloadvolse-hubzilla-c25ef1d9a86193eb5b96484d9bfaae0bd4166653.tar.gz
volse-hubzilla-c25ef1d9a86193eb5b96484d9bfaae0bd4166653.tar.bz2
volse-hubzilla-c25ef1d9a86193eb5b96484d9bfaae0bd4166653.zip
Search docs/context/ hierarchically for help.html files to reduce redundancy
-rw-r--r--doc/context/channel/help.html20
-rw-r--r--doc/context/mail/combined/help.html10
-rw-r--r--doc/context/mail/inbox/help.html10
-rw-r--r--doc/context/mail/new/help.html10
-rw-r--r--doc/context/mail/outbox/help.html10
-rw-r--r--include/nav.php9
6 files changed, 27 insertions, 42 deletions
diff --git a/doc/context/channel/help.html b/doc/context/channel/help.html
new file mode 100644
index 000000000..8c3d1e422
--- /dev/null
+++ b/doc/context/channel/help.html
@@ -0,0 +1,20 @@
+<script>
+ var contextualHelp1 = function (target, openSidePanel) {
+ $("#help-content").removeClass('help-content-open'); // Close the help panel
+ $("#navbar-collapse-1").removeClass('in'); // Collapse the navbar for small screens
+ if (openSidePanel) {
+ $("main").addClass('region_1-on'); // Open the side panel to highlight element
+ } else {
+ $("main").removeClass('region_1-on');
+ }
+ // Animate the page scroll to the element and then pulse the element to direct attention
+ $('html,body').animate({scrollTop: $(target).offset().top - $('#navbar-collapse-1').height() - 20}, 'slow');
+ for (i = 0; i < 3; i++) {
+ $(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0);
+ }
+ }
+</script>
+<dl class="dl-horizontal">
+ <dt>General</dt>
+ <dd>This is the home page of a channel. It is similar to someone's "wall" in a social network context.</dd>
+</dl> \ No newline at end of file
diff --git a/doc/context/mail/combined/help.html b/doc/context/mail/combined/help.html
deleted file mode 100644
index a2361a135..000000000
--- a/doc/context/mail/combined/help.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<dl class="dl-horizontal">
- <dt>General</dt>
- <dd>The messages displayed in private mail are visible only to you and the single recipient. </dd>
- <dt>Combined View</dt>
- <dd>Complete conversations can be viewed in a continuous thread by selecting <b>Combined View</b>. Available conversations are displayed beneath the menu in the side panel.</dd>
- <dt>Inbox/Outbox</dt>
- <dd>Individual sent messages are viewed by selecting <b>Outbox</b>, and incoming messages are viewed using the <b>Inbox</b> filter.</dd>
- <dt>New Message</dt>
- <dd>Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message <i>if they have not already read it</i>.</dd>
-</dl> \ No newline at end of file
diff --git a/doc/context/mail/inbox/help.html b/doc/context/mail/inbox/help.html
deleted file mode 100644
index a2361a135..000000000
--- a/doc/context/mail/inbox/help.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<dl class="dl-horizontal">
- <dt>General</dt>
- <dd>The messages displayed in private mail are visible only to you and the single recipient. </dd>
- <dt>Combined View</dt>
- <dd>Complete conversations can be viewed in a continuous thread by selecting <b>Combined View</b>. Available conversations are displayed beneath the menu in the side panel.</dd>
- <dt>Inbox/Outbox</dt>
- <dd>Individual sent messages are viewed by selecting <b>Outbox</b>, and incoming messages are viewed using the <b>Inbox</b> filter.</dd>
- <dt>New Message</dt>
- <dd>Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message <i>if they have not already read it</i>.</dd>
-</dl> \ No newline at end of file
diff --git a/doc/context/mail/new/help.html b/doc/context/mail/new/help.html
deleted file mode 100644
index a2361a135..000000000
--- a/doc/context/mail/new/help.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<dl class="dl-horizontal">
- <dt>General</dt>
- <dd>The messages displayed in private mail are visible only to you and the single recipient. </dd>
- <dt>Combined View</dt>
- <dd>Complete conversations can be viewed in a continuous thread by selecting <b>Combined View</b>. Available conversations are displayed beneath the menu in the side panel.</dd>
- <dt>Inbox/Outbox</dt>
- <dd>Individual sent messages are viewed by selecting <b>Outbox</b>, and incoming messages are viewed using the <b>Inbox</b> filter.</dd>
- <dt>New Message</dt>
- <dd>Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message <i>if they have not already read it</i>.</dd>
-</dl> \ No newline at end of file
diff --git a/doc/context/mail/outbox/help.html b/doc/context/mail/outbox/help.html
deleted file mode 100644
index a2361a135..000000000
--- a/doc/context/mail/outbox/help.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<dl class="dl-horizontal">
- <dt>General</dt>
- <dd>The messages displayed in private mail are visible only to you and the single recipient. </dd>
- <dt>Combined View</dt>
- <dd>Complete conversations can be viewed in a continuous thread by selecting <b>Combined View</b>. Available conversations are displayed beneath the menu in the side panel.</dd>
- <dt>Inbox/Outbox</dt>
- <dd>Individual sent messages are viewed by selecting <b>Outbox</b>, and incoming messages are viewed using the <b>Inbox</b> filter.</dd>
- <dt>New Message</dt>
- <dd>Individual messages have delivery reports that can be viewed using the drop-down menu. Messages can also be recalled from the same menu, which can prevent the recipient from viewing the message <i>if they have not already read it</i>.</dd>
-</dl> \ No newline at end of file
diff --git a/include/nav.php b/include/nav.php
index c7483deef..d449718b8 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -154,8 +154,13 @@ EOT;
if(! get_config('system','hide_help')) {
require_once('mod/help.php');
$context_help = load_doc_file('doc/context/' . $a->cmd . '/help.html');
- if (! $context_help) {
- $context_help = '';
+ $parentdir = dirname($a->cmd);
+ while (! $context_help && $parentdir !== '.') {
+ $context_help = load_doc_file('doc/context/' . $parentdir . '/help.html');
+ $parentdir = dirname($parentdir);
+ }
+ if (! $context_help ) {
+ $context_help = '';
}
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn',$context_help);
}