From 2cb04ccb8fb2fcbea181f6bf82f0d2a9a848d57a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 15 Apr 2016 12:39:22 +0200 Subject: nav: move js and css out of template, provide a help button in the panel on small screens and lots of whitespace cleanup --- view/theme/redbasic/js/redbasic.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'view/theme/redbasic/js/redbasic.js') diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 877bcd840..b4cde6efc 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -67,3 +67,15 @@ function makeFullScreen(full) { $('main').css({'transition': ''}); } } + +/* contextual help */ +$(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'); + } +}); -- cgit v1.2.3