2012-03-03 19:46:46 +00:00
|
|
|
/**
|
|
|
|
* 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'){
|
2012-07-25 20:33:08 +00:00
|
|
|
FileActions.register('application/zip','Open', FileActions.PERMISSION_READ, '',function(filename){
|
2012-05-31 17:46:32 +00:00
|
|
|
window.location=OC.linkTo('files', 'index.php')+'&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
|
2012-03-03 19:46:46 +00:00
|
|
|
});
|
|
|
|
FileActions.setDefault('application/zip','Open');
|
2012-07-25 20:33:08 +00:00
|
|
|
FileActions.register('application/x-gzip','Open', FileActions.PERMISSION_READ, '',function(filename){
|
2012-05-31 17:46:32 +00:00
|
|
|
window.location=OC.linkTo('files', 'index.php')+'&dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename);
|
2012-03-28 21:53:51 +00:00
|
|
|
});
|
|
|
|
FileActions.setDefault('application/x-gzip','Open');
|
2012-03-03 19:46:46 +00:00
|
|
|
}
|
|
|
|
});
|