From ff67f115d403d13dedf77457c539963f50a80eec Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Thu, 8 Aug 2013 13:50:04 +0200 Subject: fix #2711 using a custom event, also use css selectors over filterAttr --- apps/files/js/fileactions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/files/js/fileactions.js') diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index aa66a57a7b5..de67d13559e 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(''); @@ -164,10 +164,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")); }); -- cgit v1.2.3