1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-12 21:30:39 +00:00

[dir view] enable read-only dirents in non-encrypted libs to be copied into other libs

This commit is contained in:
llj
2015-12-17 19:02:10 +08:00
parent 3b0f3d475b
commit 1d78ec4c4e
3 changed files with 25 additions and 6 deletions

View File

@@ -308,21 +308,28 @@ define([
var title = op_type == 'mv' ? gettext("Move {placeholder} to:") : gettext("Copy {placeholder} to:");
title = title.replace('{placeholder}', '<span class="op-target ellipsis ellipsis-op-target" title="' + Common.HTMLescape(obj_name) + '">' + Common.HTMLescape(obj_name) + '</span>');
var show_cur_repo = true;
if (this.model.get('perm') == 'r') {
show_cur_repo = false;
}
var form = $(this.mvcpTemplate({
form_title: title,
op_type: op_type,
obj_type: obj_type,
obj_name: obj_name,
show_other_repos: !dir.encrypted,
show_cur_repo: show_cur_repo,
show_other_repos: !dir.encrypted
}));
form.modal({appendTo:'#main', autoResize:true, focus:false});
$('#simplemodal-container').css({'width':'auto', 'height':'auto'});
FileTree.renderTreeForPath({
repo_name: dir.repo_name,
repo_id: dir.repo_id,
path: dir.path
});
if (show_cur_repo) {
FileTree.renderTreeForPath({
repo_name: dir.repo_name,
repo_id: dir.repo_id,
path: dir.path
});
}
if (!dir.encrypted) {
FileTree.prepareOtherReposTree({cur_repo_id: dir.repo_id});
}