From 7b509312a56fb5d421dbb8e9d7a258cd8b339a08 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 13 May 2013 21:09:43 +0200 Subject: [PATCH] Removed fixed user panel --- com.woltlab.wcf/template/headInclude.tpl | 1 - wcfsetup/install/files/js/WCF.js | 34 ++---------------------- wcfsetup/install/files/style/layout.less | 9 +------ 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/com.woltlab.wcf/template/headInclude.tpl b/com.woltlab.wcf/template/headInclude.tpl index 252a4cfe06..d783ca2cd0 100644 --- a/com.woltlab.wcf/template/headInclude.tpl +++ b/com.woltlab.wcf/template/headInclude.tpl @@ -126,7 +126,6 @@ WCF.Dropdown.init(); WCF.System.PageNavigation.init('.pageNavigation'); WCF.Date.Picker.init(); - WCF.System.JumpToAnchor.execute(); WCF.System.MobileNavigation.init(); {event name='javascriptInit'} diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 5285678ded..03acac9226 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4391,9 +4391,9 @@ WCF.Effect.Scroll = Class.extend({ var $windowHeight = $(window).height(); // handles menu height - if (excludeMenuHeight) { + /*if (excludeMenuHeight) { $elementOffset = Math.max($elementOffset - $('#topMenu').outerHeight(), 0); - } + }*/ if ($elementOffset > $documentHeight - $windowHeight) { $elementOffset = $documentHeight - $windowHeight; @@ -5500,36 +5500,6 @@ WCF.System.MobileNavigation = { } }; -/** - * Fixes scroll offset on page load. - */ -WCF.System.JumpToAnchor = { - execute: function() { - if (window.location.hash) { - var $element = $(window.location.hash); - if ($element.length) { - if ($.browser.chrome || $.browser.msie) { - $element.addClass('userPanelJumpToAnchorFix'); - - $(document).on('readystatechange', function() { - if (document.readyState === 'complete') { - // wait 100ms - new WCF.PeriodicalExecuter(function(pe) { - pe.stop(); - - $element.removeClass('userPanelJumpToAnchorFix'); - }, 100); - } - }); - } - else { - window.scrollBy(0, -1 * $('.userPanel').outerHeight()); - } - } - } - } -}; - /** * System notification overlays. * diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index c7485940b6..e718448b29 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -49,7 +49,7 @@ background-color: @wcfUserPanelBackgroundColor; height: 40px; left: 0; - position: fixed; + position: absolute; top: 0; right: 0; z-index: 200; @@ -164,13 +164,6 @@ } } -.userPanelJumpToAnchorFix:before { - content: ""; - display: block; - height: 40px; - margin-top: -40px; -} - @media only screen and (max-width: 800px) { .userPanel { height: auto; -- 2.20.1