Correct file move by dropping on folder

This commit is contained in:
Brice Maron 2012-05-08 22:07:14 +00:00
parent c1490239e5
commit fae1ce4ea7
1 changed files with 7 additions and 7 deletions

View File

@ -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);
});}
});
}
}