mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
make prefix for documents a parameter and properly decode file names
This commit is contained in:
parent
8ad99593bd
commit
dfeedf64c5
@ -863,7 +863,7 @@ abstract class bo_merge
|
||||
*
|
||||
* @return List of documents, suitable for a selectbox. The key is document_<filename>.
|
||||
*/
|
||||
public static function get_documents($dir)
|
||||
public static function get_documents($dir, $prefix='document_')
|
||||
{
|
||||
if (!$dir) return array();
|
||||
|
||||
@ -875,7 +875,7 @@ abstract class bo_merge
|
||||
// return only the mime-types we support
|
||||
if (!self::is_implemented($file['mime'],'.'.array_pop($parts=explode('.',$file['name'])))) continue;
|
||||
|
||||
$list['document_'.$file['name']] = /*lang('Insert in document').': '.*/$file['name'];
|
||||
$list[$prefix.$file['name']] = egw_vfs::decodePath($file['name']);
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
@ -889,9 +889,9 @@ abstract class bo_merge
|
||||
* @param string $caption='Insert in document'
|
||||
* @return array see nextmatch_widget::egw_actions
|
||||
*/
|
||||
public static function document_action($dir, $group=0, $caption='Insert in document')
|
||||
public static function document_action($dir, $group=0, $caption='Insert in document', $prefix='document_')
|
||||
{
|
||||
$documents = self::get_documents($dir);
|
||||
$documents = self::get_documents($dir, $prefix);
|
||||
|
||||
return array(
|
||||
'icon' => 'etemplate/merge',
|
||||
|
@ -518,10 +518,10 @@ class nextmatch_widget
|
||||
* - boolean 'no_lang' do NOT translate caption, default false
|
||||
* - string 'icon' icon, eg. 'edit' or 'infolog/task', if no app given app of template or API is used
|
||||
* - string 'iconUrl' full url of icon, better use 'icon'
|
||||
* - boolean 'allowOnMultiple' should action be shown if multiple lines are marked, default true!
|
||||
* - boolean 'enabled' is action available, default true!
|
||||
* - boolean|string 'allowOnMultiple' should action be shown if multiple lines are marked, or string 'only', default true!
|
||||
* - boolean|string 'enabled' is action available, or string with javascript function to call, default true!
|
||||
* - boolena 'hideOnDisabled' hide disabled actions, default false
|
||||
* - string 'type' type of action, default 'popup' for contenxt menus
|
||||
* - string 'type' type of action, default 'popup' for contenxt menus, 'drag' or 'drop'
|
||||
* - boolean 'default' is that action the default action, default false
|
||||
* - array 'children' array with actions of submenu
|
||||
* - int 'group' to group items, default all actions are in one group
|
||||
|
Loading…
Reference in New Issue
Block a user