From 45853611ad7cc974b1c6bcf61c894fed0187e0c1 Mon Sep 17 00:00:00 2001
From: crccheck <c@crccheck.com>
Date: Wed, 27 Feb 2013 03:50:12 +0000
Subject: [PATCH] fixed selectors in actions.js did not use options
I'm using the selector style, `$(selector, parentSelector)`, which is not
my preferred style. Given that the parent selector is only available
to me as a string, I feel like this method preserves the original style
as much as possible. Internally, jQuery/sizzle just converts the second
argument to a jQuery object and runs .find() on it.
---
django/contrib/admin/static/admin/js/actions.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/django/contrib/admin/static/admin/js/actions.js b/django/contrib/admin/static/admin/js/actions.js
index 1992a70..51e05a0 100644
a
|
b
|
|
67 | 67 | checker($(this).prop("checked")); |
68 | 68 | updateCounter(); |
69 | 69 | }); |
70 | | $("div.actions span.question a").click(function(event) { |
| 70 | $("a", options.acrossQuestions).click(function(event) { |
71 | 71 | event.preventDefault(); |
72 | 72 | $(options.acrossInput).val(1); |
73 | 73 | showClear(); |
74 | 74 | }); |
75 | | $("div.actions span.clear a").click(function(event) { |
| 75 | $("a", options.acrossClears).click(function(event) { |
76 | 76 | event.preventDefault(); |
77 | 77 | $(options.allToggle).prop("checked", false); |
78 | 78 | clearAcross(); |
… |
… |
|
111 | 111 | }); |
112 | 112 | $('form#changelist-form input[name="_save"]').click(function(event) { |
113 | 113 | var action_changed = false; |
114 | | $('div.actions select option:selected').each(function() { |
| 114 | $('select option:selected', options.actionContainer).each(function() { |
115 | 115 | if ($(this).val()) { |
116 | 116 | action_changed = true; |
117 | 117 | } |