forked from extern/egroupware
Api - Better handling of enabled attribute for share actions
This commit is contained in:
parent
a49e3a3c15
commit
5bc2467de3
@ -104,7 +104,8 @@ class Sharing extends \EGroupware\Api\Sharing
|
||||
$document['allowOnMultiple'] = true;
|
||||
$document['onExecute'] = "javaScript:app.$appname.share_merge";
|
||||
}
|
||||
$documents['enabled'] = !!($GLOBALS['egw_info']['user']['apps']['stylite']);
|
||||
$documents['enabled'] = !!($GLOBALS['egw_info']['user']['apps']['stylite']) ?
|
||||
"javaScript:app.$appname.is_share_enabled" : false;
|
||||
$actions['share']['children']['shareDocuments'] = $documents;
|
||||
}
|
||||
|
||||
|
@ -648,6 +648,11 @@ class Sharing
|
||||
'share_link' => $class::share2link($share),
|
||||
'template' => Etemplate\Widget\Template::rel2url('/filemanager/templates/default/share_dialog.xet')
|
||||
);
|
||||
switch($action)
|
||||
{
|
||||
case 'shareFilemanager':
|
||||
$arr['title'] = lang('Filemanager directory');
|
||||
}
|
||||
$response = Json\Response::get();
|
||||
$response->data($arr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user