[BUGFIX] Add avatar JavaScript to moduleTemplate 75/44075/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 15 Oct 2015 07:16:07 +0000 (09:16 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Thu, 15 Oct 2015 10:17:28 +0000 (12:17 +0200)
The avatar JavaScript is still bound to the unused DocumentTemplate. Adjust
the assignment to use ModuleTemplate instead.

Resolves: #70736
Releases: master
Change-Id: Ief44484dd95c4e9ce5e9c9c4607286b54343e10e
Reviewed-on: http://review.typo3.org/44075
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Zsolt Molnar <zsolt.molnar@arxia.com>
Tested-by: Zsolt Molnar <zsolt.molnar@arxia.com>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index cb65023..d5e1032 100644 (file)
@@ -1016,7 +1016,7 @@ class SetupModuleController extends AbstractModule
      */
     protected function addAvatarButtonJs($fieldName)
     {
-        $this->doc->JScodeArray['avatar-button'] = '
+        $this->moduleTemplate->addJavaScriptCode('avatar-button', '
             var browserWin="";
 
             function openFileBrowser() {
@@ -1038,7 +1038,7 @@ class SetupModuleController extends AbstractModule
 
                 browserWin.close();
             }
-        ';
+        ');
     }
 
     /**