summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Swicegood <development@domain51.com>2012-05-16 13:32:53 -0500
committerTravis Swicegood <development@domain51.com>2012-05-16 13:33:48 -0500
commitc647065b490667a6691a1c358d471def9ad72b60 (patch)
tree8ec77a56bcdb39496e20043a3c8954d29246cd5b
parentaa757ac22de3e657df49086cf01a26f6c73b8dfb (diff)
Make sure these functions don't bleed into the global scope
This makes sure that all of these functions are assigned to variables assigned to the current scope, rather than the global scope. It also adds a trailing semi-colon to make sure various linters are happy.
-rw-r--r--django/contrib/admin/static/admin/js/actions.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/django/contrib/admin/static/admin/js/actions.js b/django/contrib/admin/static/admin/js/actions.js
index 94aa6db934..8e46eb187c 100644
--- a/django/contrib/admin/static/admin/js/actions.js
+++ b/django/contrib/admin/static/admin/js/actions.js
@@ -3,7 +3,7 @@
var options = $.extend({}, $.fn.actions.defaults, opts);
var actionCheckboxes = $(this);
var list_editable_changed = false;
- checker = function(checked) {
+ var checker = function(checked) {
if (checked) {
showQuestion();
} else {
@@ -11,7 +11,7 @@
}
$(actionCheckboxes).attr("checked", checked)
.parent().parent().toggleClass(options.selectedClass, checked);
- }
+ },
updateCounter = function() {
var sel = $(actionCheckboxes).filter(":checked").length;
$(options.counterContainer).html(interpolate(
@@ -29,30 +29,30 @@
}
return value;
});
- }
+ },
showQuestion = function() {
$(options.acrossClears).hide();
$(options.acrossQuestions).show();
$(options.allContainer).hide();
- }
+ },
showClear = function() {
$(options.acrossClears).show();
$(options.acrossQuestions).hide();
$(options.actionContainer).toggleClass(options.selectedClass);
$(options.allContainer).show();
$(options.counterContainer).hide();
- }
+ },
reset = function() {
$(options.acrossClears).hide();
$(options.acrossQuestions).hide();
$(options.allContainer).hide();
$(options.counterContainer).show();
- }
+ },
clearAcross = function() {
reset();
$(options.acrossInput).val(0);
$(options.actionContainer).removeClass(options.selectedClass);
- }
+ };
// Show counter by default
$(options.counterContainer).show();
// Check state of checkboxes and reinit state if needed