diff options
author | ZJ van de Weg <zegerjan@gitlab.com> | 2016-05-30 15:46:23 +0300 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-05-30 19:54:08 +0300 |
commit | cbd7801b3d1d435a95ec70032c5acc9df33b0337 (patch) | |
tree | 7bd367bf31690e4a6b0115d238cf2c312c9fb2ab /app/assets/javascripts/notes.js.coffee | |
parent | f99b38c9d5dab11677b2680a671c1a66fb69283b (diff) | |
parent | 2485bd7bbf9686f993d2a417943feff5c7d5b6f3 (diff) |
Merge branch 'master' into awardables
Diffstat (limited to 'app/assets/javascripts/notes.js.coffee')
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index b8359c31dfa..7c3d57fc194 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -114,9 +114,9 @@ class @Notes @refresh() , @pollingInterval - refresh: -> + refresh: => return if @refreshing is true - refreshing = true + @refreshing = true if not document.hidden and document.URL.indexOf(@noteable_url) is 0 @getContent() @@ -134,8 +134,8 @@ class @Notes @renderDiscussionNote(note) else @renderNote(note) - always: => - @refreshing = false + .always () => + @refreshing = false ### Increase @pollingInterval up to 120 seconds on every function call, @@ -329,7 +329,7 @@ class @Notes @renderDiscussionNote(note) # cleanup after successfully creating a diff/discussion note - @removeDiscussionNoteForm($("#new-discussion-note-form-#{note.discussion_id}")) + @removeDiscussionNoteForm($(xhr.target)) ### Called in response to the edit note form being submitted |