[BUGFIX] Access global TYPO3 object correctly 30/57730/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 30 Jul 2018 18:03:35 +0000 (20:03 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 30 Jul 2018 18:48:57 +0000 (20:48 +0200)
The setting `TYPO3.settings.ShowItem.moduleUrl` does not exist in the
local scope in some cases. The `TYPO3` object of the global (`top`)
scope is now used instead.

Resolves: #85688
Releases: master
Change-Id: Idac7c2ea4d21b259dd0f3118a6fecc6bdaeadf70
Reviewed-on: https://review.typo3.org/57730
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Resources/Private/TypeScript/InfoWindow.ts
typo3/sysext/backend/Resources/Public/JavaScript/InfoWindow.js

index afbe27f..76e9b5d 100644 (file)
@@ -29,7 +29,7 @@ class InfoWindow {
     Modal.advanced({
       type: Modal.types.iframe,
       size: Modal.sizes.large,
-      content: TYPO3.settings.ShowItem.moduleUrl
+      content: top.TYPO3.settings.ShowItem.moduleUrl
         + '&table=' + encodeURIComponent(table)
         + '&uid=' + (typeof uid === 'number' ? uid : encodeURIComponent(uid)),
       severity: SeverityEnum.notice
index f3fdba5..8a5d0c5 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","./Enum/Severity","./Modal"],function(e,n,t,o){"use strict";var i=function(){function e(){}return e.showItem=function(e,n){o.advanced({type:o.types.iframe,size:o.sizes.large,content:TYPO3.settings.ShowItem.moduleUrl+"&table="+encodeURIComponent(e)+"&uid="+("number"==typeof n?n:encodeURIComponent(n)),severity:t.SeverityEnum.notice})},e}();return TYPO3.InfoWindow=i,i});
\ No newline at end of file
+define(["require","exports","./Enum/Severity","./Modal"],function(e,n,t,o){"use strict";var i=function(){function e(){}return e.showItem=function(e,n){o.advanced({type:o.types.iframe,size:o.sizes.large,content:top.TYPO3.settings.ShowItem.moduleUrl+"&table="+encodeURIComponent(e)+"&uid="+("number"==typeof n?n:encodeURIComponent(n)),severity:t.SeverityEnum.notice})},e}();return TYPO3.InfoWindow=i,i});
\ No newline at end of file