summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js4
-rw-r--r--apps/files/js/files.js7
2 files changed, 6 insertions, 5 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index cc107656da8..0bf1f79ab77 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -315,8 +315,8 @@ var FileList={
do_delete:function(files){
if(files.substr){
files=[files];
- }
- for (var i in files) {
+ }
+ for (var i=0; i<files.length; i++) {
var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete");
var oldHTML = deleteAction[0].outerHTML;
var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'perform delete operation')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 918182162d4..8327460cca6 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -162,9 +162,10 @@ $(document).ready(function() {
var tr=$('tr').filterAttr('data-file',filename);
var renaming=tr.data('renaming');
if(!renaming && !FileList.isLoading(filename)){
- var mime=$(this).parent().parent().data('mime');
- var type=$(this).parent().parent().data('type');
- var permissions = $(this).parent().parent().data('permissions');
+ FileActions.currentFile = $(this).parent();
+ var mime=FileActions.getCurrentMimeType();
+ var type=FileActions.getCurrentType();
+ var permissions = FileActions.getCurrentPermissions();
var action=FileActions.getDefault(mime,type, permissions);
if(action){
event.preventDefault();