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

[groups] redesigned it.

This commit is contained in:
llj
2015-11-30 15:02:03 +08:00
parent 8b55b2ffaf
commit 1c18e3e716
17 changed files with 401 additions and 204 deletions

View File

@@ -4,11 +4,12 @@ define([
'backbone',
'common',
'app/views/myhome',
'app/views/groups',
'app/views/group',
'app/views/organization',
'app/views/dir',
'app/views/top-group-nav'
], function($, Backbone, Common, MyHomeView, GroupView, OrgView,
], function($, Backbone, Common, MyHomeView, GroupsView, GroupView, OrgView,
DirView, GroupNavView) {
"use strict";
@@ -21,6 +22,7 @@ define([
'my-sub-libs/lib/:repo_id(/*path)': 'showMySubRepoDir',
'shared-libs/': 'showSharedRepos',
'shared-libs/lib/:repo_id(/*path)': 'showSharedRepoDir',
'groups/': 'showGroups',
'group/:group_id/': 'showGroupRepos',
'group/:group_id/lib/:repo_id(/*path)': 'showGroupRepoDir',
'org/': 'showOrgRepos',
@@ -43,6 +45,8 @@ define([
this.groupView = new GroupView({dirView: this.dirView});
this.orgView = new OrgView({dirView: this.dirView});
this.groupsView = new GroupsView();
this.currentView = this.myHomeView;
if (app.pageOptions.top_nav_groups.length > 0) {
@@ -136,6 +140,11 @@ define([
this.myHomeView.showDir('shared-libs', repo_id, path);
},
showGroups: function () {
this.switchCurrentView(this.groupsView);
this.groupsView.show();
},
showGroupRepos: function(group_id) {
this.switchCurrentView(this.groupView);
this.groupView.showRepoList(group_id);