aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-07-14 17:37:33 +0200
committerMario Vavti <mario@mariovavti.com>2015-07-14 17:37:33 +0200
commitcc1764989f70b28654b47fd58fd59b12b270b470 (patch)
treeb651ccfd7544936eaf0a2c341018c37429b56948 /view
parentf267bd55d68f6d3c63c33b1d307728e4ed12ddd5 (diff)
downloadvolse-hubzilla-cc1764989f70b28654b47fd58fd59b12b270b470.tar.gz
volse-hubzilla-cc1764989f70b28654b47fd58fd59b12b270b470.tar.bz2
volse-hubzilla-cc1764989f70b28654b47fd58fd59b12b270b470.zip
fix mod_connedit.js after cleanup
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_connedit.js34
-rwxr-xr-xview/tpl/field_acheckbox.tpl2
2 files changed, 35 insertions, 1 deletions
diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js
index fd545afeb..d6cc42175 100644
--- a/view/js/mod_connedit.js
+++ b/view/js/mod_connedit.js
@@ -2,5 +2,39 @@ $(document).ready(function() {
$('form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] }); // Warn user about unsaved settings
+ if(typeof(after_following) !== 'undefined' && after_following) {
+ if(typeof(connectDefaultShare) !== 'undefined')
+ connectDefaultShare();
+ else
+ connectFullShare();
+ }
+
+ $('#id_pending').click(function() {
+ if(typeof(connectDefaultShare) !== 'undefined')
+ connectDefaultShare();
+ else
+ connectFullShare();
+ });
+
});
+function connectFullShare() {
+ $('.abook-edit-me').each(function() {
+ if(! $(this).is(':disabled'))
+ $(this).removeAttr('checked');
+ });
+ $('#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_view_storage').attr('checked','checked');
+ $('#me_id_perms_view_pages').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');
+ $('#me_id_perms_view_storage').attr('checked','checked');
+ $('#me_id_perms_republish').attr('checked','checked');
+ $('#me_id_perms_post_like').attr('checked','checked');
+}
diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl
index 2b5195322..5b03a7848 100755
--- a/view/tpl/field_acheckbox.tpl
+++ b/view/tpl/field_acheckbox.tpl
@@ -12,6 +12,6 @@
<input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} />
</td>
<td>
- {{if $field.5}}<span class="permission-inherited">{{$inherited}}</span> {{/if}}
+ {{if $field.5}}<span class="permission-inherited">{{$inherited}}</span>{{/if}}
</td>
</tr>