make permission quick links work
This commit is contained in:
parent
c70777e19c
commit
75ea0cfa32
@ -330,8 +330,11 @@ function connections_content(&$a) {
|
||||
'$them' => t('Their Settings'),
|
||||
'$me' => t('My Settings'),
|
||||
'$perms' => $perms,
|
||||
|
||||
|
||||
'$full' => t('Full Sharing'),
|
||||
'$cautious' => t('Cautious Sharing'),
|
||||
'$follow' => t('Follow Only'),
|
||||
'$advanced' => t('Advanced Permissions'),
|
||||
'$quick' => t('Quick Links'),
|
||||
'$common_link' => $a->get_baseurl(true) . '/common/loc/' . local_user() . '/' . $contact['id'],
|
||||
'$all_friends' => $all_friends,
|
||||
'$relation_text' => $relation_text,
|
||||
|
@ -1 +1 @@
|
||||
2012-12-07.162
|
||||
2012-12-08.163
|
||||
|
@ -19,3 +19,33 @@ $(".autocomplete-w1 .selected").keyup(function(event){
|
||||
$("#contacts-search-submit").click();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function connectFullShare() {
|
||||
$('#me_id_perms_view_stream').attr('checked','checked');
|
||||
$('#me_id_perms_view_profile').attr('checked','checked');
|
||||
$('#me_id_perms_view_photos').attr('checked','checked');
|
||||
$('#me_id_perms_view_contacts').attr('checked','checked');
|
||||
$('#me_id_perms_send_stream').attr('checked','checked');
|
||||
$('#me_id_perms_post_wall').attr('checked','checked');
|
||||
$('#me_id_perms_post_comments').attr('checked','checked');
|
||||
$('#me_id_perms_post_mail').attr('checked','checked');
|
||||
$('#me_id_perms_chat').attr('checked','checked');
|
||||
|
||||
}
|
||||
|
||||
function connectCautiousShare() {
|
||||
$('#me_id_perms_view_stream').attr('checked','checked');
|
||||
$('#me_id_perms_view_profile').attr('checked','checked');
|
||||
$('#me_id_perms_view_photos').attr('checked','checked');
|
||||
$('#me_id_perms_send_stream').attr('checked','checked');
|
||||
$('#me_id_perms_post_comments').attr('checked','checked');
|
||||
$('#me_id_perms_post_mail').attr('checked','checked');
|
||||
|
||||
}
|
||||
|
||||
function connectFollowOnly() {
|
||||
$('#me_id_perms_send_stream').attr('checked','checked');
|
||||
|
||||
}
|
||||
|
||||
|
@ -22,11 +22,14 @@ $slide
|
||||
<input id="contact-closeness-mirror" type="hidden" name="closeness" value="$close" />
|
||||
|
||||
<br />
|
||||
<b>Quick Links:</b>
|
||||
<a href="" style="background-color: #CCC; padding: 3px; border-radius: 5px; margin-left: 15px;">Full Sharing</a><a href="" style="background-color: #CCC; padding: 3px; border-radius: 5px; margin-left: 15px;">Cautious Sharing</a><a href="" style="background-color: #CCC; padding: 3px; border-radius: 5px; margin-left: 15px;">Follow Only</a><br />
|
||||
<b>$quick</b>
|
||||
<ul>
|
||||
<li><a href="#" onclick="connectFullShare(); return false;">$full</a></li>
|
||||
<li><a href="#" onclick="connectCautiousShare(); return false;">$cautious</a></li>
|
||||
<li><a href="#" onclick="connectFollowOnly(); return false;">$follow</a></li>
|
||||
<br />
|
||||
|
||||
<div id="abook-advanced" class="fakelink" onclick="openClose('abook-advanced-panel');">Advanced Permissions</div>
|
||||
<div id="abook-advanced" class="fakelink" onclick="openClose('abook-advanced-panel');">$advanced</div>
|
||||
|
||||
<div id="abook-advanced-panel" style="display: none;">
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
<div class='field acheckbox'>
|
||||
<label for='id_$field.0'>$field.1</label>
|
||||
<input type="checkbox" class="abook-edit-them" name='$field.0' id='id_$field.0' value="1" disabled="disabled" {{ if $field.2 }}checked="checked"{{ endif }} />
|
||||
<input type="checkbox" class="abook-edit-me" name='$field.0' id='id_$field.0' value="$field.4" {{ if $field.3 }}checked="checked"{{ endif }} {{ if $field.5 }} disabled="disabled" {{ endif }}/>
|
||||
<input type="checkbox" class="abook-edit-them" name='$field.0' id='them_id_$field.0' value="1" disabled="disabled" {{ if $field.2 }}checked="checked"{{ endif }} />
|
||||
<input type="checkbox" class="abook-edit-me" name='$field.0' id='me_id_$field.0' value="$field.4" {{ if $field.3 }}checked="checked"{{ endif }} {{ if $field.5 }} disabled="disabled" {{ endif }}/>
|
||||
<span class='field_abook_help'>$field.6</span>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user