diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-10-31 19:15:03 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-10-31 19:15:03 +0300 |
commit | 6dc9028fbb3856c8c7814446ed176880f7d5213f (patch) | |
tree | b45870b8c946e5304a2fd3ad64a1453d166da0ca /app/assets/javascripts/issuable_context.js | |
parent | 74a0e855e1d5049e265c85ac01d511c25f2a46f1 (diff) |
Load participants async
Diffstat (limited to 'app/assets/javascripts/issuable_context.js')
-rw-r--r-- | app/assets/javascripts/issuable_context.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/app/assets/javascripts/issuable_context.js b/app/assets/javascripts/issuable_context.js index 5bc7f8d9cb9..da99394ff90 100644 --- a/app/assets/javascripts/issuable_context.js +++ b/app/assets/javascripts/issuable_context.js @@ -2,11 +2,8 @@ import Cookies from 'js-cookie'; import bp from './breakpoints'; import UsersSelect from './users_select'; -const PARTICIPANTS_ROW_COUNT = 7; - export default class IssuableContext { constructor(currentUser) { - this.initParticipants(); this.userSelect = new UsersSelect(currentUser); $('select.select2').select2({ @@ -51,29 +48,4 @@ export default class IssuableContext { } }); } - - initParticipants() { - $(document).on('click', '.js-participants-more', this.toggleHiddenParticipants); - return $('.js-participants-author').each(function forEachAuthor(i) { - if (i >= PARTICIPANTS_ROW_COUNT) { - $(this).addClass('js-participants-hidden').hide(); - } - }); - } - - toggleHiddenParticipants() { - const currentText = $(this).text().trim(); - const lessText = $(this).data('less-text'); - const originalText = $(this).data('original-text'); - - if (currentText === originalText) { - $(this).text(lessText); - - if (gl.lazyLoader) gl.lazyLoader.loadCheck(); - } else { - $(this).text(originalText); - } - - $('.js-participants-hidden').toggle(); - } } |