From 75ea0cfa32ea490314331100281183d775861789 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 8 Dec 2012 15:14:32 -0800 Subject: [PATCH] make permission quick links work --- mod/connections.php | 7 +++++-- version.inc | 2 +- view/js/mod_connections.js | 30 ++++++++++++++++++++++++++++++ view/tpl/abook_edit.tpl | 9 ++++++--- view/tpl/field_acheckbox.tpl | 4 ++-- 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/mod/connections.php b/mod/connections.php index 106057006..457a2db12 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -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, diff --git a/version.inc b/version.inc index 80e6e78db..8acdaf442 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2012-12-07.162 +2012-12-08.163 diff --git a/view/js/mod_connections.js b/view/js/mod_connections.js index 6a7f2eaed..cb4badff5 100644 --- a/view/js/mod_connections.js +++ b/view/js/mod_connections.js @@ -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'); + +} + diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index b9664835f..abded1979 100644 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -22,11 +22,14 @@ $slide
-Quick Links: -Full SharingCautious SharingFollow Only
+$quick +