diff options
author | Fatih Acet <acetfatih@gmail.com> | 2018-11-07 16:13:11 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2018-11-07 16:13:11 +0000 |
commit | 762a3021b0762775105f783a08252f64d7720736 (patch) | |
tree | 2f8bb923423f1975fc5968856ae9b414a78d0d7b /app | |
parent | fcadef1d47333365a3c18d2cd7bfb6ed0dd0cbee (diff) | |
parent | 9406a497ba6214995d60be3f74252d295fac2da2 (diff) | |
download | gitlab-ce-762a3021b0762775105f783a08252f64d7720736.tar.gz |
Merge branch '6500-fix-misaligned-approvers-dropdown' into 'master'
Fix misaligned approvers dropdown
See merge request gitlab-org/gitlab-ce!22832
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/users_select.js | 28 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/selects.scss | 2 |
2 files changed, 18 insertions, 12 deletions
diff --git a/app/assets/javascripts/users_select.js b/app/assets/javascripts/users_select.js index 4b090212d83..ce051582299 100644 --- a/app/assets/javascripts/users_select.js +++ b/app/assets/javascripts/users_select.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, one-var, no-var, prefer-rest-params, vars-on-top, prefer-arrow-callback, consistent-return, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, yoda, prefer-spread, no-void, camelcase, no-param-reassign */ +/* eslint-disable func-names, one-var, no-var, prefer-rest-params, vars-on-top, prefer-arrow-callback, consistent-return, object-shorthand, no-shadow, no-unused-vars, no-else-return, no-self-compare, prefer-template, no-unused-expressions, yoda, prefer-spread, camelcase, no-param-reassign */ /* global Issuable */ /* global emitSidebarEvent */ @@ -696,17 +696,21 @@ UsersSelect.prototype.formatResult = function(user) { } else { 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'>" + - _.escape(user.name) + - "</div> <div class='user-username dropdown-menu-user-username'>" + - (!user.invite ? '@' + _.escape(user.username) : '') + - '</div> </div>' - ); + return ` + <div class='user-result'> + <div class='user-image'> + <img class='avatar avatar-inline s32' src='${avatar}'> + </div> + <div class='user-info'> + <div class='user-name dropdown-menu-user-full-name'> + ${_.escape(user.name)} + </div> + <div class='user-username dropdown-menu-user-username text-secondary'> + ${!user.invite ? '@' + _.escape(user.username) : ''} + </div> + </div> + </div> + `; }; UsersSelect.prototype.formatSelection = function(user) { diff --git a/app/assets/stylesheets/framework/selects.scss b/app/assets/stylesheets/framework/selects.scss index 381c0290d32..7f0edd88dfb 100644 --- a/app/assets/stylesheets/framework/selects.scss +++ b/app/assets/stylesheets/framework/selects.scss @@ -243,6 +243,8 @@ .user-result { min-height: 24px; + display: flex; + align-items: center; .user-image { float: left; |