mirror of
https://github.com/FriendsOfTYPO3/feedit.git
synced 2024-11-10 01:36:09 +01:00
24 lines
913 B
JavaScript
24 lines
913 B
JavaScript
function editModuleOnClickHandler(event) {
|
|
event.preventDefault();
|
|
var element = event.target;
|
|
if (parent.opener && parent.opener.top) {
|
|
parent.opener.top.fsMod.recentIds['web'] = element.getAttribute('data-pageUid');
|
|
if (parent.opener.top && parent.opener.top.nav_frame && parent.opener.top.nav_frame.refresh_nav) {
|
|
parent.opener.top.nav_frame.refresh_nav();
|
|
}
|
|
parent.opener.top.goToModule(element.getAttribute('data-pageModule'));
|
|
parent.opener.top.focus();
|
|
} else {
|
|
var vHWin = window.open(element.getAttribute('data-backendScript'), element.getAttribute('data-t3BeSitenameMd5'));
|
|
vHWin.focus();
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function initializeEditModule() {
|
|
var editModuleBtnOpenBackend = document.querySelector('.typo3-adminPanel-btn-openBackend');
|
|
editModuleBtnOpenBackend.addEventListener('click', editModuleOnClickHandler);
|
|
}
|
|
|
|
|
|
window.addEventListener('load', initializeEditModule, false);
|