summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/calendar/js/calendar.js8
-rw-r--r--apps/calendar/templates/share.dropdown.php2
2 files changed, 6 insertions, 4 deletions
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 = '<li id="sharewithuser_' + $('#share_user option:selected').text() +'"><input type="checkbox" width="12px" style="visibility:hidden;" title="' + $('#share_user option:selected').text() + '">' + $('#share_user option:selected').text() + ' <img src="/owncloud/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>';
$('#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 = '<li id="sharewithgroup_' + $('#share_group option:selected').text() +'"><input type="checkbox" width="12px" style="visibility:hidden;" title="' + $('#share_group option:selected').text() + '">' + $('#share_group option:selected').text() + ' <img src="/owncloud/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>';
$('#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());
</select><br>
<ul id="sharewithgroup_list">
<?php foreach($groups as $group): ?>
- <li id="sharewithuser_<?php echo $group['share']; ?>"><input type="checkbox" width="12px" <?php echo ($group['permissions']?'checked="checked"':'')?> style="visibility:hidden;" title="<?php echo $l->t('Editable'); ?>"><?php echo $group['share']; ?><img src="<?php echo OC::$WEBROOT; ?>/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>
+ <li id="sharewithgroup_<?php echo $group['share']; ?>"><input type="checkbox" width="12px" <?php echo ($group['permissions']?'checked="checked"':'')?> style="visibility:hidden;" title="<?php echo $l->t('Editable'); ?>"><?php echo $group['share']; ?><img src="<?php echo OC::$WEBROOT; ?>/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>
<script>
$('#sharewithgroup_<?php echo $group['share']; ?> > img').click(function(){
$('#share_group option[value="<?php echo $group['share']; ?>"]').removeAttr('disabled');