The js in MediaFormEngine.js will not override FormEngine.openPopupWindow of TYPO3/CMS/Backend/ and therefore the normal filebrowser will always be shown.
This is how the definition should be (no check on 'inline.', which the original def has, as that never seems to appear in params):
`define(['TYPO3/CMS/Backend/FormEngine','TYPO3/CMS/Backend/Modal'], function(FormEngine,Modal) {
var MediaFormEngine = {};
/**
* Opens a popup window with the element browser (browser.php)
*
* @param {string} mode can be "db" or "file"
* @param {string} params additional params for the browser window
*/
FormEngine.openPopupWindow = function(mode, params) {
console.log('params:' + params);
return Modal.advanced({
type: Modal.types.iframe,
//content: FormEngine.browserUrl + '&mode=' + mode + '&bparams=' + params,
content: MediaFormEngine.vidiModuleUrl + '&' + MediaFormEngine.vidiModulePrefix + '[plugins][]=filePicker¶ms=' + params,
size: Modal.sizes.large
});
}
return MediaFormEngine;
});`
The js in MediaFormEngine.js will not override FormEngine.openPopupWindow of TYPO3/CMS/Backend/ and therefore the normal filebrowser will always be shown.
This is how the definition should be (no check on 'inline.', which the original def has, as that never seems to appear in params):
`define(['TYPO3/CMS/Backend/FormEngine','TYPO3/CMS/Backend/Modal'], function(FormEngine,Modal) {
var MediaFormEngine = {};
});`