Correct file move by dropping on folder
This commit is contained in:
parent
c1490239e5
commit
fae1ce4ea7
1 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
});}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue