disable network toggles when ACL's are entered

This commit is contained in:
Friendika 2011-02-11 04:32:38 -08:00
parent 0bfe63e7d8
commit 5e02519a13
6 changed files with 18 additions and 11 deletions

View File

@ -143,7 +143,7 @@ function facebook_jot_nets(&$a,&$b) {
if(intval($fb_post) == 1) { if(intval($fb_post) == 1) {
$fb_defpost = get_pconfig(local_user(),'facebook','post_by_default'); $fb_defpost = get_pconfig(local_user(),'facebook','post_by_default');
$selected = ((intval($fb_defpost == 1)) ? ' selected="selected" ' : ''); $selected = ((intval($fb_defpost == 1)) ? ' selected="selected" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="facebook_enable" $selected value="1" /> ' $b .= '<div class="profile-jot-net"><input type="checkbox" name="facebook_enable"' . $selected . 'value="1" /> '
. t('Post to Facebook') . '</div>'; . t('Post to Facebook') . '</div>';
} }
} }

View File

@ -63,7 +63,7 @@ function twitter_jot_nets(&$a,&$b) {
if(intval($tw_post) == 1) { if(intval($tw_post) == 1) {
$tw_defpost = get_pconfig(local_user(),'twitter','post_by_default'); $tw_defpost = get_pconfig(local_user(),'twitter','post_by_default');
$selected = ((intval($tw_defpost == 1)) ? ' selected="selected" ' : ''); $selected = ((intval($tw_defpost == 1)) ? ' selected="selected" ' : '');
$b .= '<div class="profile-jot-net"><input type="checkbox" name="twitter_enable" $selected value="1" /> ' $b .= '<div class="profile-jot-net"><input type="checkbox" name="twitter_enable"' . $selected . 'value="1" /> '
. t('Post to Twitter') . '</div>'; . t('Post to Twitter') . '</div>';
} }

View File

@ -75,10 +75,12 @@ tinyMCE.init({
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
$('.profile-jot-net input').attr('disabled', 'disabled');
}); });
if(selstr == null) if(selstr == null) {
$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
$('.profile-jot-net input').attr('disabled', false);
}
}).trigger('change'); }).trigger('change');

View File

@ -75,10 +75,12 @@ tinyMCE.init({
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
$('.profile-jot-net input').attr('disabled', 'disabled');
}); });
if(selstr == null) if(selstr == null) {
$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
$('.profile-jot-net input').attr('disabled', false);
}
}).trigger('change'); }).trigger('change');

View File

@ -75,11 +75,12 @@ tinyMCE.init({
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
$('.profile-jot-net input').attr('disabled', 'disabled');
}); });
if(selstr == null) if(selstr == null) {
$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
$('.profile-jot-net input').attr('disabled', false);
}
}).trigger('change'); }).trigger('change');
}); });

View File

@ -75,10 +75,12 @@ tinyMCE.init({
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
selstr = $(this).text(); selstr = $(this).text();
$('#profile-jot-perms img').attr('src', 'images/lock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/lock_icon.gif');
$('.profile-jot-net input').attr('disabled', 'disabled');
}); });
if(selstr == null) if(selstr == null) {
$('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif'); $('#profile-jot-perms img').attr('src', 'images/unlock_icon.gif');
$('.profile-jot-net input').attr('disabled', false);
}
}).trigger('change'); }).trigger('change');