Commit cd5599a5 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: camelCase event names.

parent a59f2369
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
const myLastNoteId = $('.js-my-note').last().attr('id'); const myLastNoteId = $('.js-my-note').last().attr('id');
if (myLastNoteId) { if (myLastNoteId) {
eventHub.$emit('EnterEditMode', { eventHub.$emit('enterEditMode', {
noteId: parseInt(myLastNoteId.replace('note_', ''), 10), noteId: parseInt(myLastNoteId.replace('note_', ''), 10),
}); });
} }
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
this.markdownDocsUrl = markdownDocs; this.markdownDocsUrl = markdownDocs;
this.markdownPreviewUrl = markdownPreviewUrl; this.markdownPreviewUrl = markdownPreviewUrl;
eventHub.$on('IssueStateChanged', (isClosed) => { eventHub.$on('issueStateChanged', (isClosed) => {
this.issueState = isClosed ? 'closed' : 'reopened'; this.issueState = isClosed ? 'closed' : 'reopened';
}); });
}, },
......
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
}, },
}, },
created() { created() {
eventHub.$on('EnterEditMode', ({ noteId }) => { eventHub.$on('enterEditMode', ({ noteId }) => {
if (noteId === this.note.id) { if (noteId === this.note.id) {
this.isEditing = true; this.isEditing = true;
this.$store.dispatch('scrollToNoteIfNeeded', $(this.$el)); this.$store.dispatch('scrollToNoteIfNeeded', $(this.$el));
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
const myLastNoteId = discussion.find('.js-my-note').last().attr('id'); const myLastNoteId = discussion.find('.js-my-note').last().attr('id');
if (myLastNoteId) { if (myLastNoteId) {
eventHub.$emit('EnterEditMode', { eventHub.$emit('enterEditMode', {
noteId: parseInt(myLastNoteId.replace('note_', ''), 10), noteId: parseInt(myLastNoteId.replace('note_', ''), 10),
}); });
} }
......
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
}); });
$(document).on('issuable:change', (e, isClosed) => { $(document).on('issuable:change', (e, isClosed) => {
eventHub.$emit('IssueStateChanged', isClosed); eventHub.$emit('issueStateChanged', isClosed);
}); });
}, },
checkLocationHash() { checkLocationHash() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment