diff options
Diffstat (limited to 'view/js')
-rw-r--r-- | view/js/mod_connections.js | 24 | ||||
-rw-r--r-- | view/js/mod_poke.js | 13 | ||||
-rw-r--r-- | view/js/mod_settings.js | 90 |
3 files changed, 127 insertions, 0 deletions
diff --git a/view/js/mod_connections.js b/view/js/mod_connections.js index 9d4a03340..6bfa039a8 100644 --- a/view/js/mod_connections.js +++ b/view/js/mod_connections.js @@ -22,6 +22,10 @@ $(".autocomplete-w1 .selected").keyup(function(event){ 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'); @@ -37,6 +41,11 @@ function connectFullShare() { } function connectCautiousShare() { + $('.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'); @@ -48,6 +57,11 @@ function connectCautiousShare() { } function connectForum() { + $('.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'); @@ -62,6 +76,11 @@ function connectForum() { } function connectSoapBox() { + $('.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'); @@ -72,6 +91,11 @@ function connectSoapBox() { function connectFollowOnly() { + $('.abook-edit-me').each(function() { + if(! $(this).is(':disabled')) + $(this).removeAttr('checked'); + }); + $('#me_id_perms_send_stream').attr('checked','checked'); } diff --git a/view/js/mod_poke.js b/view/js/mod_poke.js new file mode 100644 index 000000000..fa00ac2d5 --- /dev/null +++ b/view/js/mod_poke.js @@ -0,0 +1,13 @@ +$(document).ready(function() { + var a; + a = $("#poke-recip").autocomplete({ + serviceUrl: baseurl + '/acl', + minChars: 2, + width: 350, + onSelect: function(value,data) { + $("#poke-recip-complete").val(data); + } + }); + a.setOptions({ params: { type: 'a' }}); + +}); diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index bcfa9b574..1695372eb 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -19,3 +19,93 @@ $(document).ready(function() { }); +function channel_privacy_macro(n) { + if(n == 0) { + $('#id_view_stream option').eq(0).attr('selected','selected'); + $('#id_view_profile option').eq(0).attr('selected','selected'); + $('#id_view_photos option').eq(0).attr('selected','selected'); + $('#id_view_contacts option').eq(0).attr('selected','selected'); + $('#id_view_storage option').eq(0).attr('selected','selected'); + $('#id_view_pages option').eq(0).attr('selected','selected'); + $('#id_send_stream option').eq(0).attr('selected','selected'); + $('#id_post_wall option').eq(0).attr('selected','selected'); + $('#id_post_comments option').eq(0).attr('selected','selected'); + $('#id_post_mail option').eq(0).attr('selected','selected'); + $('#id_post_photos option').eq(0).attr('selected','selected'); + $('#id_tag_deliver option').eq(0).attr('selected','selected'); + $('#id_chat option').eq(0).attr('selected','selected'); + $('#id_write_storage option').eq(0).attr('selected','selected'); + $('#id_write_pages option').eq(0).attr('selected','selected'); + $('#id_delegate option').eq(0).attr('selected','selected'); + $('#id_profile_in_directory_onoff .off').removeClass('hidden'); + $('#id_profile_in_directory_onoff .on').addClass('hidden'); + $('#id_profile_in_directory').val(0); + } + if(n == 1) { + $('#id_view_stream option').eq(1).attr('selected','selected'); + $('#id_view_profile option').eq(1).attr('selected','selected'); + $('#id_view_photos option').eq(1).attr('selected','selected'); + $('#id_view_contacts option').eq(1).attr('selected','selected'); + $('#id_view_storage option').eq(1).attr('selected','selected'); + $('#id_view_pages option').eq(1).attr('selected','selected'); + $('#id_send_stream option').eq(1).attr('selected','selected'); + $('#id_post_wall option').eq(1).attr('selected','selected'); + $('#id_post_comments option').eq(1).attr('selected','selected'); + $('#id_post_mail option').eq(1).attr('selected','selected'); + $('#id_post_photos option').eq(1).attr('selected','selected'); + $('#id_tag_deliver option').eq(1).attr('selected','selected'); + $('#id_chat option').eq(1).attr('selected','selected'); + $('#id_write_storage option').eq(1).attr('selected','selected'); + $('#id_write_pages option').eq(1).attr('selected','selected'); + $('#id_delegate option').eq(0).attr('selected','selected'); + $('#id_profile_in_directory_onoff .off').removeClass('hidden'); + $('#id_profile_in_directory_onoff .on').addClass('hidden'); + $('#id_profile_in_directory').val(0); + } + if(n == 2) { + $('#id_view_stream option').eq(5).attr('selected','selected'); + $('#id_view_profile option').eq(5).attr('selected','selected'); + $('#id_view_photos option').eq(5).attr('selected','selected'); + $('#id_view_contacts option').eq(5).attr('selected','selected'); + $('#id_view_storage option').eq(5).attr('selected','selected'); + $('#id_view_pages option').eq(5).attr('selected','selected'); + $('#id_send_stream option').eq(1).attr('selected','selected'); + $('#id_post_wall option').eq(1).attr('selected','selected'); + $('#id_post_comments option').eq(1).attr('selected','selected'); + $('#id_post_mail option').eq(1).attr('selected','selected'); + $('#id_post_photos option').eq(0).attr('selected','selected'); + $('#id_tag_deliver option').eq(1).attr('selected','selected'); + $('#id_chat option').eq(1).attr('selected','selected'); + $('#id_write_storage option').eq(0).attr('selected','selected'); + $('#id_write_pages option').eq(0).attr('selected','selected'); + $('#id_delegate option').eq(0).attr('selected','selected'); + $('#id_profile_in_directory_onoff .on').removeClass('hidden'); + $('#id_profile_in_directory_onoff .off').addClass('hidden'); + $('#id_profile_in_directory').val(1); + } + if(n == 3) { + $('#id_view_stream option').eq(5).attr('selected','selected'); + $('#id_view_profile option').eq(5).attr('selected','selected'); + $('#id_view_photos option').eq(5).attr('selected','selected'); + $('#id_view_contacts option').eq(5).attr('selected','selected'); + $('#id_view_storage option').eq(5).attr('selected','selected'); + $('#id_view_pages option').eq(5).attr('selected','selected'); + $('#id_send_stream option').eq(4).attr('selected','selected'); + $('#id_post_wall option').eq(4).attr('selected','selected'); + $('#id_post_comments option').eq(4).attr('selected','selected'); + $('#id_post_mail option').eq(4).attr('selected','selected'); + $('#id_post_photos option').eq(2).attr('selected','selected'); + $('#id_tag_deliver option').eq(1).attr('selected','selected'); + $('#id_chat option').eq(4).attr('selected','selected'); + $('#id_write_storage option').eq(2).attr('selected','selected'); + $('#id_write_pages option').eq(2).attr('selected','selected'); + $('#id_delegate option').eq(0).attr('selected','selected'); + $('#id_profile_in_directory_onoff .on').removeClass('hidden'); + $('#id_profile_in_directory_onoff .off').addClass('hidden'); + $('#id_profile_in_directory').val(1); + + } + + + +}
\ No newline at end of file |