1
0
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:
llj
2018-08-21 16:58:49 +08:00
parent e9dd17f511
commit 1b0e3e1264
4 changed files with 17 additions and 5 deletions

View File

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