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/django/contrib/admin/static/admin/js/actions.js
+++ b/django/contrib/admin/static/admin/js/actions.js
@@ -67,12 +67,12 @@
 			checker($(this).prop("checked"));
 			updateCounter();
 		});
-		$("div.actions span.question a").click(function(event) {
+		$("a", options.acrossQuestions).click(function(event) {
 			event.preventDefault();
 			$(options.acrossInput).val(1);
 			showClear();
 		});
-		$("div.actions span.clear a").click(function(event) {
+		$("a", options.acrossClears).click(function(event) {
 			event.preventDefault();
 			$(options.allToggle).prop("checked", false);
 			clearAcross();
@@ -111,7 +111,7 @@
 		});
 		$('form#changelist-form input[name="_save"]').click(function(event) {
 			var action_changed = false;
-			$('div.actions select option:selected').each(function() {
+			$('select option:selected', options.actionContainer).each(function() {
 				if ($(this).val()) {
 					action_changed = true;
 				}
-- 
1.7.9.5

