diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index f6a353edd62..cf0bb079c88 100644 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -540,9 +540,10 @@ Calendar={ var newitem = '
  • ' + $('#share_user option:selected').text() + '
  • '; $('#sharewithuser_list').append(newitem); $('#sharewithuser_' + $('#share_user option:selected').text() + ' > img').click(function(){ - $('#share_user option[value="' + $(this).parent().text() + '"]').attr('disabled', 'false'); + $('#share_user option[value="' + $(this).parent().text() + '"]').removeAttr('disabled'); Calendar.UI.Share.unshare(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $(this).parent().text(), 'user' ); $(this).parent().remove(); + $("#share_user").trigger("liszt:updated"); }); $('#share_user option:selected').attr('disabled', 'disabled'); $("#share_user").trigger("liszt:updated"); @@ -553,10 +554,11 @@ Calendar={ Calendar.UI.Share.share(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $('#share_group option:selected').text(), 'group'); var newitem = '
  • ' + $('#share_group option:selected').text() + '
  • '; $('#sharewithgroup_list').append(newitem); - $('#sharewithgroup_' + $('#share_user option:selected').text() + ' > img').click(function(){ - $('#share_group option[value="' + $(this).parent().text() + '"]').attr('disabled', 'false'); + $('#sharewithgroup_' + $('#share_group option:selected').text() + ' > img').click(function(){ + $('#share_group option[value="' + $(this).parent().text() + '"]').removeAttr('disabled'); Calendar.UI.Share.unshare(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $(this).parent().text(), 'group'); $(this).parent().remove(); + $("#share_group").trigger("liszt:updated"); }); $('#share_group option:selected').attr('disabled', 'disabled'); $("#share_group").trigger("liszt:updated"); diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php index 6a944f1f091..ca1e128ea78 100644 --- a/apps/calendar/templates/share.dropdown.php +++ b/apps/calendar/templates/share.dropdown.php @@ -53,7 +53,7 @@ echo html_select_options($allgroups, array());