diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-04-25 06:17:39 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-04-25 06:17:39 -0400 |
commit | f027bf81cdaddee5d6474199c1b7adce50e6e07d (patch) | |
tree | 23fd281c6627b7adc1421fcddf939e6447a4d18b /view/js/main.js | |
parent | f3eae7132f8c104db2197858208f16a5792507be (diff) | |
parent | a9d926886e6f8ed389031791799ffd352b8cb651 (diff) | |
download | volse-hubzilla-f027bf81cdaddee5d6474199c1b7adce50e6e07d.tar.gz volse-hubzilla-f027bf81cdaddee5d6474199c1b7adce50e6e07d.tar.bz2 volse-hubzilla-f027bf81cdaddee5d6474199c1b7adce50e6e07d.zip |
Merge remote-tracking branch 'upstream/dev' into help-content
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js index 2813b3b19..748853939 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -443,6 +443,32 @@ function NavUpdate() { timer = setTimeout(NavUpdate, updateInterval); } +function contextualHelp() { + var container = $("#contextual-help-content"); + + if(container.hasClass('contextual-help-content-open')) { + container.removeClass('contextual-help-content-open'); + $('main').css('top', '') + } + else { + container.addClass('contextual-help-content-open'); + var mainTop = container.outerHeight(true); + $('main').css('top', mainTop + 'px'); + } +} + +function contextualHelpFocus(target, openSidePanel) { + if (openSidePanel) { + $("main").addClass('region_1-on'); // Open the side panel to highlight element + } + else { + $("main").removeClass('region_1-on'); + } + $('html,body').animate({ scrollTop: $(target).offset().top - $('nav').outerHeight(true) - $('#contextual-help-content').outerHeight(true)}, 'slow'); + for (i = 0; i < 3; i++) { + $(target).fadeTo('slow', 0.1).fadeTo('slow', 1.0); + } +} function updatePageItems(mode, data) { |