1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

Merge pull request #519 from haiwen/new-url

new repo/dir/group url
This commit is contained in:
xiez
2015-04-25 15:43:51 +08:00
28 changed files with 71 additions and 42 deletions

View File

@@ -26,6 +26,7 @@ define([
'org/': 'showOrgRepos',
'org/lib/:repo_id(/*path)': 'showOrgRepoDir',
'common/lib/:repo_id(/*path)': 'showCommonDir',
// Default
'*actions': 'defaultAction'
},
@@ -81,6 +82,16 @@ define([
this.myHomeView.showDir('my-libs', repo_id, path);
},
showCommonDir: function(repo_id, path) {
if (path) {
path = '/' + path;
} else {
path = '/';
}
this.switchCurrentView(this.myHomeView);
this.myHomeView.showDir('common', repo_id, path);
},
showMySubRepoDir: function(repo_id, path) {
if (path) {
path = '/' + path;

View File

@@ -226,6 +226,8 @@ define([
context = 'org';
} else if (category_start == 'group') {
context = 'group';
} else if (category_start == 'common') {
context = 'common';
}
var obj = {
path: path,