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:
Alexandre Hannud Abdo 2015-05-22 10:15:29 -03:00
parent 81d94dae2c
commit d37c51ef2e

View File

@ -345,12 +345,12 @@ function connedit_content(&$a) {
$o .= "<script>function connectDefaultShare() {
\$('.abook-edit-me').each(function() {
if(! $(this).is(':disabled'))
$(this).removeAttr('checked');
$(this).prop('checked', false);
});\n\n";
$perms = get_perms();
foreach($perms as $p => $v) {
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";