Disable share actions of download link and attachment if selected item is a folder

This commit is contained in:
Hadi Nategh 2017-06-29 14:33:53 +02:00
parent 02cd6ad719
commit 8ce0de5208

View File

@ -180,7 +180,7 @@ class filemanager_ui
'onExecute' => 'javaScript:app.filemanager.createdir'
),
'mail' => array(
'caption' => lang('Mail files'),
'caption' => lang('Share files'),
'icon' => 'filemanager/mail_post_to',
'group' => $group,
'children' => array(),
@ -265,6 +265,10 @@ class filemanager_ui
'hint' => $data['title'],
'onExecute' => 'javaScript:app.filemanager.mail',
);
if ($mode == Vfs\Sharing::ATTACH || $mode == Vfs\Sharing::LINK)
{
$actions['mail']['children']['mail_'.$mode]['disableClass'] = 'isDir';
}
}
}
// This would be done automatically, but we're overriding