Skip to content

Commit c647065

Browse files
committed
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.
1 parent aa757ac commit c647065

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

django/contrib/admin/static/admin/js/actions.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
var options = $.extend({}, $.fn.actions.defaults, opts);
44
var actionCheckboxes = $(this);
55
var list_editable_changed = false;
6-
checker = function(checked) {
6+
var checker = function(checked) {
77
if (checked) {
88
showQuestion();
99
} else {
1010
reset();
1111
}
1212
$(actionCheckboxes).attr("checked", checked)
1313
.parent().parent().toggleClass(options.selectedClass, checked);
14-
}
14+
},
1515
updateCounter = function() {
1616
var sel = $(actionCheckboxes).filter(":checked").length;
1717
$(options.counterContainer).html(interpolate(
@@ -29,30 +29,30 @@
2929
}
3030
return value;
3131
});
32-
}
32+
},
3333
showQuestion = function() {
3434
$(options.acrossClears).hide();
3535
$(options.acrossQuestions).show();
3636
$(options.allContainer).hide();
37-
}
37+
},
3838
showClear = function() {
3939
$(options.acrossClears).show();
4040
$(options.acrossQuestions).hide();
4141
$(options.actionContainer).toggleClass(options.selectedClass);
4242
$(options.allContainer).show();
4343
$(options.counterContainer).hide();
44-
}
44+
},
4545
reset = function() {
4646
$(options.acrossClears).hide();
4747
$(options.acrossQuestions).hide();
4848
$(options.allContainer).hide();
4949
$(options.counterContainer).show();
50-
}
50+
},
5151
clearAcross = function() {
5252
reset();
5353
$(options.acrossInput).val(0);
5454
$(options.actionContainer).removeClass(options.selectedClass);
55-
}
55+
};
5656
// Show counter by default
5757
$(options.counterContainer).show();
5858
// Check state of checkboxes and reinit state if needed

0 commit comments

Comments
 (0)