Search docs/context/ hierarchically for help.html files to reduce redundancy

This commit is contained in:
Andrew Manning 2016-03-26 14:31:41 -04:00
parent 661b0084f3
commit c25ef1d9a8
6 changed files with 27 additions and 42 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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);
}