mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Use opener.egw_appWindowOpen() if in a popup to open links in main window, if the app doesn't want a popup
This commit is contained in:
parent
651018ddfb
commit
f76b1ad858
@ -324,6 +324,15 @@ class link_widget
|
||||
$value[$row]['icon'] = egw_link::get_registry($value[$row]['app'], 'icon');
|
||||
$value[$row]['label'] = 'Unlink';
|
||||
$value[$row]['help'] = lang('Remove this link (not the entry itself)');
|
||||
if(!egw_link::is_popup($link['app'],'view') && etemplate::$request->output_mode == 2)
|
||||
{
|
||||
// If link doesn't want a popup, make sure to open it in appropriate tab of main window
|
||||
$value[$row]['view'] = "javascript:if(typeof opener.top.framework != 'undefined') {
|
||||
opener.top.egw_appWindowOpen('{$link['app']}','".egw::link('/index.php',$value[$row]['view'])."');
|
||||
} else {
|
||||
opener.open('".egw::link('/index.php',$value[$row]['view'])."','".$value[$row]['target']."');
|
||||
}";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user