1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 07:27:04 +00:00

[system repo admin] fix, improvement, supplement, clean

This commit is contained in:
llj
2016-06-07 17:32:01 +08:00
committed by lian
parent a767aeb3d8
commit 8c2e16ca36
29 changed files with 615 additions and 1153 deletions

View File

@@ -18,18 +18,19 @@ define([
var dirent_path = this.getPath();
if (this.get('is_file')) {
return '#';
return '';
} else {
return '#libraries/' + dir.repo_id + '/dirents' + Common.encodePath(dirent_path);
return '#libs/' + dir.repo_id + Common.encodePath(dirent_path);
}
},
// only for file
getDownloadUrl: function() {
var dir = this.collection;
var dirent_path = this.getPath();
return app.config.siteRoot + "api/v2.1/admin/libraries/" + dir.repo_id
+ "/dirent/?path=" + Common.encodePath(dirent_path) + "&dl=1";
+ "/dirent/?path=" + encodeURIComponent(dirent_path) + "&dl=1";
},
getDeleteUrl: function() {
@@ -37,7 +38,7 @@ define([
var dirent_path = this.getPath();
return app.config.siteRoot + "api/v2.1/admin/libraries/" + dir.repo_id
+ "/dirent/?path=" + Common.encodePath(dirent_path);
+ "/dirent/?path=" + encodeURIComponent(dirent_path);
},
getIconUrl: function(size) {