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

Add share link admin dialog and permission settings dialog

This commit is contained in:
Daniel Pan
2015-12-28 11:17:26 +08:00
committed by llj
parent 8d12ea22c7
commit 92044f6a34
4 changed files with 115 additions and 5 deletions

View File

@@ -4,8 +4,11 @@ define([
'backbone',
'common',
'app/views/share',
'app/views/dialogs/history-settings'
], function($, _, Backbone, Common, ShareView, HistorySettingsDialog) {
'app/views/dialogs/history-settings',
'app/views/dialogs/repo-permissions',
'app/views/dialogs/repo-share-link-admin'
], function($, _, Backbone, Common, ShareView, HistorySettingsDialog,
RepoPermissionsDialog, RepoShareLinkAdminDialog) {
'use strict';
var RepoView = Backbone.View.extend({
@@ -23,7 +26,8 @@ define([
'click .js-toggle-popup': 'togglePopup',
'click .js-repo-rename': 'rename',
'click .js-popup-history-settings': 'popupHistorySettings',
'click .js-popup-permission-settings': 'popupPermissionSettings'
'click .js-popup-permission-settings': 'popupPermissionSettings',
'click .js-popup-share-link-admin': 'popupShareLinkAdmin'
},
initialize: function() {
@@ -184,7 +188,17 @@ define([
'repo_id': this.model.get('id')
};
this.togglePopup(); // close the popup
new HistorySettingsDialog(options);
new RepoPermissionsDialog(options);
return false;
},
popupShareLinkAdmin: function() {
var options = {
'repo_name': this.model.get('name'),
'repo_id': this.model.get('id')
};
this.togglePopup(); // close the popup
new RepoShareLinkAdminDialog(options);
return false;
}