Make sure nested document actions open in new tab, same as others.

This commit is contained in:
nathangray 2021-07-05 09:46:00 -06:00 committed by nathan
parent a728276a15
commit 7f63e612dd

View File

@ -2137,6 +2137,13 @@ abstract class Merge
} }
foreach($files as $file) foreach($files as $file)
{ {
$edit_attributes = array(
'menuaction' => $GLOBALS['egw_info']['flags']['currentapp'].'.'.get_called_class().'.merge_entries',
'document' => $file['path'],
'merge' => get_called_class(),
'id' => '$id',
'select_all' => '$select_all'
);
if (count($dircount) > 1) if (count($dircount) > 1)
{ {
$name_arr = explode('/', $file['name']); $name_arr = explode('/', $file['name']);
@ -2158,7 +2165,9 @@ abstract class Merge
'icon' => Api\Vfs::mime_icon($file['mime']), 'icon' => Api\Vfs::mime_icon($file['mime']),
'caption' => Api\Vfs::decodePath($name_arr[$count]), 'caption' => Api\Vfs::decodePath($name_arr[$count]),
'group' => 2, 'group' => 2,
'postSubmit' => true, // download needs post submit (not Ajax) to work 'postSubmit' => true, // download needs post submit (not Ajax) to work,
'target' => '_blank',
'url' => urldecode(http_build_query($edit_attributes))
); );
if ($file['mime'] == 'message/rfc822') if ($file['mime'] == 'message/rfc822')
{ {
@ -2197,13 +2206,6 @@ abstract class Merge
'target' => '_blank', 'target' => '_blank',
'postSubmit' => true, // download needs post submit (not Ajax) to work 'postSubmit' => true, // download needs post submit (not Ajax) to work
); );
$edit_attributes = array(
'menuaction' => $GLOBALS['egw_info']['flags']['currentapp'].'.'.get_called_class().'.merge_entries',
'document' => $file['path'],
'merge' => get_called_class(),
'id' => '$id',
'select_all' => '$select_all'
);
$documents[$file['mime']]['children'][$prefix.$file['name']]['url'] = urldecode(http_build_query($edit_attributes)); $documents[$file['mime']]['children'][$prefix.$file['name']]['url'] = urldecode(http_build_query($edit_attributes));
if ($file['mime'] == 'message/rfc822') if ($file['mime'] == 'message/rfc822')
{ {
@ -2218,14 +2220,6 @@ abstract class Merge
'group' => 2, 'group' => 2,
'target' => '_blank' 'target' => '_blank'
); );
$edit_attributes = array(
'menuaction' => $GLOBALS['egw_info']['flags']['currentapp'].'.'.get_called_class().'.merge_entries',
'document' => $file['path'],
'merge' => get_called_class(),
'id' => '$id',
'select_all' => '$select_all'
);
$documents[$prefix.$file['name']]['url'] = urldecode(http_build_query($edit_attributes)); $documents[$prefix.$file['name']]['url'] = urldecode(http_build_query($edit_attributes));
if ($file['mime'] == 'message/rfc822') if ($file['mime'] == 'message/rfc822')
{ {