Api - Better handling of enabled attribute for share actions

This commit is contained in:
nathangray 2019-08-22 15:56:17 -06:00
parent a49e3a3c15
commit 5bc2467de3
2 changed files with 7 additions and 1 deletions

View File

@ -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;
}

View File

@ -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);
}