Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added table sorter Functionality to the leaderboard Table #68

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added css/asc.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css/bg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ tbody[sorted] .badge:not([delta="0"]):not([delta="NaN"])[delta]:after {
animation: fade-out 20s ease 0s 1;
visibility: collapse;
}
table.tablesorter thead tr .header {
background-image: url(bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(desc.gif);
}
.badge:not([delta="0"]):not([delta="NaN"])[delta-type="inc"][delta]:after {
content: "+" attr(delta);
color: green;
Expand Down
Binary file added css/desc.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@

<h1>Mozilla India Developer Leaderboard</h1>

<table class="table table-striped" id="list">
<table class="table table-striped tablesorter" id="list">
<thead>
<tr>
<th colspan="2">Pic 'n' Nick</th>
<th>Assigned Bugs</th>
<th>Fixed Bugs</th>
<th>Commit Access</th>
<th>Kickass in</th>
<th></th>
<th class="header">Pic 'n' Nick</th>
<th class="header">Assigned Bugs</th>
<th class="header">Fixed Bugs</th>
<th class="header">Commit Access</th>
<th class="header">Kickass in</th>
</tr>
</thead>
<tbody>
Expand All @@ -48,6 +49,7 @@ <h1>Mozilla India Developer Leaderboard</h1>
</p>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="js/md5.js"></script>
<script type="text/javascript" src="js/app.js"></script>
</body>
Expand Down
1 change: 1 addition & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ var leaderboard = {};
// Sort the stats.json data itself, before putting in the DOM.
$("#list").append(dom);
leaderboard.sortResults();
setTimeout(function(){$("#list").tablesorter({headers: {0: {sorter: false}}});},100);

}).fail(function (error) {
console.log(error);
Expand Down
4 changes: 4 additions & 0 deletions js/jquery.tablesorter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.