From da55298de1376b21b84faa49f1bb95214af3d359 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 27 Oct 2014 09:16:26 +0100 Subject: [PATCH] SONAR-5627 Fix infinite scrolling --- server/sonar-web/src/main/coffee/analysis-reports/app.coffee | 4 +++- .../src/main/coffee/analysis-reports/models/reports.coffee | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/coffee/analysis-reports/app.coffee b/server/sonar-web/src/main/coffee/analysis-reports/app.coffee index f0c19a1d9f6..0c602cada95 100644 --- a/server/sonar-web/src/main/coffee/analysis-reports/app.coffee +++ b/server/sonar-web/src/main/coffee/analysis-reports/app.coffee @@ -56,7 +56,9 @@ requirejs [ app: @ collection: @reports @layout.resultsRegion.show @reportsView - @reportsView.bindScrollEvents() unless @state.get 'active' + + unless @state.get('active') || @reports.paging.maxResultsReached + @reportsView.bindScrollEvents() unless @state.get 'active' @actionsView = new ActionsView app: @ diff --git a/server/sonar-web/src/main/coffee/analysis-reports/models/reports.coffee b/server/sonar-web/src/main/coffee/analysis-reports/models/reports.coffee index cbaeec3df68..16b23b10851 100644 --- a/server/sonar-web/src/main/coffee/analysis-reports/models/reports.coffee +++ b/server/sonar-web/src/main/coffee/analysis-reports/models/reports.coffee @@ -27,4 +27,6 @@ define [ fetchHistory: (options = { }) -> _.extend options, url: "#{baseUrl}/api/analysis_reports/history" + options.data = options.data || {} + options.data.ps = 50 @fetch options, { reset: true } -- 2.39.5