diff options
author | Frank Karlitschek <frank@owncloud.org> | 2013-10-21 14:07:33 -0700 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2013-10-21 14:07:33 -0700 |
commit | 691536762275ec09204b74497377a7933770ba43 (patch) | |
tree | 06221cc4ba375886a9b493c8cc90c1b1af3667b2 /core | |
parent | 408e0022dd9ae9b3915a7a9e64d6a90b1396a8ef (diff) | |
parent | b27595888ae11c921edc383f6d880f646bacd367 (diff) | |
download | nextcloud-server-691536762275ec09204b74497377a7933770ba43.tar.gz nextcloud-server-691536762275ec09204b74497377a7933770ba43.zip |
Merge pull request #5446 from frisco82/fixNotifyUser
Fix notify user checkbox
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/share.php | 2 | ||||
-rw-r--r-- | core/js/share.js | 21 |
2 files changed, 11 insertions, 12 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 7dd89deb8e5..0dacc17d3a5 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -83,7 +83,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo ($return) ? OC_JSON::success() : OC_JSON::error(); } break; - case 'informRecipients': + case 'informRecipients': $l = OC_L10N::get('core'); diff --git a/core/js/share.js b/core/js/share.js index bc5ab0a8ad3..281cccaaef8 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -531,13 +531,13 @@ $(document).ready(function() { }); $(document).on('click', '#dropdown .unshare', function() { - var li = $(this).parent(); + var $li = $(this).closest('li'); var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); - var shareType = $(li).data('share-type'); - var shareWith = $(li).data('share-with'); + var shareType = $li.data('share-type'); + var shareWith = $li.data('share-with'); OC.Share.unshare(itemType, itemSource, shareType, shareWith, function() { - $(li).remove(); + $li.remove(); var index = OC.Share.itemShares[shareType].indexOf(shareWith); OC.Share.itemShares[shareType].splice(index, 1); OC.Share.updateIcon(itemType, itemSource); @@ -549,8 +549,8 @@ $(document).ready(function() { }); $(document).on('change', '#dropdown .permissions', function() { + var li = $(this).closest('li'); if ($(this).attr('name') == 'edit') { - var li = $(this).parent().parent(); var checkboxes = $('.permissions', li); var checked = $(this).is(':checked'); // Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck @@ -558,7 +558,6 @@ $(document).ready(function() { $(checkboxes).filter('input[name="update"]').attr('checked', checked); $(checkboxes).filter('input[name="delete"]').attr('checked', checked); } else { - var li = $(this).parent().parent().parent(); var checkboxes = $('.permissions', li); // Uncheck Edit if Create, Update, and Delete are not checked if (!$(this).is(':checked') @@ -581,8 +580,8 @@ $(document).ready(function() { }); OC.Share.setPermissions($('#dropdown').data('item-type'), $('#dropdown').data('item-source'), - $(li).data('share-type'), - $(li).data('share-with'), + li.data('share-type'), + li.data('share-with'), permissions); }); @@ -736,7 +735,7 @@ $(document).ready(function() { }); $(document).on('click', '#dropdown input[name=mailNotification]', function() { - var li = $(this).parent(); + var $li = $(this).closest('li'); var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); var action = ''; @@ -746,8 +745,8 @@ $(document).ready(function() { action = 'informRecipientsDisabled'; } - var shareType = $(li).data('share-type'); - var shareWith = $(li).data('share-with'); + var shareType = $li.data('share-type'); + var shareWith = $li.data('share-with'); $.post(OC.filePath('core', 'ajax', 'share.php'), {action: action, recipient: shareWith, shareType: shareType, itemSource: itemSource, itemType: itemType}, function(result) { if (result.status !== 'success') { |