Skip to content

Incorrect MediaFormEngine.js #220

@abvdveen

Description

@abvdveen

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&params=' + params,
	  size: Modal.sizes.large
	});
}

return MediaFormEngine;

});`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions