Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ae321c89
Commit
ae321c89
authored
Aug 24, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the User Selection Display
parent
b01f5e85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+6
-6
No files found.
app/assets/javascripts/users_select.js
View file @
ae321c89
...
@@ -75,7 +75,7 @@ function UsersSelect(currentUser, els) {
...
@@ -75,7 +75,7 @@ function UsersSelect(currentUser, els) {
if
(
currentUserInfo
)
{
if
(
currentUserInfo
)
{
input
.
value
=
currentUserInfo
.
id
;
input
.
value
=
currentUserInfo
.
id
;
input
.
dataset
.
meta
=
currentUserInfo
.
name
;
input
.
dataset
.
meta
=
_
.
escape
(
currentUserInfo
.
name
)
;
}
else
if
(
_this
.
currentUser
)
{
}
else
if
(
_this
.
currentUser
)
{
input
.
value
=
_this
.
currentUser
.
id
;
input
.
value
=
_this
.
currentUser
.
id
;
}
}
...
@@ -198,7 +198,7 @@ function UsersSelect(currentUser, els) {
...
@@ -198,7 +198,7 @@ function UsersSelect(currentUser, els) {
};
};
}
}
$value
.
html
(
assigneeTemplate
(
user
));
$value
.
html
(
assigneeTemplate
(
user
));
$collapsedSidebar
.
attr
(
'
title
'
,
user
.
name
).
tooltip
(
'
fixTitle
'
);
$collapsedSidebar
.
attr
(
'
title
'
,
_
.
escape
(
user
.
name
)
).
tooltip
(
'
fixTitle
'
);
return
$collapsedSidebar
.
html
(
collapsedAssigneeTemplate
(
user
));
return
$collapsedSidebar
.
html
(
collapsedAssigneeTemplate
(
user
));
});
});
};
};
...
@@ -506,7 +506,7 @@ function UsersSelect(currentUser, els) {
...
@@ -506,7 +506,7 @@ function UsersSelect(currentUser, els) {
img
=
""
;
img
=
""
;
if
(
user
.
beforeDivider
!=
null
)
{
if
(
user
.
beforeDivider
!=
null
)
{
`<li><a href='#' class='
${
selected
===
true
?
'
is-active
'
:
''
}
'>
${
user
.
name
}
</a></li>`
;
`<li><a href='#' class='
${
selected
===
true
?
'
is-active
'
:
''
}
'>
${
_
.
escape
(
user
.
name
)
}
</a></li>`
;
}
else
{
}
else
{
if
(
avatar
)
{
if
(
avatar
)
{
img
=
"
<img src='
"
+
avatar
+
"
' class='avatar avatar-inline' width='32' />
"
;
img
=
"
<img src='
"
+
avatar
+
"
' class='avatar avatar-inline' width='32' />
"
;
...
@@ -518,7 +518,7 @@ function UsersSelect(currentUser, els) {
...
@@ -518,7 +518,7 @@ function UsersSelect(currentUser, els) {
<a href='#' class='dropdown-menu-user-link
${
selected
===
true
?
'
is-active
'
:
''
}
'>
<a href='#' class='dropdown-menu-user-link
${
selected
===
true
?
'
is-active
'
:
''
}
'>
${
img
}
${
img
}
<strong class='dropdown-menu-user-full-name'>
<strong class='dropdown-menu-user-full-name'>
${
user
.
name
}
${
_
.
escape
(
user
.
name
)
}
</strong>
</strong>
${
username
?
`<span class='dropdown-menu-user-username'>
${
username
}
</span>`
:
''
}
${
username
?
`<span class='dropdown-menu-user-username'>
${
username
}
</span>`
:
''
}
</a>
</a>
...
@@ -642,11 +642,11 @@ UsersSelect.prototype.formatResult = function(user) {
...
@@ -642,11 +642,11 @@ UsersSelect.prototype.formatResult = function(user) {
}
else
{
}
else
{
avatar
=
gon
.
default_avatar_url
;
avatar
=
gon
.
default_avatar_url
;
}
}
return
"
<div class='user-result
"
+
(
!
user
.
username
?
'
no-username
'
:
void
0
)
+
"
'> <div class='user-image'><img class='avatar avatar-inline s32' src='
"
+
avatar
+
"
'></div> <div class='user-name dropdown-menu-user-full-name'>
"
+
user
.
name
+
"
</div> <div class='user-username dropdown-menu-user-username'>
"
+
(
"
@
"
+
user
.
username
||
""
)
+
"
</div> </div>
"
;
return
"
<div class='user-result
"
+
(
!
user
.
username
?
'
no-username
'
:
void
0
)
+
"
'> <div class='user-image'><img class='avatar avatar-inline s32' src='
"
+
avatar
+
"
'></div> <div class='user-name dropdown-menu-user-full-name'>
"
+
_
.
escape
(
user
.
name
)
+
"
</div> <div class='user-username dropdown-menu-user-username'>
"
+
(
"
@
"
+
user
.
username
||
""
)
+
"
</div> </div>
"
;
};
};
UsersSelect
.
prototype
.
formatSelection
=
function
(
user
)
{
UsersSelect
.
prototype
.
formatSelection
=
function
(
user
)
{
return
user
.
name
;
return
_
.
escape
(
user
.
name
)
;
};
};
UsersSelect
.
prototype
.
user
=
function
(
user_id
,
callback
)
{
UsersSelect
.
prototype
.
user
=
function
(
user_id
,
callback
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment