mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 00:00:00 +00:00
[dir view] enable 'copy file/dir to current folder'
This commit is contained in:
@@ -1167,7 +1167,8 @@ define([
|
||||
$('.error', form).removeClass('hide');
|
||||
return false;
|
||||
}
|
||||
if (dst_repo == dirents.repo_id && dst_path == cur_path) {
|
||||
if (dst_repo == dirents.repo_id &&
|
||||
(op == 'mv' && dst_path == cur_path)) {
|
||||
$('.error', form).html(gettext("Invalid destination path")).removeClass('hide');
|
||||
return false;
|
||||
}
|
||||
@@ -1232,6 +1233,11 @@ define([
|
||||
} else {
|
||||
msg_s = gettext("Successfully copied %(name)s and %(amount)s other items.");
|
||||
}
|
||||
|
||||
// show the added items
|
||||
if (dst_path == cur_path) {
|
||||
_this.renderDir();
|
||||
}
|
||||
}
|
||||
|
||||
msg_s = msg_s.replace('%(name)s', data['success'][0]).replace('%(amount)s', success_len - 1);
|
||||
|
Reference in New Issue
Block a user