Removed fixed user panel
authorMarcel Werk <burntime@woltlab.com>
Mon, 13 May 2013 19:09:43 +0000 (21:09 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 13 May 2013 19:11:29 +0000 (21:11 +0200)
com.woltlab.wcf/template/headInclude.tpl
wcfsetup/install/files/js/WCF.js
wcfsetup/install/files/style/layout.less

index 252a4cfe0609da34d82c8aa69d97758275d7c1eb..d783ca2cd0039253da43a4bedc5e9df3bdf5a4bb 100644 (file)
                WCF.Dropdown.init();
                WCF.System.PageNavigation.init('.pageNavigation');
                WCF.Date.Picker.init();
-               WCF.System.JumpToAnchor.execute();
                WCF.System.MobileNavigation.init();
                
                {event name='javascriptInit'}
index 5285678dede2c924ce00d6c2c840618c269107c3..03acac9226b428e58b294faf70ccda3f927c2b1b 100755 (executable)
@@ -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.
  * 
index c7485940b68bac617082ae13973d6617a7972dd9..e718448b29b637c907f7bce7331f3873714c32ea 100644 (file)
@@ -49,7 +49,7 @@
        background-color: @wcfUserPanelBackgroundColor;
        height: 40px;
        left: 0;
-       position: fixed;
+       position: absolute;
        top: 0;
        right: 0;
        z-index: 200;
        }
 }
 
-.userPanelJumpToAnchorFix:before {
-       content: "";
-       display: block;
-       height: 40px;
-       margin-top: -40px;
-}
-
 @media only screen and (max-width: 800px) {
        .userPanel {
                height: auto;