diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-04 13:55:49 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-09-04 14:11:40 +0200 |
commit | 4af5a8c483278eae2e8e38f5ea0a238072848b87 (patch) | |
tree | beca3f5250e1a50eca58fa63eea056b69ab82e44 /apps/files/js/fileactions.js | |
parent | 7c9d9992432839f2265b8f6b0f43ed15bfca9ff1 (diff) | |
parent | 09187f3b3b30e6f810c6afff7332615ed472154e (diff) | |
download | nextcloud-server-4af5a8c483278eae2e8e38f5ea0a238072848b87.tar.gz nextcloud-server-4af5a8c483278eae2e8e38f5ea0a238072848b87.zip |
Merge branch 'master' into fix_3728_with_file_exists_dialog
Conflicts:
apps/files/ajax/upload.php
apps/files/js/file-upload.js
apps/files/js/filelist.js
apps/files/js/files.js
apps/files/templates/part.list.php
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 277abcfdb15..703e543bf4b 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -65,7 +65,7 @@ var FileActions = { FileActions.currentFile = parent; var actions = FileActions.get(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); var file = FileActions.getCurrentFile(); - if ($('tr').filterAttr('data-file', file).data('renaming')) { + if ($('tr[data-file="'+file+'"]').data('renaming')) { return; } parent.children('a.name').append('<span class="fileactions" />'); @@ -123,14 +123,11 @@ var FileActions = { img = img(file); } if (typeof trashBinApp !== 'undefined' && trashBinApp) { - var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete" />'; + var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete delete-icon" />'; } else { - var html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" />'; + var html = '<a href="#" class="action delete delete-icon" />'; } var element = $(html); - if (img) { - element.append($('<img class ="svg" src="' + img + '"/>')); - } element.data('action', actions['Delete']); element.on('click', {a: null, elem: parent, actionFunc: actions['Delete']}, actionHandler); parent.parent().children().last().append(element); @@ -164,10 +161,11 @@ $(document).ready(function () { 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')); }); + + $('#fileList').trigger(jQuery.Event("fileActionsReady")); }); @@ -200,7 +198,7 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () { FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) { - var dir = $('#dir').val() + var dir = $('#dir').val(); if (dir !== '/') { dir = dir + '/'; } |