diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-31 15:35:20 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-31 15:35:20 +0100 |
commit | ad044eb88861ebf2cefedc993634a85bb4697cd2 (patch) | |
tree | cda074d68a48f18fc676df7d1b09f2c9f0536431 /apps/files/js/fileactions.js | |
parent | cbafea4cc805093f34a6b46d3f1263860e1b5f3f (diff) | |
parent | 8dd9dedee822d04afd918fc1f80555eabc2bb5b8 (diff) | |
download | nextcloud-server-ad044eb88861ebf2cefedc993634a85bb4697cd2.tar.gz nextcloud-server-ad044eb88861ebf2cefedc993634a85bb4697cd2.zip |
Merge branch 'master' into navigation
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 17 |
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); }); |