mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 14:42:10 +00:00
['search user'] select2: enable 'directly enter email'
* the separator is 'Enter', i.e., clicking the Enter key
This commit is contained in:
@@ -538,8 +538,6 @@ define([
|
||||
// tags need `<input type="hidden" />`, not `<select>`
|
||||
tags: [],
|
||||
|
||||
tokenSeparators: [",", " "],
|
||||
|
||||
minimumInputLength: 1, // input at least 1 character
|
||||
|
||||
formatInputTooShort: gettext("Please enter 1 or more character"),
|
||||
@@ -590,6 +588,13 @@ define([
|
||||
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)
|
||||
};
|
||||
},
|
||||
|
||||
escapeMarkup: function(m) { return m; }
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user