|
3 | 3 | var options = $.extend({}, $.fn.actions.defaults, opts); |
4 | 4 | var actionCheckboxes = $(this); |
5 | 5 | var list_editable_changed = false; |
6 | | -checker = function(checked) { |
| 6 | +var checker = function(checked) { |
7 | 7 | if (checked) { |
8 | 8 | showQuestion(); |
9 | 9 | } else { |
10 | 10 | reset(); |
11 | 11 | } |
12 | 12 | $(actionCheckboxes).attr("checked", checked) |
13 | 13 | .parent().parent().toggleClass(options.selectedClass, checked); |
14 | | -} |
| 14 | +}, |
15 | 15 | updateCounter = function() { |
16 | 16 | var sel = $(actionCheckboxes).filter(":checked").length; |
17 | 17 | $(options.counterContainer).html(interpolate( |
|
29 | 29 | } |
30 | 30 | return value; |
31 | 31 | }); |
32 | | -} |
| 32 | +}, |
33 | 33 | showQuestion = function() { |
34 | 34 | $(options.acrossClears).hide(); |
35 | 35 | $(options.acrossQuestions).show(); |
36 | 36 | $(options.allContainer).hide(); |
37 | | -} |
| 37 | +}, |
38 | 38 | showClear = function() { |
39 | 39 | $(options.acrossClears).show(); |
40 | 40 | $(options.acrossQuestions).hide(); |
41 | 41 | $(options.actionContainer).toggleClass(options.selectedClass); |
42 | 42 | $(options.allContainer).show(); |
43 | 43 | $(options.counterContainer).hide(); |
44 | | -} |
| 44 | +}, |
45 | 45 | reset = function() { |
46 | 46 | $(options.acrossClears).hide(); |
47 | 47 | $(options.acrossQuestions).hide(); |
48 | 48 | $(options.allContainer).hide(); |
49 | 49 | $(options.counterContainer).show(); |
50 | | -} |
| 50 | +}, |
51 | 51 | clearAcross = function() { |
52 | 52 | reset(); |
53 | 53 | $(options.acrossInput).val(0); |
54 | 54 | $(options.actionContainer).removeClass(options.selectedClass); |
55 | | -} |
| 55 | +}; |
56 | 56 | // Show counter by default |
57 | 57 | $(options.counterContainer).show(); |
58 | 58 | // Check state of checkboxes and reinit state if needed |
|
0 commit comments