Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobami committed Feb 16, 2010
1 parent f87e1ae commit a393cc9
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion pyspeed/templates/result_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
{% extends "base.html" %}
{% block script %}
<script type="text/javascript" src="/media/js/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
$(function() {
$("#results > tbody > tr").each(function() {
//Color change column
// var change = $(this).children("td:eq(2)").text().slice(0, -1);
// var colorcode = "status-yellow";
// if(change > 0.3) { colorcode = "status-red"; }
// else if(change < -0.3) { colorcode = "status-green"; }
// $(this).children("td:eq(2)").addClass(colorcode);
// //Color comparison column
// var comp = $(this).children("td:eq(4)").text().slice(0, -1);
// // $(this).children("td:eq(4)").text(comp + "x");
// colorcode = "status-yellow";
// if(comp < 0.8) { colorcode = "status-red"; }
// else if(comp > 1.2) { colorcode = "status-green"; }
// $(this).children("td:eq(4)").addClass(colorcode);
// //Size bars according to comparison value
// comp = comp*13.2;
// if (comp > 100) {comp = 100;}
// $(this).children("td:eq(5)").find("img").width(comp + "%");
// });
// $.tablesorter.defaults.sortList = [[4,0]];
// $.tablesorter.defaults.headers = { 5: { sorter: false } };
$("#results").tablesorter({widgets: ['zebra']});
$("#results tbody td").hover(function() {
$(this).parents('tr').addClass('highlight');
}, function() {
$(this).parents('tr').removeClass('highlight');
});
});
</script>
{% block body %}
<table><tr><th>Revision</th><th>Interpreter</th><th>Compile options</th><th>Benchmark</th><th>Result</th><th>run date</th></tr>
<table id="results"><tr><th>Revision</th><th>Interpreter</th><th>Compile options</th><th>Benchmark</th><th>Result</th><th>run date</th></tr>
{% for result in result_list %}<tr>
<td>{{ result.revision.number }}</td><td>{{ result.interpreter.name }}</td><td>{{ result.interpreter.coptions }}</td><td>{{ result.benchmark }}</td><td>{{ result.value }}</td><td>{{ result.date }}</td>
</tr>{% endfor %}
Expand Down

0 comments on commit a393cc9

Please sign in to comment.