Introduce context -sensitive help

This allows for help of individual settings by clicking on the specific
setting context.
This commit is contained in:
bergware
2016-03-20 19:04:02 +01:00
parent 63a460d787
commit 0aab843889
2 changed files with 12 additions and 10 deletions
+7 -8
View File
@@ -3,8 +3,8 @@ Title="Help"
Icon="help.png"
---
<?PHP
/* Copyright 2015, Lime Technology
* Copyright 2015, Bergware International.
/* Copyright 2015-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -16,13 +16,12 @@ Icon="help.png"
?>
<script>
function HelpButton() {
$('.inline_help').toggle('slow');
$('#nav-item.HelpButton').toggleClass('active');
if ($.cookie('help')==null) {
$.cookie('help','help',{path:'/'}); var help = 'on';
if ($('#nav-item.HelpButton').toggleClass('active').hasClass('active')) {
$('.inline_help').show('slow');
$.cookie('help','help',{path:'/'});
} else {
$.removeCookie('help',{path:'/'}); var help = 'off';
$('.inline_help').hide('slow');
$.removeCookie('help',{path:'/'});
}
//swal({title:'Help is '+help.toUpperCase(),imageUrl:'/webGui/images/help-'+help+'.png',timer:1500,animation:'slide-from-top',showConfirmButton:false});
}
</script>
@@ -1,6 +1,6 @@
<?PHP
/* Copyright 2015, Lime Technology
* Copyright 2015, Bergware International.
/* Copyright 2015-2016, Lime Technology
* Copyright 2015-2016, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
@@ -330,6 +330,9 @@ $(function() {
var top = ($.cookie('top')||0) - $('.tabs').offset().top - 75;
if (top>0) {$('html,body').scrollTop(top);}
$.removeCookie('top',{path:'/'});
$('blockquote.inline_help').each(function(i){
$(this).attr('id','helpinfo'+i).prev().children().first().css('cursor','help').click(function(){$('#helpinfo'+i).toggle('slow');});
});
});
</script>
</body>