Skip to content
Snippets Groups Projects
Commit d9ef6da2 authored by Robin Appelman's avatar Robin Appelman
Browse files

code style

parent 20e0432d
Branches
No related tags found
No related merge requests found
......@@ -82,7 +82,9 @@ var FileActions={
img = img(file);
}
var html = '<a href="#" class="action" style="display:none">';
if(img) { html+='<img src="'+img+'"/> '; }
if (img) {
html += '<img src="' + img + '"/> ';
}
html += t('files', name) + '</a>';
var element = $(html);
element.data('action', name);
......@@ -156,12 +158,16 @@ $(document).ready(function(){
} else {
var downloadScope = 'file';
}
FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download');},function(filename){
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());
});
});
FileActions.register('all','Delete', OC.PERMISSION_DELETE, function(){return OC.imagePath('core','actions/delete');},function(filename){
FileActions.register('all', 'Delete', OC.PERMISSION_DELETE, function () {
return OC.imagePath('core', 'actions/delete');
}, function (filename) {
if (Files.cancelUpload(filename)) {
if (filename.substr) {
filename = [filename];
......@@ -180,7 +186,9 @@ FileActions.register('all','Delete', OC.PERMISSION_DELETE, function(){return OC.
});
// t('files', 'Rename')
FileActions.register('all','Rename', OC.PERMISSION_UPDATE, function(){return OC.imagePath('core','actions/rename');},function(filename){
FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () {
return OC.imagePath('core', 'actions/rename');
}, function (filename) {
FileList.rename(filename);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment