1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

[select2] modification for long name/email

This commit is contained in:
llj
2015-06-17 14:26:31 +08:00
parent a32ae19a4b
commit 945648de4c
3 changed files with 3 additions and 2 deletions

View File

@@ -3551,6 +3551,7 @@ textarea:-moz-placeholder {/* for FF */
}
.select2-result-label .text {
display:inline-block;
width:calc(100% - 42px);
}
.select2-results .select2-result-label .avatar {
margin-right:10px;

View File

@@ -852,7 +852,7 @@ function userInputOPtionsForSelect2(user_search_url) {
// format items shown in the drop-down menu
formatResult: function(item) {
if (item.avatar) {
return item.avatar + '<span class="text">' + HTMLescape(item.name) + '<br />' + HTMLescape(item.id) + '</span>';
return item.avatar + '<span class="text ellipsis">' + HTMLescape(item.name) + '<br />' + HTMLescape(item.id) + '</span>';
} else {
return; // if no match, show nothing
}

View File

@@ -539,7 +539,7 @@ define([
// format items shown in the drop-down menu
formatResult: function(item) {
if (item.avatar) {
return item.avatar + '<span class="text">' + _this.HTMLescape(item.name) + '<br />' + _this.HTMLescape(item.id) + '</span>';
return item.avatar + '<span class="text ellipsis">' + _this.HTMLescape(item.name) + '<br />' + _this.HTMLescape(item.id) + '</span>';
} else {
return; // if no match, show nothing
}