$ -> $('img.spinner').hide() # Group Check Action $('#group_action').hide() $('#snooze_time_select').hide() $('#check_group_action').change (event) -> if $(this).val() == 'Snooze for' then $('#snooze_time_select').show() else $('#snooze_time_select').hide() $('.check_now').click (event) -> onclick_check_now(event) $(':checkbox').change (event) -> if $('input:checked').length > 0 $('#group_action').show(); selected_ids = $('input:checked').map () -> return $(this).val() $('#group_action_check_ids').val(selected_ids.get() + '') else $('#group_action').hide(); @onclick_check_now = (event) -> $(event.target).closest('tr').addClass('updating') $(event.target).closest('tr').find('img.spinner').show()