register download action for directories

This commit is contained in:
Björn Schießle 2012-10-05 14:28:03 +02:00
parent ef8a4a1629
commit 0d081ac5ac
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ $(document).ready(function() {
window.location = $(tr).find('a.name').attr('href');
}
});
FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) {
var tr = $('tr').filterAttr('data-file', filename)
if (tr.length > 0) {
window.location = $(tr).find('a.name').attr('href')+'&download';
}
});
}
});