aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-01-31 06:18:22 -0800
committerBjörn Schießle <bjoern@schiessle.org>2013-01-31 06:18:22 -0800
commit8dd9dedee822d04afd918fc1f80555eabc2bb5b8 (patch)
tree32561684d19dd34c99e3f4b0a6e590fd46fed33e /apps/files/js/fileactions.js
parent54d46fe43c321706a10444aa55fc493882a8255c (diff)
parentc8a4878b7771f92361cf1c07aa32faef31cfece2 (diff)
downloadnextcloud-server-8dd9dedee822d04afd918fc1f80555eabc2bb5b8.tar.gz
nextcloud-server-8dd9dedee822d04afd918fc1f80555eabc2bb5b8.zip
Merge pull request #1266 from schiesbn/trash_bin
Trash bin
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r--apps/files/js/fileactions.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index f5ee363a4c8..c30f1bcddd8 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -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 () {
@@ -185,6 +189,7 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () {
FileList.rename(filename);
});
+
FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) {
window.location = OC.linkTo('files', 'index.php') + '?dir=' + encodeURIComponent($('#dir').val()).replace(/%2F/g, '/') + '/' + encodeURIComponent(filename);
});