diff options
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/view/js/main.js b/view/js/main.js index 799ae82bc..748853939 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -372,11 +372,11 @@ function NavUpdate() { if(! updateCountsOnly) { // start live update - if($('#live-network').length) { src = 'network'; liveUpdate(); } - if($('#live-channel').length) { src = 'channel'; liveUpdate(); } - if($('#live-public').length) { src = 'public'; liveUpdate(); } - if($('#live-display').length) { src = 'display'; liveUpdate(); } - if($('#live-search').length) { src = 'search'; liveUpdate(); } + if($('#live-network').length) { src = 'network'; liveUpdate(); } + if($('#live-channel').length) { src = 'channel'; liveUpdate(); } + if($('#live-pubstream').length) { src = 'pubstream'; liveUpdate(); } + if($('#live-display').length) { src = 'display'; liveUpdate(); } + if($('#live-search').length) { src = 'search'; liveUpdate(); } if($('#live-photos').length) { if(liking) { @@ -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) { |