[BUGFIX] Web->View: Fixed not working language selection 78/44378/2
authorMichael Oehlhof <typo3@oehlhof.de>
Thu, 29 Oct 2015 21:33:12 +0000 (22:33 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 29 Oct 2015 22:21:19 +0000 (23:21 +0100)
Resolves: #71146
Releases: master
Change-Id: Ia2bf6db8348480929f852dd20ff90898e1a3afec
Reviewed-on: https://review.typo3.org/44378
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/viewpage/Resources/Public/JavaScript/Main.js

index e9ac32a..f752ca7 100644 (file)
@@ -121,13 +121,13 @@ define(['jquery', 'TYPO3/CMS/Backend/Storage', 'jquery-ui/resizable'], function(
 
                // Add event to language selector
                ViewPage.$languageSelector.on('change',function() {
-                       var iframeUrl = ViewPage.$ifraViewPage.attr('src');
+                       var iframeUrl = ViewPage.$iframe.attr('src');
                        var iframeParameters = ViewPage.getUrlVars(iframeUrl);
                        // change language
                        iframeParameters.L = ViewPage.$languageSelector.val();
                        var newIframeUrl = iframeUrl.slice(0, iframeUrl.indexOf('?') + 1) + $.param(iframeParameters);
                        // load new url into iframe
-                       ViewPage.$ifraViewPage.attr('src', newIframeUrl);
+                       ViewPage.$iframe.attr('src', newIframeUrl);
                        Storage.Persistent.set(ViewPage.storagePrefix + 'languageSelectorValue', ViewPage.$languageSelector.val());
                });
        };