Commit 8a9bc017 authored by Wouter Wolters's avatar Wouter Wolters
Browse files

[BUGFIX] Fix link to edit file metadata in full window

When opening a window with a file reference in a full window
it is not possible to click the edit metadata button.

Use a normal href to avoid the issue with choosing the correct frame.

Resolves: #76729
Releases: master,7.6
Change-Id: Iaa140f28104782870c50ef0d876e472067a09fed
Reviewed-on: https://review.typo3.org/48667

Tested-by: default avatarBamboo TYPO3com <info@typo3.com>
Reviewed-by: default avatarMichael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: default avatarFrederic Gaus <frederic.gaus@flagbit.de>
Tested-by: default avatarFrederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent c1fe18c9
......@@ -483,17 +483,12 @@ class InlineRecordContainer extends AbstractContainer
->fetch();
if ($backendUser->check('tables_modify', 'sys_file_metadata')) {
$url = BackendUtility::getModuleUrl('record_edit', array(
'edit[sys_file_metadata][' . (int)$recordInDatabase['uid'] . ']' => 'edit'
'edit[sys_file_metadata][' . (int)$recordInDatabase['uid'] . ']' => 'edit',
'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
));
$editOnClick = 'if (top.content.list_frame) {' .
'top.content.list_frame.location.href=' .
GeneralUtility::quoteJSvalue($url . '&returnUrl=') .
'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search)' .
';' .
'}';
$title = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:cm.editMetadata');
$cells['editmetadata'] = '
<a class="btn btn-default" href="#" class="btn" onclick="' . htmlspecialchars($editOnClick) . '" title="' . htmlspecialchars($title) . '">
<a class="btn btn-default" href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($title) . '">
' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '
</a>';
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment