Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Fixes sorting by hashrate on round stats
Browse files Browse the repository at this point in the history
  • Loading branch information
icook committed Apr 29, 2014
1 parent 66f7015 commit 4412b63
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions templates/round_summary.html
Expand Up @@ -4,7 +4,15 @@
{% block body %}
<script>
$(document).ready(function() {
$("#roundSummary").tablesorter();
$("#roundSummary").tablesorter({
textExtraction: function(node) {
var attr = $(node).attr('data-sort-value');
if (typeof attr !== 'undefined' && attr !== false) {
return attr;
}
return $(node).text();
}
});
});
</script>

Expand Down Expand Up @@ -91,7 +99,7 @@ <h2>Top Users PPLNS Summary <small><i class="fa fa-question-circle" data-toggle=
<a href="/{{ dat['user'] }}">{{ dat['user'] }}</a></th>
{% endif %}
<th>{{ '{:,}'.format(dat['shares'] | int) }}</th>
<th>{{ '{:,}'.format((dat['hashrate'] / 1000) | round(2)) }} KH/s</th>
<th data-sort-value="{{ dat['hashrate'] }}">{{ '{:,}'.format((dat['hashrate'] / 1000) | round(2)) }} KH/s</th>
<th>{% if donation_perc != None %}{{ '{:0.1f}'.format(dat['donation_perc']) }}%{% else %}-{% endif %} </th>
</tr>
{% endfor %}
Expand Down

0 comments on commit 4412b63

Please sign in to comment.