Skip to content

Commit

Permalink
Merge pull request #2174 from WikiWatershed/cpc/fix-analyze-chart-pag…
Browse files Browse the repository at this point in the history
…ination

Increase number of rows in pageable tables
  • Loading branch information
caseycesari committed Aug 24, 2017
2 parents 939943b + 621e892 commit d5a4319
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mmw/js/src/analyze/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ var PointSourceResultView = AnalyzeResultView.extend({
associatedLayerCodes = ['pointsource'],
avgRowHeight = 30, // Most rows are between 2-3 lines, 12px per line
minScreenHeight = 768 + 45, // height of landscape iPad + extra content below the table
pageSize = utils.calculateVisibleRows(minScreenHeight, avgRowHeight, 3),
pageSize = utils.calculateVisibleRows(minScreenHeight, avgRowHeight, 6),
chart = null;
this.showAnalyzeResults(coreModels.PointSourceCensusCollection,
PointSourcePageableTableView, chart, title, source, helpText, associatedLayerCodes, pageSize);
Expand All @@ -1118,7 +1118,7 @@ var CatchmentWaterQualityResultView = AnalyzeResultView.extend({
],
avgRowHeight = 18, // Most rows are between 1-2 lines, 12px per line
minScreenHeight = 768 + 45, // height of landscape iPad + extra content below the table
pageSize = utils.calculateVisibleRows(minScreenHeight, avgRowHeight, 5),
pageSize = utils.calculateVisibleRows(minScreenHeight, avgRowHeight, 6),
chart = null;
this.showAnalyzeResults(coreModels.CatchmentWaterQualityCensusCollection,
CatchmentWaterQualityPageableTableView, chart, title, source, helpText,
Expand Down
4 changes: 2 additions & 2 deletions src/mmw/js/src/core/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,13 @@ var AnimalCensusCollection = Backbone.Collection.extend({
var PointSourceCensusCollection = Backbone.PageableCollection.extend({
comparator: 'city',
mode: 'client',
state: { pageSize: 3, firstPage: 1 }
state: { pageSize: 6, firstPage: 1 }
});

var CatchmentWaterQualityCensusCollection = Backbone.PageableCollection.extend({
comparator: 'nord',
mode: 'client',
state: { pageSize: 5, firstPage: 1 }
state: { pageSize: 6, firstPage: 1 }
});

var GeoModel = Backbone.Model.extend({
Expand Down
5 changes: 5 additions & 0 deletions src/mmw/sass/pages/_analyze.scss
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@
.pageable-table-container {
overflow: visible;
padding-bottom:10%;

tbody {
white-space: nowrap;
}

@media (max-height: 884px) {
padding-bottom:0px;
}
Expand Down

0 comments on commit d5a4319

Please sign in to comment.