summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-09-05 22:13:50 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-09-05 22:13:50 -0400
commit837eb1871d9b99fce32a418dd13284edfc41a398 (patch)
treeeef3abab36c1cdd720fda44d8e12b48cb1c28c88 /apps
parenta5211e31bc170f44edce3c80df831e7705e93396 (diff)
downloadnextcloud-server-837eb1871d9b99fce32a418dd13284edfc41a398.tar.gz
nextcloud-server-837eb1871d9b99fce32a418dd13284edfc41a398.zip
Don't delete the file anymore to replace it in the UI, just overwrite it
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js27
1 files changed, 11 insertions, 16 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index a9e48f24052..b777785f4d9 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -240,22 +240,17 @@ var FileList={
},
finishReplace:function() {
if (!FileList.replaceCanceled && FileList.replaceOldName && FileList.replaceNewName) {
- // Delete the file being replaced and rename the replacement
- FileList.deleteCanceled = false;
- FileList.deleteFiles = [FileList.replaceNewName];
- FileList.finishDelete(function() {
- $.ajax({url: OC.filePath('files', 'ajax', 'rename.php'), async: false, data: { dir: $('#dir').val(), newname: FileList.replaceNewName, file: FileList.replaceOldName }, success: function(result) {
- if (result && result.status == 'success') {
- $('tr').filterAttr('data-replace', 'true').removeAttr('data-replace');
- } else {
- OC.dialogs.alert(result.data.message, 'Error moving file');
- }
- FileList.replaceCanceled = true;
- FileList.replaceOldName = null;
- FileList.replaceNewName = null;
- FileList.lastAction = null;
- }});
- }, true);
+ $.ajax({url: OC.filePath('files', 'ajax', 'rename.php'), async: false, data: { dir: $('#dir').val(), newname: FileList.replaceNewName, file: FileList.replaceOldName }, success: function(result) {
+ if (result && result.status == 'success') {
+ $('tr').filterAttr('data-replace', 'true').removeAttr('data-replace');
+ } else {
+ OC.dialogs.alert(result.data.message, 'Error moving file');
+ }
+ FileList.replaceCanceled = true;
+ FileList.replaceOldName = null;
+ FileList.replaceNewName = null;
+ FileList.lastAction = null;
+ }});
}
},
do_delete:function(files){