another attempt to explain default permissions on connedit page

This commit is contained in:
friendica 2015-01-11 21:18:29 -08:00
parent a088a8f03c
commit 580c30f516
4 changed files with 46 additions and 18 deletions

View File

@ -549,14 +549,13 @@ function connedit_content(&$a) {
'$slide' => $slide,
'$tabs' => $t,
'$tab_str' => $tab_str,
'$perms_step1' => t('<p>Step #1. (Completed).</p><p>Create connection with minimal or no permissions.</p>'),
'$perms_step2' => t('<p>Step #2. (Incomplete).</p><p>Review and/or edit the default individual permissions on this page, if desired.</p>'),
'$perms_step3' => t('<p>Step #3. (Incomplete).</p><p>Submit this page to apply the selected permissions.</p><p>Until this is complete, this connection may have insufficient permission to communicate with you.</p>'),
'$perms_step1' => t('Default permissions for your channel type have (just) been applied. They have not yet been submitted. Please review the permissions on this page and make any desired changes at this time. This new connection may <em>not</em> be able to communicate with you until you submit this page, which will install and apply the selected permissions.'),
'$is_pending' => (($contact['abook_flags'] & ABOOK_FLAG_PENDING) ? 1 : ''),
'$unapproved' => $unapproved,
'$inherited' => t('inherited'),
'$approve' => t('Approve this connection'),
'$noperms' => (((! $self) && (! $contact['abook_my_perms'])) ? t('Connection has no individual permissions!') : ''),
'$noperms' => (($contact['abook_my_perms']) ? false : true),
'$no_perms' => (((! $self) && (! $contact['abook_my_perms'])) ? t('Connection has no individual permissions!') : ''),
'$noperm_desc' => (((! $self) && (! $contact['abook_my_perms'])) ? t('This may be appropriate based on your <a href="settings">privacy settings</a>, though you may wish to review the "Advanced Permissions".') : ''),
'$submit' => t('Submit'),
'$lbl_vis1' => t('Profile Visibility'),
@ -567,6 +566,7 @@ function connedit_content(&$a) {
'$them' => t('Their Settings'),
'$me' => t('My Settings'),
'$perms' => $perms,
'$perms_new' => t('Default permissions for this channel type have (just) been applied. They have <em>not</em> been saved and there are currently no stored default permissions. Please review/edit the applied settings and click [Submit] to finalize.'),
'$clear' => t('Clear/Disable Automatic Permissions'),
'$forum' => t('Forum Members'),
'$soapbox' => t('Soapbox'),

View File

@ -21,6 +21,13 @@
padding: 20px 5px 10px;
}
.abook-perms-msg {
background: orange;
font-weight: bold;
margin: 10px;
padding: 20px 5px 10px;
}
.abook-permschange {
width: 100%;
}

View File

@ -1,16 +1,23 @@
function abook_perms_msg() {
$('.abook-permschange').show();
$('.abook-permsmsg').show();
// $('.abook-permschange').html(aStr['permschange']);
$('.abook-permssave').show();
}
function abook_perms_new() {
$('.abook-permsnew').show();
$('.abook-permssave').show();
}
$(document).ready(function() {
if(typeof(after_following) !== 'undefined' && after_following) {
if(typeof(connectDefaultShare) !== 'undefined')
connectDefaultShare();
else
connectFullShare();
abook_perms_new();
}
$('#id_pending').click(function() {
@ -18,11 +25,12 @@ $(document).ready(function() {
connectDefaultShare();
else
connectFullShare();
abook_perms_new();
});
$('.abook-edit-me').click(function() {
abook_perms_msg();
});
// $('.abook-edit-me').click(function() {
// abook_perms_msg();
// });
});
@ -46,7 +54,7 @@ function connectFullShare() {
$('#me_id_perms_view_storage').attr('checked','checked');
$('#me_id_perms_republish').attr('checked','checked');
$('#me_id_perms_post_like').attr('checked','checked');
abook_perms_msg();
// abook_perms_msg();
}
function connectCautiousShare() {
@ -64,7 +72,7 @@ function connectCautiousShare() {
$('#me_id_perms_post_comments').attr('checked','checked');
$('#me_id_perms_post_mail').attr('checked','checked');
$('#me_id_perms_post_like').attr('checked','checked');
abook_perms_msg();
// abook_perms_msg();
}
@ -87,7 +95,7 @@ function connectForum() {
$('#me_id_perms_tag_deliver').attr('checked','checked');
$('#me_id_perms_republish').attr('checked','checked');
$('#me_id_perms_post_like').attr('checked','checked');
abook_perms_msg();
// abook_perms_msg();
}
@ -96,7 +104,7 @@ function connectClear() {
if(! $(this).is(':disabled'))
$(this).removeAttr('checked');
});
abook_perms_msg();
// abook_perms_msg();
}
@ -112,7 +120,7 @@ function connectSoapBox() {
$('#me_id_perms_view_contacts').attr('checked','checked');
$('#me_id_perms_view_storage').attr('checked','checked');
$('#me_id_perms_view_pages').attr('checked','checked');
abook_perms_msg();
// abook_perms_msg();
}
@ -124,7 +132,7 @@ function connectFollowOnly() {
});
$('#me_id_perms_send_stream').attr('checked','checked');
abook_perms_msg();
// abook_perms_msg();
}

View File

@ -17,12 +17,15 @@
<div id="contact-edit-wrapper">
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
<div class="abook-permschange" style="display: none;">
<div class="abook-perms-steps"><i class="icon-check"></i><br />{{$perms_step1}}</div>
<div class="abook-perms-steps"><i class="icon-check-empty"></i><br />{{$perms_step2}}</div>
<div class="abook-perms-steps"><i class="icon-check-empty"></i><br />{{$perms_step3}}</div>
<div class="abook-permsnew" style="display: none;">
<div class="abook-perms-msg">{{$perms_step1}}</div>
</div>
<div class="abook-permsmsg" style="display: none;">
<div class="abook-perms-msg">{{$perms_new}}</div>
</div>
<div class="abook-permssave" style="display: none;">
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
</div>
@ -88,6 +91,16 @@
<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
{{if $self && $noperms}}
<script>
if(typeof(connectDefaultShare) !== 'undefined')
connectDefaultShare();
else
connectFullShare();
abook_perms_msg();
</script>
{{/if}}
</form>
</div>
</div>