diff --git a/src/www/head.inc b/src/www/head.inc index aa02e9148..068eaf7eb 100644 --- a/src/www/head.inc +++ b/src/www/head.inc @@ -100,9 +100,23 @@ $pagetitle = gentitle( $pgtitle ); // link showhelp class behavior $("a[class='showhelp']").click(function (event) { - $("*[for='" + $(this).attr('id') + "']").toggleClass("hidden show"); - event.preventDefault(); - }); + $("*[for='" + $(this).attr('id') + "']").toggleClass("hidden show"); + event.preventDefault(); + }); + + // handle all help messages show/hide + $('[id*="show_all_help"]').click(function(event) { + $('[id*="show_all_help"]').toggleClass("fa-toggle-on fa-toggle-off"); + $('[id*="show_all_help"]').toggleClass("text-success text-danger"); + if ($('[id*="show_all_help"]').hasClass("fa-toggle-on")) { + $('[for*="help_for"]').addClass("show"); + $('[for*="help_for"]').removeClass("hidden"); + } else { + $('[for*="help_for"]').addClass("hidden"); + $('[for*="help_for"]').removeClass("show"); + } + event.preventDefault(); + }); }); //]]>