summaryrefslogtreecommitdiff
path: root/templates/mirrors/status.html
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-30 13:15:20 -0500
committerDan McGee <dan@archlinux.org>2010-09-30 13:15:20 -0500
commit3682fb285b9f131a56aed2c6cab8d303c6aae5ae (patch)
tree217509085054951d4fdcdb6d9f5c0b5099412e5b /templates/mirrors/status.html
parent0eac9698c6bdebdf5056a97b7c979b526d54ec15 (diff)
Move most inline JS into script filerelease_2010-09-30
We're getting to the point where we are starting to have a good chunk of JS scattered about. Centralize a lot of it for maintenance and performance purposes. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/mirrors/status.html')
-rw-r--r--templates/mirrors/status.html31
1 files changed, 1 insertions, 30 deletions
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index 10f409c9..d2e45375 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -98,37 +98,8 @@
</div>
{% load cdn %}{% jquery %}
<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="/media/archweb.js"></script>
<script type="text/javascript">
-$.tablesorter.addParser({
- /* sorts numeric, but put '', 'unknown', and '∞' last. */
- id: 'mostlydigit',
- is: function(s,table) {
- var special = ['', 'unknown', '∞'];
- var c = table.config;
- return ($.inArray(s, special) > -1) || $.tablesorter.isDigit(s,c);
- },
- format: function(s) {
- var special = ['', 'unknown', '∞'];
- if($.inArray(s, special) > -1) return Number.MAX_VALUE;
- return $.tablesorter.formatFloat(s);
- },
- type: 'numeric'
-});
-$.tablesorter.addParser({
- /* sorts duration; put '', 'unknown', and '∞' last. */
- id: 'duration',
- is: function(s,table) {
- var special = ['', 'unknown', '∞'];
- return ($.inArray(s, special) > -1) || /^[0-9]+:[0-5][0-9]$/.test(s);
- },
- format: function(s) {
- var special = ['', 'unknown', '∞'];
- if($.inArray(s, special) > -1) return Number.MAX_VALUE;
- matches = /^([0-9]+):([0-5][0-9])$/.exec(s);
- return matches[1] * 60 + matches[2];
- },
- type: 'numeric'
-});
$(document).ready(function() {
$("#outofsync_mirrors:has(tbody tr)").tablesorter(
{widgets: ['zebra'], sortList: [[3,1]],