diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-03-03 20:46:46 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-03-03 21:23:35 +0100 |
commit | a5df3f8ea74b53d914a9ebd2687f8ab73b0a201b (patch) | |
tree | 02f351d22e51b509db1e326a507d77437c207daf /apps/files_archive/js/archive.js | |
parent | 72947e46d1a4c6066f561d3e49c032f23589e4e1 (diff) | |
download | nextcloud-server-a5df3f8ea74b53d914a9ebd2687f8ab73b0a201b.tar.gz nextcloud-server-a5df3f8ea74b53d914a9ebd2687f8ab73b0a201b.zip |
allow transparent opening of zip files from the web interface
Diffstat (limited to 'apps/files_archive/js/archive.js')
-rw-r--r-- | apps/files_archive/js/archive.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files_archive/js/archive.js b/apps/files_archive/js/archive.js new file mode 100644 index 00000000000..ec316c7bf2c --- /dev/null +++ b/apps/files_archive/js/archive.js @@ -0,0 +1,15 @@ +/** + * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +$(document).ready(function() { + if(typeof FileActions!=='undefined'){ + FileActions.register('application/zip','Open','',function(filename){ + window.location='index.php?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); + }); + FileActions.setDefault('application/zip','Open'); + } +}); |