From: Stas Vilchik Date: Mon, 27 Oct 2014 08:16:26 +0000 (+0100) Subject: SONAR-5627 Fix infinite scrolling X-Git-Tag: 5.0-RC1~577 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=da55298de1376b21b84faa49f1bb95214af3d359;p=sonarqube.git SONAR-5627 Fix infinite scrolling --- 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 }