forked from T3Voila/templavoilaplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] refactor LinkBrowserController fix from T3Voila#510
providing new for >=11 and retaining old solution for <=10 fixes T3Voila#510, fixes T3Voila#502, rels T3Voila#503, rels T3Voila#507, rels T3Voila#508
- Loading branch information
1 parent
1f62bc1
commit 71694bd
Showing
4 changed files
with
27 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
define([ | ||
'TYPO3/CMS/Backend/FormEngineLinkBrowserAdapter' | ||
], function(FormEngineLinkBrowserAdapter, ElementBrowser) { | ||
const FormEngineLinkBrowserAdapterParentFunction = FormEngineLinkBrowserAdapter.getParent; | ||
const getParent = () => { | ||
if ( | ||
typeof window.parent !== 'undefined' && | ||
typeof window.parent.document.list_frame !== 'undefined' && | ||
window.parent.frames.list_frame.parent.document.querySelector('.t3js-modal-iframe') !== null && | ||
window.parent.frames.list_frame.parent.document.querySelectorAll('.t3js-modal-iframe').length > 1 | ||
) { | ||
return window.parent.frames.list_frame.parent.document.querySelector('.t3js-modal-iframe').contentWindow; | ||
} | ||
return null; | ||
} | ||
|
||
FormEngineLinkBrowserAdapter.getParent = () => { | ||
return getParent() || FormEngineLinkBrowserAdapterParentFunction(); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters