Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort Pageable Analyze Tables Over Full Collection #2088

Merged
merged 2 commits into from
Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 28 additions & 59 deletions src/mmw/js/src/analyze/templates/catchmentWaterQualityTable.html
Original file line number Diff line number Diff line change
@@ -1,59 +1,28 @@
<div class="pageable-table-container">
{% if totalPages > 1 %}
<div class="row paging-ctl-row">
{% if hasPreviousPage %}
<button
class="btn-prev-page btn btn-primary col-sm-1 col-sm-offset-3"
data-toggle="tooltip"
title="Previous Page"
data-placement="right"
>
<span aria-hidden="true">&larr;</span>
</button>
{% endif %}
<p class="col-sm-3 {{ "col-sm-offset-4" if not hasPreviousPage else "" }}">
{{currentPage}} of {{totalPages}}
</p>
{% if hasNextPage %}
<button
class="btn-next-page btn btn-primary col-sm-1"
data-toggle="tooltip"
title="Next Page"
data-placement="right"
>
<span aria-hidden="true">&rarr;</span>
</button>
{% endif %}
</div>
{% endif %}
<table class="table custom-hover catchment-water-quality pageable-table-size" data-toggle="table">
<thead>
<tr>
<th data-sortable="true">Id</th>
<th data-sortable="true" data-sorter="window.noDataSort"> Area (ha)</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Total N (kg/ha)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Total P (kg/ha)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Total SS (kg/ha)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Avg TN (mg/l)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Avg TP (mg/l)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Avg TSS (mg/l)
</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
</tfoot>
</table>
</div>
<table class="table custom-hover catchment-water-quality pageable-table-size" data-toggle="table">
<thead>
<tr>
<th data-sortable="true" data-field="nord">Id</th>
<th data-sortable="true" data-field="areaha" data-sorter="window.noDataSort"> Area (ha)</th>
<th class="text-right" data-field="tn_tot_kgy" data-sortable="true" data-sorter="window.noDataSort">
Total N (kg/ha)
</th>
<th class="text-right" data-field="tp_tot_kgy" data-sortable="true" data-sorter="window.noDataSort">
Total P (kg/ha)
</th>
<th class="text-right" data-field="tss_tot_kg" data-sortable="true" data-sorter="window.noDataSort">
Total SS (kg/ha)
</th>
<th class="text-right" data-field="tn_yr_avg_" data-sortable="true" data-sorter="window.noDataSort">
Avg TN (mg/l)
</th>
<th class="text-right" data-field="tp_yr_avg_" data-sortable="true" data-sorter="window.noDataSort">
Avg TP (mg/l)
</th>
<th class="text-right" data-field="tss_concmg" data-sortable="true" data-sorter="window.noDataSort">
Avg TSS (mg/l)
</th>
</tr>
</thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
30 changes: 30 additions & 0 deletions src/mmw/js/src/analyze/templates/pageableTable.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div class="pageable-table-container">
{% if totalPages > 1 %}
<div class="row paging-ctl-row">
{% if hasPreviousPage %}
<button
class="btn-prev-page btn btn-primary col-sm-1 col-sm-offset-3"
data-toggle="tooltip"
title="Previous Page"
data-placement="right"
>
<span aria-hidden="true">&larr;</span>
</button>
{% endif %}
<p class="col-sm-3 {{ "col-sm-offset-4" if not hasPreviousPage else "" }}">
{{currentPage}} of {{totalPages}}
</p>
{% if hasNextPage %}
<button
class="btn-next-page btn btn-primary col-sm-1"
data-toggle="tooltip"
title="Next Page"
data-placement="right"
>
<span aria-hidden="true">&rarr;</span>
</button>
{% endif %}
</div>
{% endif %}
<div id="bootstrap-table-region"></div>
</div>
98 changes: 34 additions & 64 deletions src/mmw/js/src/analyze/templates/pointSourceTable.html
Original file line number Diff line number Diff line change
@@ -1,64 +1,34 @@
<div class="pageable-table-container">
{% if totalPages > 1 %}
<div class="row paging-ctl-row">
{% if hasPreviousPage %}
<button
class="btn-prev-page btn btn-primary col-sm-1 col-sm-offset-3"
data-toggle="tooltip"
title="Previous Page"
data-placement="right"
>
<span aria-hidden="true">&larr;</span>
</button>
{% endif %}
<p class="col-sm-3 {{ "col-sm-offset-4" if not hasPreviousPage else "" }}">
{{currentPage}} of {{totalPages}}
</p>
{% if hasNextPage %}
<button
class="btn-next-page btn btn-primary col-sm-1"
data-toggle="tooltip"
title="Next Page"
data-placement="right"
>
<span aria-hidden="true">&rarr;</span>
</button>
{% endif %}
</div>
{% endif %}
<table class="table custom-hover point-source pageable-table-size" data-toggle="table">
<thead>
<tr>
<th data-sortable="true">NPDES Code</th>
<th data-sortable="true">City</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
Discharge (MGD)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
TN Load (kg/yr)
</th>
<th class="text-right" data-sortable="true" data-sorter="window.noDataSort">
TP Load (kg/yr)
</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
<tr class="ptsrc-table-footer">
<td class="strong text-right" colspan="2">
Total For Area of Interest
</td>
<td class="ptsrc-footer-item strong text-right">
{{ totalMGD|filterNoData()|toLocaleString(3) }}
</td>
<td class="ptsrc-footer-item strong text-right">
{{ totalKGN|filterNoData()|toLocaleString(3) }}
</td>
<td class="ptsrc-footer-item strong text-right">
{{ totalKGP|filterNoData()|toLocaleString(3) }}
</td>
</tr>
</tfoot>
</table>
</div>
<table class="table custom-hover point-source pageable-table-size" data-toggle="table">
<thead>
<tr>
<th data-field="npdes_id" data-sortable="true">NPDES Code</th>
<th data-field="city" data-sortable="true">City</th>
<th data-field="mgd" class="text-right" data-sortable="true">
Discharge (MGD)
</th>
<th data-field="kgn_yr" class="text-right" data-sortable="true">
TN Load (kg/yr)
</th>
<th data-field="kgp_yr" class="text-right" data-sortable="true">
TP Load (kg/yr)
</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr class="ptsrc-table-footer">
<td class="strong text-right" colspan="2">
Total For Area of Interest
</td>
<td class="ptsrc-footer-item strong text-right">
{{ totalMGD|filterNoData()|toLocaleString(3) }}
</td>
<td class="ptsrc-footer-item strong text-right">
{{ totalKGN|filterNoData()|toLocaleString(3) }}
</td>
<td class="ptsrc-footer-item strong text-right">
{{ totalKGP|filterNoData()|toLocaleString(3) }}
</td>
</tr>
</tfoot>
</table>
Loading