mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-25 14:50:29 +00:00
starred file page
This commit is contained in:
@@ -6,9 +6,10 @@ define([
|
||||
'app/views/myhome-repos',
|
||||
'app/views/myhome-sub-repos',
|
||||
'app/views/myhome-shared-repos',
|
||||
'app/views/starred-file',
|
||||
'app/views/myhome-side-nav'
|
||||
], function($, _, Backbone, Common, ReposView, SubReposView,
|
||||
SharedReposView, MyhomeSideNavView) {
|
||||
SharedReposView, StarredFileView, MyhomeSideNavView) {
|
||||
'use strict';
|
||||
|
||||
var MyHomeView = Backbone.View.extend({
|
||||
@@ -20,6 +21,7 @@ define([
|
||||
this.reposView = new ReposView();
|
||||
this.subReposView = new SubReposView();
|
||||
this.sharedReposView = new SharedReposView();
|
||||
this.starredFileView = new StarredFileView();
|
||||
|
||||
this.dirView = options.dirView;
|
||||
|
||||
@@ -28,33 +30,36 @@ define([
|
||||
$('#initial-loading-view').hide();
|
||||
},
|
||||
|
||||
showSideNav: function () {
|
||||
this.sideNavView.show();
|
||||
},
|
||||
|
||||
showMyRepos: function() {
|
||||
this.showSideNav();
|
||||
this.sideNavView.show('my-libs');
|
||||
this.currentView.hide();
|
||||
this.reposView.show();
|
||||
this.currentView = this.reposView;
|
||||
},
|
||||
|
||||
showMySubRepos: function() {
|
||||
this.showSideNav();
|
||||
this.sideNavView.show('my-libs');
|
||||
this.currentView.hide();
|
||||
this.subReposView.show();
|
||||
this.currentView = this.subReposView;
|
||||
},
|
||||
|
||||
showSharedRepos: function() {
|
||||
this.showSideNav();
|
||||
this.sideNavView.show('my-libs');
|
||||
this.currentView.hide();
|
||||
this.sharedReposView.show();
|
||||
this.currentView = this.sharedReposView;
|
||||
},
|
||||
|
||||
showStarredFile: function() {
|
||||
this.sideNavView.show('starred');
|
||||
this.currentView.hide();
|
||||
this.starredFileView.show();
|
||||
this.currentView = this.starredFileView;
|
||||
},
|
||||
|
||||
showDir: function(category, repo_id, path) {
|
||||
this.showSideNav();
|
||||
this.sideNavView.show('my-libs');
|
||||
var path = path || '/';
|
||||
this.currentView.hide();
|
||||
this.dirView.showDir(category, repo_id, path);
|
||||
|
Reference in New Issue
Block a user