diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-09-14 01:24:21 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:28 +0200 |
commit | a5b0ea031de3036fc75c3b1d6b3c030a824c1736 (patch) | |
tree | 1b02b52842ccf93e9ac964a985b8afc6c2aabf42 /core/js/share.js | |
parent | 7ae84e0e5c60a5b891dcc4183b0a1cff83f36090 (diff) | |
download | nextcloud-server-a5b0ea031de3036fc75c3b1d6b3c030a824c1736.tar.gz nextcloud-server-a5b0ea031de3036fc75c3b1d6b3c030a824c1736.zip |
make unshare work
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/core/js/share.js b/core/js/share.js index 0157bcdba7c..85b920a6913 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -885,40 +885,6 @@ $(document).ready(function() { return false; }); - $(document).on('click', '#dropdown .unshare', function() { - 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.attr('data-share-with'); - var $button = $(this); - - if (!$button.is('a')) { - $button = $button.closest('a'); - } - - if ($button.hasClass('icon-loading-small')) { - // deletion in progress - return false; - } - $button.empty().addClass('icon-loading-small'); - - OC.Share.unshare(itemType, itemSource, shareType, shareWith, function() { - $li.remove(); - var index = OC.Share.itemShares[shareType].indexOf(shareWith); - OC.Share.itemShares[shareType].splice(index, 1); - // updated list of shares - OC.Share.currentShares[shareType].splice(index, 1); - $('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares})); - OC.Share.updateIcon(itemType, itemSource); - if (typeof OC.Share.statuses[itemSource] === 'undefined') { - $('#expiration').slideUp(OC.menuSpeed); - } - }); - - return false; - }); - $(document).on('change', '#dropdown .permissions', function() { var li = $(this).closest('li'); if ($(this).attr('name') == 'edit') { |