diff options
author | Phil Hughes <me@iamphill.com> | 2017-03-08 16:07:26 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-03-08 16:07:26 +0000 |
commit | 1466b7eecc56194e2967393dec559912df20e9bb (patch) | |
tree | 65aedcd3326e459d43c6eb6e1cd78271eccc2aed /app/assets/javascripts/diff_notes/diff_notes_bundle.js | |
parent | d20a6033858c316e20d5c3574c91f12be66fae17 (diff) | |
download | gitlab-ce-1466b7eecc56194e2967393dec559912df20e9bb.tar.gz |
Added discussion comments avatars to diff
Diffstat (limited to 'app/assets/javascripts/diff_notes/diff_notes_bundle.js')
-rw-r--r-- | app/assets/javascripts/diff_notes/diff_notes_bundle.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/diff_notes/diff_notes_bundle.js b/app/assets/javascripts/diff_notes/diff_notes_bundle.js index cadf8b96b87..7d8316dfd63 100644 --- a/app/assets/javascripts/diff_notes/diff_notes_bundle.js +++ b/app/assets/javascripts/diff_notes/diff_notes_bundle.js @@ -13,6 +13,7 @@ require('./components/jump_to_discussion'); require('./components/resolve_btn'); require('./components/resolve_count'); require('./components/resolve_discussion_btn'); +require('./components/diff_note_avatars'); $(() => { const projectPath = document.querySelector('.merge-request').dataset.projectPath; @@ -24,6 +25,15 @@ $(() => { window.ResolveService = new gl.DiffNotesResolveServiceClass(projectPath); gl.diffNotesCompileComponents = () => { + $('diff-note-avatars').each(function () { + const tmp = Vue.extend({ + template: $(this).get(0).outerHTML + }); + const tmpApp = new tmp().$mount(); + + $(this).replaceWith(tmpApp.$el); + }); + const $components = $(COMPONENT_SELECTOR).filter(function () { return $(this).closest('resolve-count').length !== 1; }); |