mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-10 03:17:39 +00:00
[system admin] repo share: fix
This commit is contained in:
parent
92df1ef8d2
commit
a3b15e6f62
@ -693,13 +693,7 @@ define([
|
|||||||
|
|
||||||
// format selected item shown in the input
|
// format selected item shown in the input
|
||||||
formatSelection: function(item) {
|
formatSelection: function(item) {
|
||||||
return _this.HTMLescape(item.name || item.id); // if no name, show the email, i.e., when directly input, show the email
|
return _this.HTMLescape(item.name);
|
||||||
},
|
|
||||||
|
|
||||||
createSearchChoice: function(term) {
|
|
||||||
return {
|
|
||||||
'id': $.trim(term)
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
escapeMarkup: function(m) { return m; }
|
escapeMarkup: function(m) { return m; }
|
||||||
|
@ -9,7 +9,7 @@ define([
|
|||||||
|
|
||||||
var SharePopupView = Backbone.View.extend({
|
var SharePopupView = Backbone.View.extend({
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
id: 'admin-library-share-popup',
|
id: 'share-popup',
|
||||||
template: _.template($('#share-popup-tmpl').html()),
|
template: _.template($('#share-popup-tmpl').html()),
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
@ -40,24 +40,17 @@ define([
|
|||||||
this.$el.html(this.template({
|
this.$el.html(this.template({
|
||||||
title: gettext("Share {placeholder}")
|
title: gettext("Share {placeholder}")
|
||||||
.replace('{placeholder}', '<span class="op-target ellipsis ellipsis-op-target" title="' + Common.HTMLescape(this.repo_name) + '">' + Common.HTMLescape(this.repo_name) + '</span>'),
|
.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,
|
repo_id: this.repo_id
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click [type="checkbox"]': 'clickCheckbox',
|
|
||||||
'click #add-dir-user-share-item .submit': 'dirUserShare',
|
'click #add-dir-user-share-item .submit': 'dirUserShare',
|
||||||
'click #add-dir-group-share-item .submit': 'dirGroupShare'
|
'click #add-dir-group-share-item .submit': 'dirGroupShare'
|
||||||
},
|
},
|
||||||
|
|
||||||
clickCheckbox: function(e) {
|
|
||||||
var $el = $(e.currentTarget);
|
|
||||||
// for link options such as 'password', 'expire'
|
|
||||||
$el.closest('.checkbox-label').next().toggleClass('hide');
|
|
||||||
},
|
|
||||||
|
|
||||||
dirUserSharePanelInit: function() {
|
dirUserSharePanelInit: function() {
|
||||||
var $dir_user_share_panel = this.$('#dir-user-share');
|
var $dir_user_share_panel = this.$('#dir-user-share');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user