[BUGFIX] Add jumpToUrl Javascript in TyposcriptTemplateModule 13/44013/3
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Mon, 12 Oct 2015 14:51:20 +0000 (16:51 +0200)
committerMathias Schreiber <mathias.schreiber@wmdb.de>
Tue, 13 Oct 2015 09:40:19 +0000 (11:40 +0200)
Switching from DocumentTemplate to ModuleTemplate removed the inline
Javascript that generated the jumpToUrl function.
We reimplement it in this controller only.

Resolves: #70625
Releases: master
Change-Id: Ibb4e900e8c635dbe92fcc550d6e639d6341a87bb
Reviewed-on: http://review.typo3.org/44013
Reviewed-by: Josef Glatz <jousch@gmail.com>
Tested-by: Josef Glatz <jousch@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Andreas Bouche <andreas.bouche@flagbit.de>
Tested-by: Andreas Bouche <andreas.bouche@flagbit.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php

index 71b2f74..fa06094 100755 (executable)
@@ -119,6 +119,15 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
         $this->MCONF = array(
             'name' => $this->moduleName
         );
+        $this->moduleTemplate->addJavaScriptCode(
+            'jumpToUrl',
+            '
+            function jumpToUrl(URL) {
+                window.location.href = URL;
+                return false;
+            }
+            '
+        );
     }
 
     /**