diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-09-30 08:57:21 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-09-30 08:57:21 +0000 |
commit | 3f739428a0007ec9116ac60e6ed501c1cad6cb63 (patch) | |
tree | c66794f0d6c4f62a460cd84806bc5cdd6ba845a7 | |
parent | e145f46a930b932ebc3ff70f75d69f45573cbad9 (diff) | |
parent | 693cee89f9262c6ca17248ee7a99db171c354abd (diff) | |
download | gitlab-ce-3f739428a0007ec9116ac60e6ed501c1cad6cb63.tar.gz |
Merge branch 'prevent_notes_polling' into 'master'
Prevent notes polling when there are not notes
See merge request !1132
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/assets/javascripts/notes.js.coffee | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index 3bcd8645a90..15942e396d7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v 7.4.0 - Sort search autocomplete projects by stars count so most popular go first - Do not delete tmp/repositories itself during clean-up, only its contents - Support for backup uploads to remote storage + - Prevent notes polling when there are not notes v 7.3.1 - Fix ref parsing in Gitlab::GitAccess diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index 597d6d26b69..ba8d7a9a2f5 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -6,6 +6,7 @@ class Notes @notes_url = gon.relative_url_root + @notes_url if gon.relative_url_root? @note_ids = note_ids @last_fetched_at = last_fetched_at + @noteable_url = document.URL @initRefresh() @setupMainTargetNoteForm() @cleanBinding() @@ -95,7 +96,8 @@ class Notes , 15000 refresh: -> - @getContent() unless document.hidden + unless document.hidden or (@noteable_url != document.URL) + @getContent() getContent: -> $.ajax |