Get filemanager edit popup working in et2

This commit is contained in:
Nathan Gray 2012-07-09 21:23:21 +00:00
parent 5da191b583
commit 70459abae9
2 changed files with 26 additions and 4 deletions

View File

@ -306,6 +306,11 @@ class filemanager_hooks
static function search_link()
{
return array(
'edit' => array(
'menuaction' => 'filemanager.filemanager_ui.file',
),
'edit_id' => 'path',
'edit_popup' => '495x425',
'mime' => array(
egw_vfs::DIR_MIME_TYPE => array(
'menuaction' => 'filemanager.filemanager_ui.index',

View File

@ -1249,12 +1249,29 @@ function force_download(_action, _senders)
}
if (($extra_tabs = egw_vfs::getExtraInfo($path,$content)))
{
$tabs =& $tpl->get_widget_by_name('tabs=general|perms|eacl|preview|custom');
if(method_exists($tpl,'get_widget_by_name'))
{
$tabs =& $tpl->get_widget_by_name('tabs=general|perms|eacl|preview|custom');
} else {
// et2
$tabs =& $tpl->getElementAttribute('tabs','tabs');
}
foreach(isset($extra_tabs[0]) ? $extra_tabs : array($extra_tabs) as $extra_tab)
{
$tabs['name'] .= '|'.$extra_tab['name'];
$tabs['label'] .= '|'.$extra_tab['label'];
$tabs['help'] .= '|'.$extra_tab['help'];
if(method_exists($tpl,'get_widget_by_name'))
{
$tabs['name'] .= '|'.$extra_tab['name'];
$tabs['label'] .= '|'.$extra_tab['label'];
$tabs['help'] .= '|'.$extra_tab['help'];
}
else
{
$tabs[] = array(
'label' => $extra_tab['label'],
'template' => $extra_tab['name']
);
}
if ($extra_tab['data'] && is_array($extra_tab['data']))
{
$content = array_merge($content, $extra_tab['data']);