diff --git a/static/scripts/common.js b/static/scripts/common.js index defe7ae589..bcf2351357 100644 --- a/static/scripts/common.js +++ b/static/scripts/common.js @@ -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; } diff --git a/static/scripts/sysadmin-app/views/share.js b/static/scripts/sysadmin-app/views/share.js index 1e6c1be40b..245d80954b 100644 --- a/static/scripts/sysadmin-app/views/share.js +++ b/static/scripts/sysadmin-app/views/share.js @@ -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}', '' + Common.HTMLescape(this.repo_name) + ''), - 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');