[BUGFIX] JavaScript error in Install Tool 49/32149/3
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 25 Jul 2014 18:06:30 +0000 (20:06 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 13 Aug 2014 18:32:01 +0000 (20:32 +0200)
When using toggleButton in "Test setup" a JavaScript
error is thrown because the scrolling handler can only
be used if the fixed footer is available.

Add a check to prevent this JavaScript error.

Resolves: #60577
Releases: 6.3,6.2
Change-Id: Ie7628e83280f6af032b364586cdfb6b386663d9d
Reviewed-on: http://review.typo3.org/32149
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Resources/Public/Javascript/Install.js

index 7b810c3..fb6400b 100644 (file)
@@ -396,12 +396,6 @@ $(document).ready(function() {
                return false;
        });
 
-       // Footer scrolling and visibility
-       if ($('#fixed-footer-handler').length > 0) {
-               $(window).scroll(handleButtonScrolling);
-               $('body.backend #typo3-docbody').scroll(handleButtonScrolling);
-       }
-
        // Handle core update
        var $coreUpdateSection = $('#coreUpdate');
        if ($coreUpdateSection) {
@@ -420,10 +414,12 @@ $(document).ready(function() {
 });
 
 function handleButtonScrolling() {
-       if (!isScrolledIntoView($('#fixed-footer-handler'))) {
-               $('#fixed-footer').addClass('fixed');
-       } else {
-               $('#fixed-footer').removeClass('fixed');
+       if ($('#fixed-footer-handler').length > 0) {
+               if (!isScrolledIntoView($('#fixed-footer-handler'))) {
+                       $('#fixed-footer').addClass('fixed');
+               } else {
+                       $('#fixed-footer').removeClass('fixed');
+               }
        }
 }
 function isScrolledIntoView(elem) {