ordered the team results
This commit is contained in:
1 parent
b36c7ebcdc
commit
6b0652092c
1 file changed
+2
-1
@@ -26,6 +26,7 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
|
|||||||
};
|
};
|
||||||
|
|
||||||
statsView.mainTable = function(stats){
|
statsView.mainTable = function(stats){
|
||||||
|
var orderedStats = _.reverse(_.sortBy(stats, ['victories', 'pointsFor']));
|
||||||
return m('table.uk-table.uk-table-hover.uk-table-striped',[
|
return m('table.uk-table.uk-table-hover.uk-table-striped',[
|
||||||
m('thead', m('tr', [
|
m('thead', m('tr', [
|
||||||
m('th', 'Équipes'),
|
m('th', 'Équipes'),
|
||||||
@@ -38,7 +39,7 @@ define(['m', '_', 'util', 'resultParser', 'teams', 'views/topNavBar', 'views/foo
|
|||||||
m('th', 'DIF'),
|
m('th', 'DIF'),
|
||||||
m('th', 'PTS')
|
m('th', 'PTS')
|
||||||
])),
|
])),
|
||||||
m('tbody', _.map(stats, statsView.getStatRow))
|
m('tbody', _.map(orderedStats, statsView.getStatRow))
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user