1
0
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:
llj
2015-12-15 17:26:39 +08:00
committed by lian
parent 2fe8ed0cfb
commit 5f3c030a52
2 changed files with 14 additions and 4 deletions

View File

@@ -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; }
}
},