diff options
-rw-r--r-- | apps/files/js/files.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 2dce00035e1..4b4e96b949e 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -569,16 +569,16 @@ var dragOptions={ var folderDropOptions={ drop: function( event, ui ) { var file=ui.draggable.parent().data('file'); - var target=$(this).text().trim(); + var target=$(this).find('.nametext').text().trim(); var dir=$('#dir').val(); $.ajax({ url: OC.filePath('files', 'ajax', 'move.php'), - data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(dir)+'/'+encodeURIComponent(target), - complete: function(data){boolOperationFinished(data, function(){ - var el = $('#fileList tr').filterAttr('data-file',file).find('td.filename'); - el.draggable('destroy'); - FileList.remove(file); - });} + data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(dir)+'/'+encodeURIComponent(target), + complete: function(data){boolOperationFinished(data, function(){ + var el = $('#fileList tr').filterAttr('data-file',file).find('td.filename'); + el.draggable('destroy'); + FileList.remove(file); + });} }); } } |