Revision: 5e2023936bce
Author: Pekka Klärck
Date: Mon Aug 27 05:40:04 2012
Log: log/report: Better way to sort stats by name in ascending order
initially.
Update issue 1199
Needed to update tablesorter for other reasons. New version allowed setting
initial sorting order in by column.
http://code.google.com/p/robotframework/source/detail?r=5e2023936bce
Modified:
/src/robot/htmldata/rebot/view.js
=======================================
--- /src/robot/htmldata/rebot/view.js Mon Aug 27 03:14:21 2012
+++ /src/robot/htmldata/rebot/view.js Mon Aug 27 05:40:04 2012
@@ -107,15 +107,15 @@
return false; // do not auto-detect
},
format: function(string, table, cell, cellIndex) {
- // Rows have class in format 'row-<index>'. Indices are
returned
- // in reversed order because table's initial order is
descending.
+ // Rows have class in format 'row-<index>'.
var index = $(cell).parent().attr('class').substring(4);
- return parseInt(index) * -1;
+ return parseInt(index);
}
});
$(".statistics").tablesorter({
sortInitialOrder: 'desc',
- headers: {0: {sorter:'statName'}, 5: {sorter: false}}
+ headers: {0: {sorter:'statName', sortInitialOrder: 'asc'},
+ 5: {sorter: false}}
});
}