link-sharing JS code for both events and calendars now works
parent
6e7369586f
commit
417dcef2e2
|
@ -972,10 +972,10 @@ $(document).ready(function(){
|
|||
return r;
|
||||
};
|
||||
|
||||
/* sharing/unsharing single events done right */
|
||||
$('.share-link-container input[type="checkbox"].share-link').live('change', function(e){
|
||||
/* link-sharing/unsharing of single events and calendars done right */
|
||||
$('.share-interface-container.link-share input[type="checkbox"].share-link').live('change', function(e){
|
||||
// get the data
|
||||
slcontainer = $(this).parents('.share-link-container')
|
||||
slcontainer = $(this).parents('.share-interface-container.link-share')
|
||||
itemType = slcontainer.attr('data-item-type')
|
||||
itemSource = slcontainer.attr('data-item')
|
||||
itemSourceName = slcontainer.attr('data-item-source-name')
|
||||
|
@ -1011,9 +1011,9 @@ $(document).ready(function(){
|
|||
})
|
||||
|
||||
/* setting the password */
|
||||
$('.share-link-container input[type="password"].share-link-password').live('blur', function(e){
|
||||
$('.share-interface-container.link-share input[type="password"].share-link-password').live('blur', function(e){
|
||||
// get the data
|
||||
slcontainer = $(this).parents('.share-link-container')
|
||||
slcontainer = $(this).parents('.share-interface-container.link-share')
|
||||
itemType = slcontainer.attr('data-item-type')
|
||||
itemSource = slcontainer.attr('data-item')
|
||||
itemSourceName = slcontainer.attr('data-item-source-name')
|
||||
|
@ -1030,7 +1030,7 @@ $(document).ready(function(){
|
|||
})
|
||||
|
||||
/* what about Enter and Escape keys? */
|
||||
$('.share-link-container input[type="password"].share-link-password').live('keydown', function(e){
|
||||
$('.share-interface-container.link-share input[type="password"].share-link-password').live('keydown', function(e){
|
||||
// Enter? submit!
|
||||
if (e.which == 13) {
|
||||
e.preventDefault();
|
||||
|
@ -1042,7 +1042,7 @@ $(document).ready(function(){
|
|||
})
|
||||
|
||||
/* removing password */
|
||||
$('.share-link-container input[type="checkbox"].password-protect').live('change', function(e){
|
||||
$('.share-interface-container.link-share input[type="checkbox"].password-protect').live('change', function(e){
|
||||
// clear the data input
|
||||
$(this)
|
||||
.siblings('.displayable')
|
||||
|
@ -1050,7 +1050,7 @@ $(document).ready(function(){
|
|||
.attr('placeholder', 'Password')
|
||||
.val('')
|
||||
// get the data
|
||||
slcontainer = $(this).parents('.share-link-container')
|
||||
slcontainer = $(this).parents('.share-interface-container.link-share')
|
||||
itemType = slcontainer.attr('data-item-type')
|
||||
itemSource = slcontainer.attr('data-item')
|
||||
itemSourceName = slcontainer.attr('data-item-source-name')
|
||||
|
@ -1065,9 +1065,9 @@ $(document).ready(function(){
|
|||
})
|
||||
|
||||
/* setting the expiration date */
|
||||
$('.share-link-container input[type="date"].expire-date').live('change', function(e){
|
||||
$('.share-interface-container.link-share input[type="date"].expire-date').live('change', function(e){
|
||||
// get the data
|
||||
slcontainer = $(this).parents('.share-link-container')
|
||||
slcontainer = $(this).parents('.share-interface-container.link-share')
|
||||
itemType = slcontainer.attr('data-item-type')
|
||||
itemSource = slcontainer.attr('data-item')
|
||||
itemSourceName = slcontainer.attr('data-item-source-name')
|
||||
|
@ -1083,14 +1083,14 @@ $(document).ready(function(){
|
|||
})
|
||||
|
||||
/* removing password */
|
||||
$('.share-link-container input[type="checkbox"].password-protect').live('change', function(e){
|
||||
$('.share-interface-container.link-share input[type="checkbox"].password-protect').live('change', function(e){
|
||||
// clear the data input
|
||||
$(this)
|
||||
.siblings('.displayable')
|
||||
.children('input')
|
||||
.val('')
|
||||
// get the data
|
||||
slcontainer = $(this).parents('.share-link-container')
|
||||
slcontainer = $(this).parents('.share-interface-container.link-share')
|
||||
itemType = slcontainer.attr('data-item-type')
|
||||
itemSource = slcontainer.attr('data-item')
|
||||
itemSourceName = slcontainer.attr('data-item-source-name')
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
data-item-type="<?php p($_['item_type']); ?>"
|
||||
data-link="true"
|
||||
data-permissions="<?php p($_['permissions']) ?>"
|
||||
title="<?php p($sharee['share_with']); ?>">
|
||||
title="<?php p($sharee['share_with']); ?>"
|
||||
class="shared-with-entry-container">
|
||||
<!-- the username -->
|
||||
<span class="username"><?php p($sharee['share_with'] . ($sharee['share_type'] == OCP\Share::SHARE_TYPE_GROUP ? ' (group)' : '')); ?></span>
|
||||
<!-- unshare link -->
|
||||
|
|
Loading…
Reference in New Issue