Fix accepting contacts by using correct jquery calls.
Not sure what the operation on disabled is supposed to do, but it also seemed to requier prop instead of attr. See for reference: http://api.jquery.com/prop/ """ The checked attribute value does not change with the state of the checkbox, while the checked property does. """
This commit is contained in:
parent
81d94dae2c
commit
d37c51ef2e
@ -345,12 +345,12 @@ function connedit_content(&$a) {
|
|||||||
$o .= "<script>function connectDefaultShare() {
|
$o .= "<script>function connectDefaultShare() {
|
||||||
\$('.abook-edit-me').each(function() {
|
\$('.abook-edit-me').each(function() {
|
||||||
if(! $(this).is(':disabled'))
|
if(! $(this).is(':disabled'))
|
||||||
$(this).removeAttr('checked');
|
$(this).prop('checked', false);
|
||||||
});\n\n";
|
});\n\n";
|
||||||
$perms = get_perms();
|
$perms = get_perms();
|
||||||
foreach($perms as $p => $v) {
|
foreach($perms as $p => $v) {
|
||||||
if($my_perms & $v[1]) {
|
if($my_perms & $v[1]) {
|
||||||
$o .= "\$('#me_id_perms_" . $p . "').attr('checked','checked'); \n";
|
$o .= "\$('#me_id_perms_" . $p . "').prop('checked', true); \n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$o .= " }\n</script>\n";
|
$o .= " }\n</script>\n";
|
||||||
|
Reference in New Issue
Block a user