mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 13:24:52 +00:00
redesigned side nav; removed 'top group nav'
This commit is contained in:
@@ -7,17 +7,15 @@ define([
|
||||
'app/views/myhome-sub-repos',
|
||||
'app/views/myhome-shared-repos',
|
||||
'app/views/starred-file',
|
||||
'app/views/activities',
|
||||
'app/views/myhome-side-nav'
|
||||
'app/views/activities'
|
||||
], function($, _, Backbone, Common, ReposView, SubReposView,
|
||||
SharedReposView, StarredFileView, ActivitiesView, MyhomeSideNavView) {
|
||||
SharedReposView, StarredFileView, ActivitiesView) {
|
||||
'use strict';
|
||||
|
||||
var MyHomeView = Backbone.View.extend({
|
||||
el: '#main',
|
||||
|
||||
initialize: function(options) {
|
||||
this.sideNavView = new MyhomeSideNavView();
|
||||
this.reposView = new ReposView();
|
||||
this.subReposView = new SubReposView();
|
||||
this.sharedReposView = new SharedReposView();
|
||||
@@ -32,42 +30,36 @@ define([
|
||||
},
|
||||
|
||||
showMyRepos: function() {
|
||||
this.sideNavView.show();
|
||||
this.currentView.hide();
|
||||
this.reposView.show();
|
||||
this.currentView = this.reposView;
|
||||
},
|
||||
|
||||
showMySubRepos: function() {
|
||||
this.sideNavView.show();
|
||||
this.currentView.hide();
|
||||
this.subReposView.show();
|
||||
this.currentView = this.subReposView;
|
||||
},
|
||||
|
||||
showSharedRepos: function() {
|
||||
this.sideNavView.show();
|
||||
this.currentView.hide();
|
||||
this.sharedReposView.show();
|
||||
this.currentView = this.sharedReposView;
|
||||
},
|
||||
|
||||
showStarredFile: function() {
|
||||
this.sideNavView.show({'cur_tab': 'starred'});
|
||||
this.currentView.hide();
|
||||
this.starredFileView.show();
|
||||
this.currentView = this.starredFileView;
|
||||
},
|
||||
|
||||
showActivities: function() {
|
||||
this.sideNavView.show({'cur_tab': 'activities'});
|
||||
this.currentView.hide();
|
||||
this.activitiesView.show();
|
||||
this.currentView = this.activitiesView;
|
||||
},
|
||||
|
||||
showDir: function(category, repo_id, path) {
|
||||
this.sideNavView.show();
|
||||
var path = path || '/';
|
||||
this.currentView.hide();
|
||||
this.dirView.showDir(category, repo_id, path);
|
||||
@@ -76,7 +68,6 @@ define([
|
||||
|
||||
hide: function() {
|
||||
this.currentView.hide();
|
||||
this.sideNavView.hide();
|
||||
}
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user