mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Api - Add a Share filemanager directory context menu action
This commit is contained in:
parent
3e8f2274f2
commit
a49e3a3c15
@ -1906,6 +1906,13 @@ var AppJS = (function(){ "use strict"; return Class.extend(
|
||||
{
|
||||
return this.egw.message(this.egw.lang('Missing share path. Unable to create share.'), 'error');
|
||||
}
|
||||
switch(_action.id)
|
||||
{
|
||||
case 'shareFilemanager':
|
||||
// Sharing a link to just files in filemanager
|
||||
var id = path.split('::');
|
||||
path = '/apps/'+ id[0] + '/' + id[1];
|
||||
}
|
||||
if(typeof _writable === 'undefined' && _action.parent && _action.parent.getActionById('shareWritable'))
|
||||
{
|
||||
_writable = _action.parent.getActionById('shareWritable').checked || false;
|
||||
|
@ -418,9 +418,21 @@ class Sharing
|
||||
'allowOnMultiple' => true,
|
||||
'enabled' => "javaScript:app.$appname.is_share_enabled",
|
||||
'checkbox' => true
|
||||
)
|
||||
),
|
||||
'shareFilemanager' => array(
|
||||
'caption' => lang('Filemanager directory'),
|
||||
'group' => 10,
|
||||
'icon' => 'link',
|
||||
'order' => 20,
|
||||
'enabled' => "javaScript:app.$appname.is_share_enabled",
|
||||
'onExecute' => "javaScript:app.$appname.share_link"
|
||||
),
|
||||
),
|
||||
));
|
||||
if(!$GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||
{
|
||||
unset($actions['share']['children']['shareFilemanager']);
|
||||
}
|
||||
if(!$GLOBALS['egw_info']['user']['apps']['stylite'])
|
||||
{
|
||||
array_unshift($actions['share']['children'], array(
|
||||
|
Loading…
Reference in New Issue
Block a user