Skip to content

Commit

Permalink
Rankings uses new dataTable api, fix path for rankings
Browse files Browse the repository at this point in the history
  • Loading branch information
benthemonkey committed Jan 16, 2016
1 parent 24deab6 commit 788313d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
50 changes: 25 additions & 25 deletions js/points-center/rankings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ module.exports = {
var numQtrs = data.qtrs.length;
var cutoffNum = 39;
var colDefs = [
{ sTitle: '#', sClass: 'num', sWidth: '5px' },
{ sTitle: 'Name', sClass: 'name', sWidth: '140px' }
{ title: '#', className: 'num', width: '5px' },
{ title: 'Name', className: 'name', width: '140px' }
];

for (i = 0; i < numQtrs; i++) {
colDefs.push({
sTitle: qtrToQuarter(data.qtrs[i]),
sWidth: '20px'
title: qtrToQuarter(data.qtrs[i]),
width: '20px'
});
}

colDefs.push(
{ sTitle: 'Total',
sWidth: '20px' },
{ sTitle: 'Mult',
sWidth: '20px' },
{ sTitle: 'Total w/ Mult',
sWidth: '30px' },
{ bVisible: false });

for (i = 0; i < data.length; i++) {
{ title: 'Total',
width: '20px' },
{ title: 'Mult',
width: '20px' },
{ title: 'Total w/ Mult',
width: '30px' },
{ visible: false });

for (i = 0; i < data.rankings.length; i++) {
row = data.rankings[i];
tmp = ['', row.full_name];

Expand All @@ -72,21 +72,21 @@ module.exports = {
});

mtable = $('#males_table').dataTable({
aaData: males,
aoColumns: colDefs,
aaSorting: [[numQtrs + 4, 'desc']],
bPaginate: false,
bAutoWidth: false,
sDom: 't'
data: males,
columns: colDefs,
order: [[numQtrs + 4, 'desc']],
paging: false,
autoWidth: false,
dom: 't'
});

ftable = $('#females_table').dataTable({
aaData: females,
aoColumns: colDefs,
aaSorting: [[numQtrs + 4, 'desc']],
bPaginate: false,
bAutoWidth: false,
sDom: 't'
data: females,
columns: colDefs,
order: [[numQtrs + 4, 'desc']],
paging: false,
autoWidth: false,
dom: 't'
});

mj = 0;
Expand Down
2 changes: 1 addition & 1 deletion spc-rankings.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<link rel="stylesheet" href="../bower_components/datatables/media/css/jquery.dataTables.css" />
<link rel="stylesheet" href="../node_modules/datatables/media/css/jquery.dataTables.css" />
<style>
body {
min-width: 600px;
Expand Down

0 comments on commit 788313d

Please sign in to comment.