enabled itempicker in filemanager edit dialog for document merge and as proof of concept.

This commit is contained in:
Christian Binder 2012-09-29 10:32:33 +00:00
parent ac98f4f06a
commit 5505023b50
2 changed files with 45 additions and 3 deletions

View File

@ -967,8 +967,8 @@ function force_download(_action, _senders)
else else
{ {
$content = $stat; $content = $stat;
$content['name'] = egw_vfs::basename($path); $content['name'] = $content['itempicker_merge']['name'] = egw_vfs::basename($path);
$content['dir'] = egw_vfs::decodePath(egw_vfs::dirname($path)); $content['dir'] = $content['itempicker_merge']['dir'] = egw_vfs::decodePath(egw_vfs::dirname($path));
$content['path'] = $path; $content['path'] = $path;
$content['hsize'] = egw_vfs::hsize($stat['size']); $content['hsize'] = egw_vfs::hsize($stat['size']);
$content['mime'] = egw_vfs::mime_content_type($path); $content['mime'] = egw_vfs::mime_content_type($path);
@ -1223,6 +1223,7 @@ function force_download(_action, _senders)
0 => lang('No access'), 0 => lang('No access'),
); );
} }
$sel_options['mergeapp']= egw_link::app_list('merge');
$preserve = $content; $preserve = $content;
if (!isset($preserve['old'])) if (!isset($preserve['old']))
{ {

View File

@ -203,7 +203,46 @@
</rows> </rows>
</grid> </grid>
</template> </template>
<template id="filemanager.file" template="" lang="" group="0" version="1.7.001"> <template id="filemanager.file.merge" template="" lang="" group="0" version="1.9.001">
<grid width="450" height="300" spacing="10" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<hbox>
<itempicker id="itempicker_merge" application="calendar,infolog,projectmanager" action="itempickerDocumentAction" action_label="Merge"/>
</hbox>
</row>
<row>
<groupbox>
<caption label="Merge settings"/>
<grid>
<columns>
<column />
<column />
</columns>
<rows>
<row disabled="@is_dir">
<description value="Items of the selected application can be inserted into this document"/>
<menulist>
<menupopup id="merge[mergeapp]"/>
</menulist>
</row>
<row disabled="!@is_dir">
<description value="Items of the selected application can be inserted into files of this directory"/>
<menulist>
<menupopup id="merge[mergeapp]"/>
</menulist>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
</template>
<template id="filemanager.file" template="" lang="" group="0" version="1.9.001">
<grid> <grid>
<columns> <columns>
<column/> <column/>
@ -220,6 +259,7 @@
<tab id="filemanager.file.eacl" label="Extended ACL"/> <tab id="filemanager.file.eacl" label="Extended ACL"/>
<tab id="filemanager.file.preview" label="Preview"/> <tab id="filemanager.file.preview" label="Preview"/>
<tab id="filemanager.file.custom" label="Custom fields"/> <tab id="filemanager.file.custom" label="Custom fields"/>
<tab id="filemanager.file.merge" label="Merge"/>
</tabs> </tabs>
<tabpanels> <tabpanels>
<template id="filemanager.file.general"/> <template id="filemanager.file.general"/>
@ -227,6 +267,7 @@
<template id="filemanager.file.eacl"/> <template id="filemanager.file.eacl"/>
<template id="filemanager.file.preview"/> <template id="filemanager.file.preview"/>
<template id="filemanager.file.custom"/> <template id="filemanager.file.custom"/>
<template id="filemanager.file.merge"/>
</tabpanels> </tabpanels>
</tabbox> </tabbox>
</row> </row>