summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-11 10:02:26 -0600
committerDan McGee <dan@archlinux.org>2012-12-11 10:02:26 -0600
commit8a8542ede6493939bd6528a72b8fd912fdf4d14b (patch)
tree5b7d15f9ff67b504d45a70eb0c5a3906658ca061
parent498f9b7da0cf715f4303b425edf60b1ee6b13b3f (diff)
Use multiple separate document.ready() handlers
If one of them breaks, we don't want to prevent the rest of the on-load events from firing. This is currently a problem on some browsers with the versions of jQuery and tablesorter we are using. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--templates/devel/packages.html4
-rw-r--r--templates/packages/differences.html5
-rw-r--r--templates/packages/signoffs.html6
-rw-r--r--templates/todolists/view.html4
4 files changed, 13 insertions, 6 deletions
diff --git a/templates/devel/packages.html b/templates/devel/packages.html
index 4e1381ab..a62ae1ab 100644
--- a/templates/devel/packages.html
+++ b/templates/devel/packages.html
@@ -78,7 +78,9 @@
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra']});
- filter_func = function() { filter_pkgs_list('#report_filter', '#dev-report-results tbody'); };
+});
+$(document).ready(function() {
+ var filter_func = function() { filter_pkgs_list('#report_filter', '#dev-report-results tbody'); };
$('#report_filter input').change(filter_func);
$('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); });
// fire function on page load to ensure the current form selections take effect
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index b0c5b539..61906fef 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -99,13 +99,14 @@
<script type="text/javascript">
$(document).ready(function() {
$('#table_differences').tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
+ $('#table_multilib_differences').tablesorter({widgets: ['zebra'], sortList: [[5, 0]]});
+});
+$(document).ready(function() {
$('#diff_filter select').change(filter_packages);
$('#diff_filter input').change(filter_packages);
$('#criteria_reset').click(filter_packages_reset);
// fire function on page load to ensure the current form selections take effect
filter_packages();
-
- $('#table_multilib_differences').tablesorter({widgets: ['zebra'], sortList: [[5, 0]]});
});
</script>
{% endif %}
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index fc6adca2..b6737230 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -85,9 +85,11 @@
<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
$(document).ready(function() {
- $('a.signoff-link').click(signoff_package);
- $(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0]],
+ $('.results').tablesorter({widgets: ['zebra'], sortList: [[0,0]],
headers: { 5: { sorter: 'epochdate' }, 7: { sorter: false }, 8: {sorter: false } } });
+});
+$(document).ready(function() {
+ $('a.signoff-link').click(signoff_package);
$('#signoffs_filter input').change(filter_signoffs);
$('#criteria_reset').click(filter_signoffs_reset);
// fire function on page load to ensure the current form selections take effect
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index eff81aaf..b6f59704 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -105,8 +105,10 @@ $(document).ready(function() {
sortList: [[2,0], [0,0]],
headers: { 5: { sorter: 'todostatus' } }
});
+});
+$(document).ready(function() {
$('a.status-link').click(todolist_flag);
- filter_func = function() { filter_pkgs_list('#todolist_filter', '#dev-todo-pkglist tbody'); };
+ var filter_func = function() { filter_pkgs_list('#todolist_filter', '#dev-todo-pkglist tbody'); };
$('#todolist_filter input').change(filter_func);
$('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); });
// fire function on page load to ensure the current form selections take effect