diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
commit | 4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch) | |
tree | 969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /mod/notifications/views/default/notifications/subscriptions/jsfuncs.php | |
parent | 57a217fd6b708844407486046a1faa23b46cac08 (diff) | |
download | elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2 |
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/notifications/views/default/notifications/subscriptions/jsfuncs.php')
-rw-r--r-- | mod/notifications/views/default/notifications/subscriptions/jsfuncs.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php b/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php new file mode 100644 index 000000000..da1598dae --- /dev/null +++ b/mod/notifications/views/default/notifications/subscriptions/jsfuncs.php @@ -0,0 +1,54 @@ +<?php + + global $NOTIFICATION_HANDLERS; + +?> + +<script type="text/javascript"> + +$(document).ready(function () { +<?php + foreach($NOTIFICATION_HANDLERS as $method => $foo) { +?> + $('input[type=checkbox]:checked').parent("a.<?php echo $method; ?>toggleOff").each(function(){ + $(this).removeClass('<?php echo $method; ?>toggleOff').addClass('<?php echo $method; ?>toggleOn'); + }); + +<?php + } +?> + +}); + + clickflag = 0; + +<?php + foreach($NOTIFICATION_HANDLERS as $method => $foo) { +?> +function adjust<?php echo $method; ?>(linkId) { + var obj = $(this).prev("a"); + + if (obj.className == "<?php echo $method; ?>toggleOff") { + obj.className = "<?php echo $method; ?>toggleOn"; + } else { + obj.className = "<?php echo $method; ?>toggleOff"; + } + return false; +} +function adjust<?php echo $method; ?>_alt(linkId) { + var obj = document.getElementById(linkId); + + if (obj.className == "<?php echo $method; ?>toggleOff") { + obj.className = "<?php echo $method; ?>toggleOn"; + $('#' + linkId).children("input[type='checkbox']").attr('checked', true); + } else { + obj.className = "<?php echo $method; ?>toggleOff"; + $('#' + linkId).children("input[type='checkbox']").attr('checked', false); + } + return false; +} +<?php + } +?> + +</script>
\ No newline at end of file |