diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-28 18:59:01 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-05-28 18:59:01 +0300 |
commit | 45f9cca9b30c4f3f57d5abfc01b347adbc3ce34b (patch) | |
tree | c42981ca4eb27f75f1f77bcf5052825b1d822cd3 /app | |
parent | 98cf0ae3384afa34a417766f46a7b3171dc40279 (diff) | |
download | gitlab-ce-45f9cca9b30c4f3f57d5abfc01b347adbc3ce34b.tar.gz |
Unbind document scroll on page:fetch to disable endlessScroll on pages where it is not used
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/main.js.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/main.js.coffee b/app/assets/javascripts/main.js.coffee index 65005d6f617..fd7e296efde 100644 --- a/app/assets/javascripts/main.js.coffee +++ b/app/assets/javascripts/main.js.coffee @@ -50,7 +50,11 @@ window.startSpinner = -> window.stopSpinner = -> $('.turbolink-spinner').fadeOut() +window.stopEndlessScroll = -> + $(document).unbind('scroll') + document.addEventListener("page:fetch", startSpinner) +document.addEventListener("page:fetch", stopEndlessScroll) document.addEventListener("page:receive", stopSpinner) $ -> |