From f16e996cfa7270c9836bf3a9e1cadde6c2748ba1 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 6 Feb 2009 15:26:13 +0000 Subject: An attempt at fixing the toggle issue git-svn-id: https://code.elgg.org/elgg/trunk@2669 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../views/default/notifications/subscriptions/collections.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mod/notifications/views/default') diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php index 106cabd58..981e79823 100644 --- a/mod/notifications/views/default/notifications/subscriptions/collections.php +++ b/mod/notifications/views/default/notifications/subscriptions/collections.php @@ -8,9 +8,11 @@ function setCollection(members, method, id) { for ( var i in members ) { - var checked = $('#' + method + 'collections' + id).children("INPUT[type='checkbox']").attr('checked'); - $("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked', checked); - functioncall = 'adjust' + method + '_alt("'+method+members[i]+'");'; + var checked = $('#' + method + 'collections' + id).children("INPUT[type='checkbox']").attr('checked'); + if ($("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked') != checked) { + $("#"+method+members[i]).children("INPUT[type='checkbox']").attr('checked', checked); + functioncall = 'adjust' + method + '_alt("'+method+members[i]+'");'; + } eval(functioncall); } } -- cgit v1.2.3