From 5ec38459dc474700ec89304786228ba06bfbed53 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 7 Mar 2014 21:55:52 -0800 Subject: notify when permissions change and haven't been saved. --- include/js_strings.php | 1 + view/css/mod_connedit.css | 2 +- view/js/mod_connedit.js | 12 ++++++++++++ view/tpl/abook_edit.tpl | 1 + view/tpl/js_strings.tpl | 1 + 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/js_strings.php b/include/js_strings.php index cd0ee8c7c..fef84077e 100644 --- a/include/js_strings.php +++ b/include/js_strings.php @@ -13,6 +13,7 @@ function js_strings() { '$everybody' => t('everybody'), '$passphrase' => t('Secret Passphrase'), '$passhint' => t('Passphrase hint'), + '$permschange' => t('Notice: Permissions have changed but have not yet been submitted.'), '$t01' => ((t('timeago.prefixAgo') != 'timeago.prefixAgo') ? t('timeago.prefixAgo') : ''), '$t02' => ((t('timeago.prefixFromNow') != 'timeago.prefixFromNow') ? t('timeago.prefixFromNow') : ''), diff --git a/view/css/mod_connedit.css b/view/css/mod_connedit.css index f6da96433..83f167915 100644 --- a/view/css/mod_connedit.css +++ b/view/css/mod_connedit.css @@ -14,7 +14,7 @@ margin-bottom: 5px !important; } -.abook-pending-contact { +.abook-pending-contact, .abook-permschange { background: orange; font-weight: bold; margin: 10px; diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index 80a56f854..8f06aeee9 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -27,6 +27,8 @@ function connectFullShare() { $('#me_id_perms_view_storage').attr('checked','checked'); $('#me_id_perms_republish').attr('checked','checked'); + $('.abook-permschange').show(); + $('.abook-permschange').html(aStr['permschange']); } function connectCautiousShare() { @@ -43,6 +45,9 @@ function connectCautiousShare() { $('#me_id_perms_send_stream').attr('checked','checked'); $('#me_id_perms_post_comments').attr('checked','checked'); $('#me_id_perms_post_mail').attr('checked','checked'); + $('.abook-permschange').show(); + $('.abook-permschange').html(aStr['permschange']); + } function connectForum() { @@ -63,6 +68,8 @@ function connectForum() { $('#me_id_perms_post_mail').attr('checked','checked'); $('#me_id_perms_tag_deliver').attr('checked','checked'); $('#me_id_perms_republish').attr('checked','checked'); + $('.abook-permschange').show(); + $('.abook-permschange').html(aStr['permschange']); } @@ -78,6 +85,8 @@ 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-permschange').show(); + $('.abook-permschange').html(aStr['permschange']); } @@ -88,5 +97,8 @@ function connectFollowOnly() { }); $('#me_id_perms_send_stream').attr('checked','checked'); + $('.abook-permschange').show(); + $('.abook-permschange').html(aStr['permschange']); + } diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 274d0d5de..b7a02c15e 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -34,6 +34,7 @@ + {{if $is_pending}}
diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl index fe5228ee9..cac5be65b 100755 --- a/view/tpl/js_strings.tpl +++ b/view/tpl/js_strings.tpl @@ -13,6 +13,7 @@ 'everybody' : "{{$everybody}}", 'passphrase' : "{{$passphrase}}", 'passhint' : "{{$passhint}}", + 'permschange' : "{{$permschange}}", 't01' : "{{$t01}}", 't02' : "{{$t02}}", -- cgit v1.2.3