[BUGFIX] Enable links in install tool configuration sections 37/34237/2
authorBjörn Fromme <mail@bjo3rn.com>
Sat, 15 Nov 2014 19:12:57 +0000 (20:12 +0100)
committerBenjamin Mack <benni@typo3.org>
Sun, 16 Nov 2014 00:11:40 +0000 (01:11 +0100)
Links contained in install tool configuration sections are not
working. This patch adds the missing anchors and javascript to
expand a collapsed sections in case a target anchor is not
visible.

Resolves: #62365
Releases: master, 6.2
Change-Id: Ifbaaf2fc745e8af340a330a9ca8ec07bc34db867
Reviewed-on: http://review.typo3.org/34237
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
typo3/sysext/install/Resources/Private/Partials/Action/Tool/AllConfiguration/SubSection.html
typo3/sysext/install/Resources/Public/Javascript/Install.js

index 39ab0dc..f47066e 100644 (file)
@@ -8,6 +8,7 @@
        <div class="toggleData" style="display:none">
                <f:for each="{sectionData}" as="item">
                        <div class="item">
+                               <a id="{sectionName}-{item.key}"></a>
                                <strong>[{sectionName}][{item.key}] </strong>
                                <f:if condition="{item.type} == 'checkbox'">
                                        <f:then>
index fb6400b..ed9a5a2 100644 (file)
@@ -343,6 +343,21 @@ $(document).ready(function() {
                handleButtonScrolling();
        });
 
+       $('.item-description').find('a').on('click', function() {
+               targetToggleGroupId = $(this.hash);
+               if (targetToggleGroupId) {
+                       $currentToggleGroup = $(this).closest('.toggleGroup');
+                       $targetToggleGroup = $(targetToggleGroupId).closest('.toggleGroup');
+                       if ($targetToggleGroup != $currentToggleGroup) {
+                               $currentToggleGroup.removeClass('expanded');
+                               $currentToggleGroup.find('.toggleData').hide();
+                               $targetToggleGroup.addClass('expanded');
+                               $targetToggleGroup.find('.toggleData').show();
+                               TYPO3.Install.Scrolling.handleButtonScrolling();
+                       }
+               }
+       });
+
        // Simple password strength indicator
        $('.t3-install-form-password-strength').on('keyup', function() {
                var value = $(this).val();
@@ -590,4 +605,4 @@ function clearCache() {
                url: location.href + '&install[controller]=ajax&install[action]=clearCache',
                cache: false
        });
-}
\ No newline at end of file
+}