From 6bbbe5f6e21370f370d9e04b0be6c51246d71450 Mon Sep 17 00:00:00 2001 From: wvengen Date: Sat, 11 Apr 2015 02:10:37 +0200 Subject: [PATCH] Fix message send to all members javascript --- plugins/messages/app/views/messages/new.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/messages/app/views/messages/new.haml b/plugins/messages/app/views/messages/new.haml index 0dd4c325..910076a0 100644 --- a/plugins/messages/app/views/messages/new.haml +++ b/plugins/messages/app/views/messages/new.haml @@ -10,13 +10,15 @@ theme: 'facebook' }); - $('#message_sent_to_all').on('touchclick', function() { + $('#message_sent_to_all').on('change', function() { if ($(this).is(':checked')) { $('#recipients').slideUp(); } else { $('#recipients').slideDown(); } }); + // make sure state is correct when loading + $('#recipients').toggle(!$('#message_sent_to_all').is(':checked')); }); - title t('.title')