introduce option to disable download action
This commit is contained in:
parent
82d4da0d3d
commit
1318450791
|
@ -147,15 +147,19 @@ $(document).ready(function () {
|
|||
} else {
|
||||
var downloadScope = 'file';
|
||||
}
|
||||
FileActions.register(downloadScope, 'Download', OC.PERMISSION_READ, function () {
|
||||
return OC.imagePath('core', 'actions/download');
|
||||
}, function (filename) {
|
||||
window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val());
|
||||
});
|
||||
|
||||
|
||||
if (typeof disableDownloadActions == 'undefined' || !disableDownloadActions) {
|
||||
FileActions.register(downloadScope, 'Download', OC.PERMISSION_READ, function () {
|
||||
return OC.imagePath('core', 'actions/download');
|
||||
}, function (filename) {
|
||||
window.location = OC.filePath('files', 'ajax', 'download.php') + '?files=' + encodeURIComponent(filename) + '&dir=' + encodeURIComponent($('#dir').val());
|
||||
});
|
||||
}
|
||||
|
||||
$('#fileList tr').each(function(){
|
||||
FileActions.display($(this).children('td.filename'));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
FileActions.register('all', 'Delete', OC.PERMISSION_DELETE, function () {
|
||||
|
|
Loading…
Reference in New Issue