mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix sharing calendar manager
This commit is contained in:
parent
1a0c273a20
commit
66ac6c232c
2 changed files with 6 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue