1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-31 22:57:47 +00:00

[system admin] repo share: fix

This commit is contained in:
llj 2016-08-06 14:37:21 +08:00 committed by lian
parent 92df1ef8d2
commit a3b15e6f62
2 changed files with 3 additions and 16 deletions

View File

@ -693,13 +693,7 @@ define([
// format selected item shown in the input
formatSelection: function(item) {
return _this.HTMLescape(item.name || item.id); // if no name, show the email, i.e., when directly input, show the email
},
createSearchChoice: function(term) {
return {
'id': $.trim(term)
};
return _this.HTMLescape(item.name);
},
escapeMarkup: function(m) { return m; }

View File

@ -9,7 +9,7 @@ define([
var SharePopupView = Backbone.View.extend({
tagName: 'div',
id: 'admin-library-share-popup',
id: 'share-popup',
template: _.template($('#share-popup-tmpl').html()),
initialize: function(options) {
@ -40,24 +40,17 @@ define([
this.$el.html(this.template({
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>'),
repo_id: this.repo_id,
repo_id: this.repo_id
}));
return this;
},
events: {
'click [type="checkbox"]': 'clickCheckbox',
'click #add-dir-user-share-item .submit': 'dirUserShare',
'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() {
var $dir_user_share_panel = this.$('#dir-user-share');