diff options
Diffstat (limited to 'app/assets/javascripts/diff_notes/components/resolve_btn.js.es6')
-rw-r--r-- | app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 b/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 index bcc052c7c8c..88a19fc6e1d 100644 --- a/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 +++ b/app/assets/javascripts/diff_notes/components/resolve_btn.js.es6 @@ -1,6 +1,11 @@ -/* eslint-disable */ -((w) => { - w.ResolveBtn = Vue.extend({ +/* eslint-disable comma-dangle, object-shorthand, func-names, quote-props, no-else-return, camelcase, no-new, max-len */ +/* global Vue */ +/* global CommentsStore */ +/* global ResolveService */ +/* global Flash */ + +(() => { + const ResolveBtn = Vue.extend({ props: { noteId: Number, discussionId: String, @@ -54,7 +59,7 @@ }, methods: { updateTooltip: function () { - $(this.$els.button) + $(this.$refs.button) .tooltip('hide') .tooltip('fixTitle'); }, @@ -89,8 +94,8 @@ }); } }, - compiled: function () { - $(this.$els.button).tooltip({ + mounted: function () { + $(this.$refs.button).tooltip({ container: 'body' }); }, @@ -101,4 +106,6 @@ CommentsStore.create(this.discussionId, this.noteId, this.canResolve, this.resolved, this.resolvedBy); } }); -})(window); + + Vue.component('resolve-btn', ResolveBtn); +})(); |