summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-08-27 16:20:14 +0200
committerDan McGee <dan@archlinux.org>2010-08-27 16:20:14 +0200
commite247e0dd8c1cd6e27be4ec12de9038cc492faf0a (patch)
treeee876a6ac0d7723e52647368e42c07c9d3a7fe9f /templates
parentecdd4ad6dae62594acefb4e8650e405871775479 (diff)
downloadarchweb-e247e0dd8c1cd6e27be4ec12de9038cc492faf0a.tar.gz
archweb-e247e0dd8c1cd6e27be4ec12de9038cc492faf0a.tar.xz
Add table sorting to a handful of pages
Anything that it makes sense to add it to gets the treatment here. Anything with pagination can wait as that will be tougher. We also need to deal with odd/even formatting. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/devel/index.html13
-rw-r--r--templates/devel/mirrorlist.html8
-rw-r--r--templates/packages/differences.html7
-rw-r--r--templates/packages/signoffs.html7
-rw-r--r--templates/todolists/list.html10
5 files changed, 39 insertions, 6 deletions
diff --git a/templates/devel/index.html b/templates/devel/index.html
index 02dd369..0a2167e 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -189,11 +189,18 @@
</div><!-- #dash-by-maintainer -->
{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
+$(document).ready(function() {
+ $("#dash-todo").tablesorter({sortList: [[1,1]]});
+ $("#dash-myflagged").tablesorter({sortList: [[0,0]]});
+ $("#dash-mytodolist").tablesorter({sortList: [[0,0], [1,0]]});
+ $("#stats-by-arch").tablesorter({sortList: [[0,0]]});
+ $("#stats-by-repo").tablesorter({sortList: [[0,0]]});
+ $("#stats-by-maintainer").tablesorter({sortList: [[0,0]]});
$("h3.dash-stats").click(
- function(e) {
- $(this).next().toggle();
- }
+ function(e) { $(this).next().toggle(); }
);
+});
</script>
{% endblock %}
diff --git a/templates/devel/mirrorlist.html b/templates/devel/mirrorlist.html
index 5084cca..b9ad8f4 100644
--- a/templates/devel/mirrorlist.html
+++ b/templates/devel/mirrorlist.html
@@ -38,6 +38,12 @@
{% endfor %}
</tbody>
</table>
-
</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $(".results").tablesorter({sortList: [[1,0], [2,0]]});
+});
+</script>
{% endblock %}
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index bc74901..337dcd7 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -33,5 +33,12 @@
</tbody>
</table>
</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $(".results").tablesorter({sortList: [[1,0], [0,0]]});
+});
+</script>
{% endif %}
{% endblock %}
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index 3040f45..dd7a8a7 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -47,5 +47,12 @@
</tbody>
</table>
</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $(".results").tablesorter({sortList: [[1,0]]});
+});
+</script>
{% endif %}
{% endblock %}
diff --git a/templates/todolists/list.html b/templates/todolists/list.html
index 60e347d..bbd39f3 100644
--- a/templates/todolists/list.html
+++ b/templates/todolists/list.html
@@ -36,6 +36,12 @@
{% endfor %}
</tbody>
</table>
-
-</div><!-- #dev-todo -->
+</div>
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $(".results").tablesorter({sortList: [[1,1]]});
+});
+</script>
{% endblock %}