summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-06 14:45:45 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-06 14:45:45 -0400
commit6f83540dd69904ec3d1cda87024ed13cf9e967b7 (patch)
tree6b0a2ed4d20059080a8dc32fde12bf336d5c2c4d /core
parent83117445ace3fbb1562afbad56fc4527b453d4e5 (diff)
downloadnextcloud-server-6f83540dd69904ec3d1cda87024ed13cf9e967b7.tar.gz
nextcloud-server-6f83540dd69904ec3d1cda87024ed13cf9e967b7.zip
Remove person from array after unshare, so name appears in autocomplete again
Diffstat (limited to 'core')
-rw-r--r--core/js/share.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 48fbc9c4f42..463d08d3e7e 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -328,8 +328,12 @@ $(document).ready(function() {
$('.unshare').live('click', function() {
var li = $(this).parent();
- OC.Share.unshare($('#dropdown').data('item-type'), $('#dropdown').data('item'), $(li).data('share-type'), $(li).data('share-with'), function() {
+ var shareType = $(li).data('share-type');
+ var shareWith = $(li).data('share-with');
+ OC.Share.unshare($('#dropdown').data('item-type'), $('#dropdown').data('item'), shareType, shareWith, function() {
$(li).remove();
+ var index = OC.Share.itemShares[shareType].indexOf(shareWith);
+ OC.Share.itemShares[shareType].splice(index, 1);
});
});