aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/context/admin/security/help.html3
-rw-r--r--doc/context/channel/help.html24
-rw-r--r--doc/context/cloud/help.html22
-rw-r--r--doc/context/mail/help.html10
-rw-r--r--doc/context/network/help.html26
-rw-r--r--doc/context/photos/help.html22
-rw-r--r--doc/context/profile/help.html22
-rw-r--r--include/nav.php16
-rwxr-xr-xview/tpl/nav.tpl50
9 files changed, 190 insertions, 5 deletions
diff --git a/doc/context/admin/security/help.html b/doc/context/admin/security/help.html
new file mode 100644
index 000000000..e9a741a5e
--- /dev/null
+++ b/doc/context/admin/security/help.html
@@ -0,0 +1,3 @@
+<h3>Security Settings</h3>
+<p>This page contains various administrator settings related to security.</p>
+<p>To save any changes you make to these settings, you must press the Submit button.</p> \ No newline at end of file
diff --git a/doc/context/channel/help.html b/doc/context/channel/help.html
new file mode 100644
index 000000000..810913ff3
--- /dev/null
+++ b/doc/context/channel/help.html
@@ -0,0 +1,24 @@
+<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 profile "wall" in a social network context. Posts created by the channel are displayed according to the observer's viewing permissions.</dd>
+ <dt>Create a Post</dt>
+ <dd>If you have permission to create posts on the channel page, then you will see the post editor at the top.</dd>
+ <dt><a href='#' onclick='contextualHelp1("#tabs-collapse-1", 0); return false;' title="Click to highlight element...">Channel Content Tabs</a></dt>
+ <dd>The channel content tabs are links to other content published by the channel. The <b>About</b> tab links to the channel profile. The <b>Photos</b> tab links to the channel photo galleries. The <b>Files</b> tab links to the general shared files published by the channel.</dd>
+</dl> \ No newline at end of file
diff --git a/doc/context/cloud/help.html b/doc/context/cloud/help.html
new file mode 100644
index 000000000..105947517
--- /dev/null
+++ b/doc/context/cloud/help.html
@@ -0,0 +1,22 @@
+<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 page displays a channel's "cloud" files. The files visible to the observer depend on the individual file permissions set by the channel owner. If you have permission to create/upload files you will see control buttons above the file list.</dd>
+ <dt><a href='#' onclick='contextualHelp1("#tabs-collapse-1", 0); return false;' title="Click to highlight element...">Channel Content Tabs</a></dt>
+ <dd>The channel content tabs are links to other content published by the channel. The <b>About</b> tab links to the channel profile. The <b>Photos</b> tab links to the channel photo galleries. The <b>Files</b> tab links to the general shared files published by the channel.</dd>
+</dl> \ No newline at end of file
diff --git a/doc/context/mail/help.html b/doc/context/mail/help.html
new file mode 100644
index 000000000..a2361a135
--- /dev/null
+++ b/doc/context/mail/help.html
@@ -0,0 +1,10 @@
+<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/network/help.html b/doc/context/network/help.html
new file mode 100644
index 000000000..956af7380
--- /dev/null
+++ b/doc/context/network/help.html
@@ -0,0 +1,26 @@
+<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>The network page displays a stream of posts and conversations, typically ordered by the most recently updated. This page is highly customizable.</dd>
+ <dt><a href='#' onclick='contextualHelp1("#profile-jot-wrapper", 0); return false;' title="Click to highlight element...">Create a Post</a></dt>
+ <dd>At the top of the page there is a text box that says "Share". Clicking this box opens a new post editor. The post editor is customizable, but the basic editor provides fields for a post body and an optional post <b>Title</b>. Buttons below the text area to the left provide shortcuts to text formatting and inserting links, images, and other data into the post. The buttons to the right provide a post preview, the post permissions setting, and a <b>Submit</b> button to send the post.</dd>
+ <dt><a href='#' onclick='contextualHelp1("#group-sidebar", 1); return false;' title="Click to highlight element...">Privacy Groups</a></dt>
+ <dd>The privacy groups you have created are displayed in the side panel. Selecting them filters posts to those created by channels in the chosen group.</dd>
+ <dt><a href='#' onclick='$("#dbtn-acl").click(); return false;' title="Click to highlight element...">Post Permissions</a></dt>
+ <dd>The access control list (ACL) is what you use to set who can see your new post. Pressing the ACL button beside the Submit button will display a dialog in which you can select what channels and/or privacy groups can see the post. You can also select who is explicitly denied access. For example, say you are planning a surprise party for a friend. You can send an invitation post to everyone in your <b>Friends</b> group <i>except</i> the friend you are surprising. In this case you "show" the <b>Friends</b> group but "don't show" that one person.</dd>
+</dl> \ No newline at end of file
diff --git a/doc/context/photos/help.html b/doc/context/photos/help.html
new file mode 100644
index 000000000..f41611f8d
--- /dev/null
+++ b/doc/context/photos/help.html
@@ -0,0 +1,22 @@
+<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 page displays a channel's photo albums. The images visible to the observer depend on the individual image permissions.</dd>
+ <dt><a href='#' onclick='contextualHelp1("#tabs-collapse-1", 0); return false;' title="Click to highlight element...">Channel Content Tabs</a></dt>
+ <dd>The channel content tabs are links to other content published by the channel. The <b>About</b> tab links to the channel profile. The <b>Photos</b> tab links to the channel photo galleries. The <b>Files</b> tab links to the general shared files published by the channel.</dd>
+</dl> \ No newline at end of file
diff --git a/doc/context/profile/help.html b/doc/context/profile/help.html
new file mode 100644
index 000000000..0d4abb8cb
--- /dev/null
+++ b/doc/context/profile/help.html
@@ -0,0 +1,22 @@
+<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 profile page of a channel. It typically displays information describing the channel. If the channel represents a person in a social network, for example, then the profile might provide contact information and other personal details about the person. Channels can have multiple profiles, where the displayed profile depends on the observer.</dd>
+ <dt><a href='#' onclick='contextualHelp1("#tabs-collapse-1", 0); return false;' title="Click to highlight element...">Channel Content Tabs</a></dt>
+ <dd>The channel content tabs are links to other content published by the channel. The <b>About</b> tab links to the channel profile. The <b>Photos</b> tab links to the channel photo galleries. The <b>Files</b> tab links to the general shared files published by the channel.</dd>
+</dl> \ No newline at end of file
diff --git a/include/nav.php b/include/nav.php
index 3f5c7963a..1c40e0adb 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -149,9 +149,19 @@ EOT;
$help_url = z_root() . '/help?f=&cmd=' . App::$cmd;
- if(! get_config('system','hide_help'))
- $nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'),'help_nav_btn');
-
+ if(! get_config('system','hide_help')) {
+ require_once('mod/help.php');
+ $context_help = load_doc_file('doc/context/' . $a->cmd . '/help.html');
+ $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);
+ }
if(! UNO)
$nav['apps'] = array('apps', t('Apps'), "", t('Applications, utilities, links, games'),'apps_nav_btn');
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 3d6809c22..886f73947 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -1,4 +1,45 @@
- <div class="container-fluid">
+<script>
+ $(document).mouseup(function (e)
+ {
+ var container = $("#help-content");
+
+ if (!container.is(e.target) // if the target of the click isn't the container...
+ && container.has(e.target).length === 0 // ... nor a descendant of the container
+ && container.hasClass('help-content-open'))
+ {
+ container.removeClass('help-content-open');
+ }
+ });
+</script>
+<style>
+.help-content {
+ background: rgba(255, 255, 255, 0.9);
+ color: #333333;
+ position: fixed;
+ top: 50px;
+ left: -80%;
+ width: 80%;
+ height: 60%;
+ padding: 20px;
+ transition: left 300ms cubic-bezier(0.17, 0.04, 0.03, 0.94);
+ box-sizing: border-box;
+ border: #CCC thin solid;
+ overflow: auto;
+}
+
+.help-content-open {
+ left: 0px;
+ -moz-box-shadow: 3px 3px 3px #ccc;
+ -webkit-box-shadow: 3px 3px 3px #ccc;
+ box-shadow: 3px 3px 3px #ccc;
+}
+
+.help-content dd {
+ margin-bottom: 1em;
+}
+</style>
+
+<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
<span class="icon-bar"></span>
@@ -189,8 +230,13 @@
{{if $nav.help}}
<li class="{{$sel.help}}">
- <a class="{{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}"><i class="icon-question"></i></a>
+ <a class="{{$nav.help.2}}" target="hubzilla-help" href="{{$nav.help.0}}" title="{{$nav.help.3}}" id="{{$nav.help.4}}" onclick="$('#help-content').toggleClass('help-content-open'); return false;"><i class="icon-question"></i></a>
</li>
+
+ <div id="help-content" class="help-content">
+ {{$nav.help.5}}
+ <p class="pull-right"><a href="{{$nav.help.0}}">Click here for more documentation...</a></p>
+ </div>
{{/if}}
</ul>
</div>