-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #528 from jpmschuler/fix-LinkBrowserController
[FEATURE] refactor LinkBrowserController fix from #510
Showing
4 changed files
with
41 additions
and
7 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