I"²(function() { $(document).on('ready page:load', function() { $('.batch_actions_selector li a').click(function(e) { var message; e.stopPropagation(); e.preventDefault(); if (message = $(this).data('confirm')) { return ActiveAdmin.modal_dialog(message, $(this).data('inputs'), (function(_this) { return function(inputs) { return $(_this).trigger('confirm:complete', inputs); }; })(this)); } else { return $(this).trigger('confirm:complete'); } }); $('.batch_actions_selector li a').on('confirm:complete', function(e, inputs) { var val; if (val = JSON.stringify(inputs)) { $('#batch_action_inputs').val(val); } else { $('#batch_action_inputs').attr('disabled', 'disabled'); } $('#batch_action').val($(this).data('action')); return $('#collection_selection').submit(); }); if ($(".batch_actions_selector").length && $(":checkbox.toggle_all").length) { if ($(".paginated_collection table.index_table").length) { $(".paginated_collection table.index_table").tableCheckboxToggler(); } else { $(".paginated_collection").checkboxToggler(); } return $(document).on('change', '.paginated_collection :checkbox', function() { if ($(".paginated_collection :checkbox:checked").length) { return $(".batch_actions_selector").each(function() { return $(this).aaDropdownMenu("enable"); }); } else { return $(".batch_actions_selector").each(function() { return $(this).aaDropdownMenu("disable"); }); } }); } }); }).call(this); :ET