1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 23:29:49 +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

@@ -0,0 +1,44 @@
define([
'jquery',
'underscore',
'backbone',
'common'
], function($, _, Backbone, Common) {
'use strict';
var RepoPermissionsDialog = Backbone.View.extend({
tagName: 'div',
id: 'repo-permissions-dialog',
template: _.template($('#repo-permissions-dialog-tmpl').html()),
initialize: function(options) {
this.repo_name = options.repo_name;
this.repo_id = options.repo_id;
this.render();
this.$el.modal();
$("#simplemodal-container").css({'height':'auto'});
},
render: function() {
this.$el.html(this.template({
title: gettext("{placeholder} Permission Settings")
.replace('{placeholder}',
'<span class="op-target ellipsis ellipsis-op-target" title="'
+ Common.HTMLescape(this.repo_name) + '">'
+ Common.HTMLescape(this.repo_name) + '</span>'),
repo_id: this.repo_id
// TODO: get settings from server
}));
return this;
},
events: {
}
});
return RepoPermissionsDialog;
});