summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-08 23:30:48 -0500
committerDan McGee <dan@archlinux.org>2012-07-08 23:33:44 -0500
commit8383a071608329c7683f7a710030ce945bd20b4d (patch)
tree55efabe829287b71cfb52b8db3dc05e3dd0294e7
parentc589f7d930ee7642524ecc33ee41bae79d4edd9b (diff)
Add a new jquery_tablesorter CDN template tag
And use it everywhere we were including the file before. This should make updating the version a heck of a lot easier. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--main/templatetags/cdn.py7
-rw-r--r--templates/devel/clock.html3
-rw-r--r--templates/devel/index.html3
-rw-r--r--templates/devel/packages.html3
-rw-r--r--templates/mirrors/mirror_details.html3
-rw-r--r--templates/mirrors/mirrors.html3
-rw-r--r--templates/mirrors/status.html3
-rw-r--r--templates/packages/differences.html3
-rw-r--r--templates/packages/groups.html3
-rw-r--r--templates/packages/packages_list.html3
-rw-r--r--templates/packages/signoffs.html3
-rw-r--r--templates/packages/stale_relations.html3
-rw-r--r--templates/public/keys.html3
-rw-r--r--templates/releng/iso_overview.html3
-rw-r--r--templates/releng/result_list.html3
-rw-r--r--templates/todolists/list.html3
-rw-r--r--templates/todolists/public_list.html3
-rw-r--r--templates/todolists/view.html3
18 files changed, 24 insertions, 34 deletions
diff --git a/main/templatetags/cdn.py b/main/templatetags/cdn.py
index ab5d881a..54299823 100644
--- a/main/templatetags/cdn.py
+++ b/main/templatetags/cdn.py
@@ -17,4 +17,11 @@ def jquery():
link = staticfiles_storage.url(filename)
return '<script type="text/javascript" src="%s"></script>' % link
+
+@register.simple_tag
+def jquery_tablesorter():
+ filename = 'jquery.tablesorter.min.js'
+ link = staticfiles_storage.url(filename)
+ return '<script type="text/javascript" src="%s"></script>' % link
+
# vim: set ts=4 sw=4 et:
diff --git a/templates/devel/clock.html b/templates/devel/clock.html
index 6a3f0a69..9ebea06c 100644
--- a/templates/devel/clock.html
+++ b/templates/devel/clock.html
@@ -52,8 +52,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/devel/index.html b/templates/devel/index.html
index d1bd4d2c..ad8ee0ee 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -291,8 +291,7 @@
</div>{# #dash-by-developer #}
{% endcache %}
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/devel/packages.html b/templates/devel/packages.html
index 6b9df214..ac368124 100644
--- a/templates/devel/packages.html
+++ b/templates/devel/packages.html
@@ -52,8 +52,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index edeab5dc..18175845 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -105,8 +105,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html
index 77c9ec33..0950520d 100644
--- a/templates/mirrors/mirrors.html
+++ b/templates/mirrors/mirrors.html
@@ -41,8 +41,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index 472e9501..ec2ae568 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -98,8 +98,7 @@
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index 01e1f857..8d6887a3 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -95,8 +95,7 @@
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/packages/groups.html b/templates/packages/groups.html
index 2786244d..66110637 100644
--- a/templates/packages/groups.html
+++ b/templates/packages/groups.html
@@ -29,8 +29,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html
index ee2d2087..37fd2c1c 100644
--- a/templates/packages/packages_list.html
+++ b/templates/packages/packages_list.html
@@ -40,8 +40,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index b20483c0..fc6adca2 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -81,8 +81,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html
index df469e78..cb7799d4 100644
--- a/templates/packages/stale_relations.html
+++ b/templates/packages/stale_relations.html
@@ -107,8 +107,7 @@
</form>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/public/keys.html b/templates/public/keys.html
index 05524c48..cd0b0592 100644
--- a/templates/public/keys.html
+++ b/templates/public/keys.html
@@ -89,8 +89,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/releng/iso_overview.html b/templates/releng/iso_overview.html
index 447ba487..23ef0135 100644
--- a/templates/releng/iso_overview.html
+++ b/templates/releng/iso_overview.html
@@ -37,8 +37,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/releng/result_list.html b/templates/releng/result_list.html
index 207a8ba3..be5783b3 100644
--- a/templates/releng/result_list.html
+++ b/templates/releng/result_list.html
@@ -34,8 +34,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/todolists/list.html b/templates/todolists/list.html
index 88df4c81..51f9b570 100644
--- a/templates/todolists/list.html
+++ b/templates/todolists/list.html
@@ -43,8 +43,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html
index c3142da3..9e0e5234 100644
--- a/templates/todolists/public_list.html
+++ b/templates/todolists/public_list.html
@@ -65,8 +65,7 @@
{% endfor %}
</div>
{% endif %}
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index 02bbfd4f..c774c9cd 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -70,8 +70,7 @@
</tbody>
</table>
</div>
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="{% static "jquery.tablesorter.min.js" %}"></script>
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {