diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-06 12:36:36 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-06 12:36:36 +0000 |
commit | 194f8a8cd2abe610689802e617f6a9da878c56d4 (patch) | |
tree | 30414e123aa486654270d455530efdb680e843b4 /mod/notifications/views/default | |
parent | 310ae3895a9aa4ac1b11e513d45a7745d2a48399 (diff) | |
download | elgg-194f8a8cd2abe610689802e617f6a9da878c56d4.tar.gz elgg-194f8a8cd2abe610689802e617f6a9da878c56d4.tar.bz2 |
Friends collections work
git-svn-id: https://code.elgg.org/elgg/trunk@2665 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/notifications/views/default')
4 files changed, 26 insertions, 7 deletions
diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php index 8cac8cf12..2ded67aee 100644 --- a/mod/notifications/views/default/notifications/subscriptions/collections.php +++ b/mod/notifications/views/default/notifications/subscriptions/collections.php @@ -3,9 +3,21 @@ if ($collections = get_user_access_collections($vars['user']->guid)) {
global $NOTIFICATION_HANDLERS;
?>
-<p>
+
+<script type="text/javascript">
+
+ 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);
+ }
+ }
+
+</script>
+
+<h3>
<?php echo elgg_echo('notifications:subscriptions:collections:title'); ?>
-</p>
+</h3>
<div class="notification_personal">
<p>
<?php echo elgg_echo('notifications:subscriptions:collections:description'); ?>
@@ -29,6 +41,8 @@ <?php
foreach($collections as $collection) {
+ $members = get_members_of_access_collection($collection->id, true);
+ $members = implode(',',$members);
?>
<tr>
@@ -58,8 +72,8 @@ if ($i > 0) $fields .= "<td class=\"spacercolumn\"> </td>";
$fields .= <<< END
<td class="{$method}togglefield">
- <a href="#" border="0" id="{$method}collections" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections');">
- <input type="checkbox" name="{$method}collections[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}collections');" value="{$collection->id}" {$collectionschecked[$method]} /></a></td>
+ <a href="#" border="0" id="{$method}collections{$collection->id}" class="{$method}toggleOff" onclick="adjust{$method}_alt('{$method}collections{$collection->id}'); setCollection([{$members}],'{$method}',{$collection->id});">
+ <input type="checkbox" name="{$method}collections[]" id="{$method}checkbox" onclick="adjust{$method}('{$method}collections{$collection->id}');" value="{$collection->id}" {$collectionschecked[$method]} /></a></td>
END;
$i++;
}
diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php index a81f4290b..ccae930fc 100644 --- a/mod/notifications/views/default/notifications/subscriptions/form.php +++ b/mod/notifications/views/default/notifications/subscriptions/form.php @@ -17,7 +17,8 @@ echo elgg_view('subscriptions/form/additions',$vars);
// Display a description -?> +?>
+<div class="settings_form"> <div class="notification_methods"> <?php @@ -30,4 +31,5 @@ )); ?> +</div>
</div>
\ No newline at end of file diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php index e73dc5f3e..fa00059b9 100644 --- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php +++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php @@ -1,3 +1,6 @@ + <h3>
+ <?php echo elgg_echo('notifications:subscriptions:title'); ?>
+ </h3>
<p class="notification_methods_intro">
<?php echo elgg_echo('notifications:subscriptions:description'); ?>
</p>
diff --git a/mod/notifications/views/default/notifications/subscriptions/personal.php b/mod/notifications/views/default/notifications/subscriptions/personal.php index 6c8069bd3..56984929e 100644 --- a/mod/notifications/views/default/notifications/subscriptions/personal.php +++ b/mod/notifications/views/default/notifications/subscriptions/personal.php @@ -5,9 +5,9 @@ ?>
<div class="notification_personal">
<div class="notification_methods">
- <p class="notification_methods_intro">
+ <h3>
<?php echo elgg_echo('notifications:subscriptions:personal:title'); ?>
- </p>
+ </h3>
</div>
<table id="notificationstable" cellspacing="0" cellpadding="4" border="1" width="100%">
<tr>
|