mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
[lib setting] folder perm: open the jstree
This commit is contained in:
@@ -55,8 +55,9 @@
|
||||
<div id="mv-dir-list" class="dir-tree-cont">
|
||||
<% if (show_cur_repo) { %>
|
||||
<h5 class="hd cspt"><span class="icon-caret-down"></span>{% trans "Current Library"%}</h5>
|
||||
<div id="current-repo-dirs">
|
||||
<span class="loading-icon loading-tip"></span>
|
||||
<div id="current-repo-dirs"></div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% if (show_other_repos) { %>
|
||||
<div id="other-repos">
|
||||
|
@@ -26,6 +26,8 @@ define([
|
||||
|
||||
if (this.show_cur_repo) {
|
||||
FileTree.renderTreeForPath({
|
||||
$form: this.$el,
|
||||
$container: this.$('#current-repo-dirs'),
|
||||
repo_name: this.dir.repo_name,
|
||||
repo_id: this.dir.repo_id,
|
||||
path: this.dir.path
|
||||
|
@@ -160,11 +160,20 @@ define([
|
||||
|
||||
var $form = $('.js-folder-select-form', $permContent.parent()).slideDown();
|
||||
var $jstreeContainer = $('.js-jtree-container', $form);
|
||||
/*
|
||||
var repo_data = FileTree.formatRepoData([{
|
||||
'id': this.repo_id,
|
||||
'name': this.repo_name
|
||||
}]);
|
||||
FileTree.renderDirTree($jstreeContainer, $form, repo_data);
|
||||
*/
|
||||
FileTree.renderTreeForPath({
|
||||
$form: $form,
|
||||
$container: $jstreeContainer,
|
||||
repo_id: this.repo_id,
|
||||
repo_name: this.repo_name,
|
||||
path: '/'
|
||||
});
|
||||
},
|
||||
|
||||
addFolder: function(e) {
|
||||
|
@@ -799,6 +799,8 @@ define([
|
||||
|
||||
if (show_cur_repo) {
|
||||
FileTree.renderTreeForPath({
|
||||
$form: form,
|
||||
$container: $('#current-repo-dirs'),
|
||||
repo_name: dir.repo_name,
|
||||
repo_id: dir.repo_id,
|
||||
path: dir.path
|
||||
|
@@ -190,10 +190,8 @@ define([
|
||||
},
|
||||
|
||||
renderTreeForPath: function(options) {
|
||||
// check templates/snippets/lib_op_popups.html for the template
|
||||
var form = $('#mv-form'),
|
||||
container = $('#current-repo-dirs'),
|
||||
loading_tip = container.prev();
|
||||
var form = options.$form,
|
||||
container = options.$container;
|
||||
|
||||
var repo_name = options.repo_name,
|
||||
repo_id = options.repo_id;
|
||||
@@ -256,7 +254,6 @@ define([
|
||||
}
|
||||
json_data.push(repo_data);
|
||||
|
||||
loading_tip.hide();
|
||||
_this.renderDirTree(container, form, json_data);
|
||||
container.removeClass('hide');
|
||||
},
|
||||
@@ -266,7 +263,6 @@ define([
|
||||
'attr': {'repo_id': repo_id, 'root_node': true},
|
||||
'state': 'closed'
|
||||
}];
|
||||
loading_tip.hide();
|
||||
_this.renderDirTree(container, form, cur_repo);
|
||||
container.removeClass('hide');
|
||||
}
|
||||
|
Reference in New Issue
Block a user