diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js index cfab6c40b34f703e9ae2d47f972299c872e38130..6000c56665bd80b5a054b034b3efe751e2ae7507 100644 --- a/app/assets/javascripts/autosave.js +++ b/app/assets/javascripts/autosave.js @@ -2,6 +2,11 @@ import AccessorUtilities from './lib/utils/accessor'; window.Autosave = (function() { + /** + * + * @param {*} field the textarea + * @param {Array} key Array with: ['Note', type, id, ] + */ function Autosave(field, key) { this.field = field; this.isLocalStorageAvailable = AccessorUtilities.isLocalStorageAccessSafe(); diff --git a/app/assets/javascripts/notes/components/issue_comment_form.vue b/app/assets/javascripts/notes/components/issue_comment_form.vue index b7b7140d77275ee44680bfd86f3a3465afb9ed1b..2ef2af5bbac6af70392edd83b7e9451dc076786b 100644 --- a/app/assets/javascripts/notes/components/issue_comment_form.vue +++ b/app/assets/javascripts/notes/components/issue_comment_form.vue @@ -1,5 +1,5 @@ diff --git a/app/assets/javascripts/notes/components/issue_discussion.vue b/app/assets/javascripts/notes/components/issue_discussion.vue index d4754178933b79fa9589005793437852562530ae..7952dfacc1332815359160a9046204bf0efc11c0 100644 --- a/app/assets/javascripts/notes/components/issue_discussion.vue +++ b/app/assets/javascripts/notes/components/issue_discussion.vue @@ -1,5 +1,5 @@ diff --git a/app/assets/javascripts/notes/components/issue_note.vue b/app/assets/javascripts/notes/components/issue_note.vue index 05bf1d2bca090d8c52f8f95cf6a6c2b1337f4be2..a41d646c0338eb901b362e5e87c21859d4966137 100644 --- a/app/assets/javascripts/notes/components/issue_note.vue +++ b/app/assets/javascripts/notes/components/issue_note.vue @@ -39,7 +39,6 @@ return { 'is-editing': this.isEditing, 'disabled-content': this.isDeleting, - //'js-my-note': this.author.id === this.currentUserId, target: this.targetNoteHash === this.noteAnchorId, }; }, diff --git a/app/assets/javascripts/notes/components/issue_note_body.vue b/app/assets/javascripts/notes/components/issue_note_body.vue index 29ac68598402436b0fc772ad26b821dda2a5cfa0..61990340391cc1132c0e7e64304bc8a9a274e549 100644 --- a/app/assets/javascripts/notes/components/issue_note_body.vue +++ b/app/assets/javascripts/notes/components/issue_note_body.vue @@ -1,8 +1,10 @@ diff --git a/app/assets/javascripts/notes/components/issue_notes_app.vue b/app/assets/javascripts/notes/components/issue_notes_app.vue index 14b7afe12870d45673b3a81450d5d81350ca5c56..4c0351f701bb957b2e57f4d054b113d9cbbdc18b 100644 --- a/app/assets/javascripts/notes/components/issue_notes_app.vue +++ b/app/assets/javascripts/notes/components/issue_notes_app.vue @@ -4,7 +4,6 @@ import { mapGetters, mapActions } from 'vuex'; import store from '../stores/'; import * as constants from '../constants'; - import eventHub from '../event_hub'; import issueNote from './issue_note.vue'; import issueDiscussion from './issue_discussion.vue'; import issueSystemNote from './issue_system_note.vue'; @@ -96,17 +95,6 @@ this.poll(); }, - bindEventHubListeners() { - this.$el.parentElement.addEventListener('toggleAward', (event) => { - const { awardName, noteId } = event.detail; - this.actionToggleAward({ awardName, noteId }); - }); - - // JQuery is needed here because it is a custom event being dispatched with jQuery. - $(document).on('issuable:change', (e, isClosed) => { - eventHub.$emit('issueStateChanged', isClosed); - }); - }, checkLocationHash() { const hash = gl.utils.getLocationHash(); const $el = $(`#${hash}`); @@ -125,7 +113,11 @@ mounted() { this.fetchNotes(); this.initPolling(); - this.bindEventHubListeners(); + + this.$el.parentElement.addEventListener('toggleAward', (event) => { + const { awardName, noteId } = event.detail; + this.actionToggleAward({ awardName, noteId }); + }); }, }; diff --git a/app/controllers/concerns/notes_actions.rb b/app/controllers/concerns/notes_actions.rb index 0f90137ad3d1bef0dba1f86ade49a3de5314e03d..1d0587aad3ad4113097522a720a94dc2286d42f8 100644 --- a/app/controllers/concerns/notes_actions.rb +++ b/app/controllers/concerns/notes_actions.rb @@ -179,7 +179,7 @@ module NotesActions def set_polling_interval_header return unless noteable.is_a?(Issue) - Gitlab::PollingInterval.set_header(response, interval: 3_000) + Gitlab::PollingInterval.set_header(response, interval: 6_000) end def noteable