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

new share admin page (#1233)

This commit is contained in:
lian
2016-06-30 15:06:43 +08:00
committed by Daniel Pan
parent 70021ebc18
commit c4fa072dc7
52 changed files with 2739 additions and 2186 deletions

View File

@@ -11,14 +11,19 @@ define([
'app/views/organization',
'app/views/dir',
'app/views/starred-file',
'app/views/devices',
'app/views/activities',
'app/views/devices',
'app/views/share-admin-repos',
'app/views/share-admin-folders',
'app/views/share-admin-share-links',
'app/views/share-admin-upload-links',
'app/views/notifications',
'app/views/account'
], function($, Backbone, Common, SideNavView, MyReposView,
SharedReposView, GroupsView, GroupView,
OrgView, DirView, StarredFileView, DevicesView, ActivitiesView,
NotificationsView, AccountView) {
SharedReposView, GroupsView, GroupView, OrgView, DirView,
StarredFileView, ActivitiesView, DevicesView, ShareAdminReposView,
ShareAdminFoldersView, ShareAdminShareLinksView,
ShareAdminUploadLinksView, NotificationsView, AccountView) {
"use strict";
var Router = Backbone.Router.extend({
@@ -38,6 +43,10 @@ define([
'starred/': 'showStarredFile',
'activities/': 'showActivities',
'devices/': 'showDevices',
'share-admin-libs/': 'showShareAdminRepos',
'share-admin-folders/': 'showShareAdminFolders',
'share-admin-share-links/': 'showShareAdminShareLinks',
'share-admin-upload-links/': 'showShareAdminUploadLinks',
// Default
'*actions': 'showRepos'
},
@@ -62,6 +71,10 @@ define([
this.starredFileView = new StarredFileView();
this.devicesView = new DevicesView();
this.activitiesView = new ActivitiesView();
this.shareAdminReposView = new ShareAdminReposView();
this.shareAdminFoldersView = new ShareAdminFoldersView();
this.shareAdminShareLinksView = new ShareAdminShareLinksView();
this.shareAdminUploadLinksView = new ShareAdminUploadLinksView();
app.ui.notificationsView = this.notificationsView = new NotificationsView();
app.ui.accountView = this.accountView = new AccountView();
@@ -204,16 +217,40 @@ define([
this.sideNavView.setCurTab('starred');
},
showActivities: function() {
this.switchCurrentView(this.activitiesView);
this.activitiesView.show();
this.sideNavView.setCurTab('activities');
},
showDevices: function() {
this.switchCurrentView(this.devicesView);
this.devicesView.show();
this.sideNavView.setCurTab('devices');
},
showActivities: function() {
this.switchCurrentView(this.activitiesView);
this.activitiesView.show();
this.sideNavView.setCurTab('activities');
showShareAdminRepos: function() {
this.switchCurrentView(this.shareAdminReposView);
this.shareAdminReposView.show();
this.sideNavView.setCurTab('share-admin-repos');
},
showShareAdminFolders: function() {
this.switchCurrentView(this.shareAdminFoldersView);
this.shareAdminFoldersView.show();
this.sideNavView.setCurTab('share-admin-folders');
},
showShareAdminShareLinks: function() {
this.switchCurrentView(this.shareAdminShareLinksView);
this.shareAdminShareLinksView.show();
this.sideNavView.setCurTab('share-admin-links');
},
showShareAdminUploadLinks: function() {
this.switchCurrentView(this.shareAdminUploadLinksView);
this.shareAdminUploadLinksView.show();
this.sideNavView.setCurTab('share-admin-links');
}
});