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/shareitemmodel.js | |
parent | 7ae84e0e5c60a5b891dcc4183b0a1cff83f36090 (diff) | |
download | nextcloud-server-a5b0ea031de3036fc75c3b1d6b3c030a824c1736.tar.gz nextcloud-server-a5b0ea031de3036fc75c3b1d6b3c030a824c1736.zip |
make unshare work
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r-- | core/js/shareitemmodel.js | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js index 3569c6ffd1a..dabcc65c0a1 100644 --- a/core/js/shareitemmodel.js +++ b/core/js/shareitemmodel.js @@ -121,15 +121,7 @@ }, removeLinkShare: function() { - var model = this; - var itemType = this.get('itemType'); - var itemSource = this.get('itemSource'); - - OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function() { - model.fetch(); - //FIXME: updateIcon belongs to view - OC.Share.updateIcon(itemType, itemSource); - }); + this.removeShare(OC.Share.SHARE_TYPE_LINK, ''); }, setPublicUpload: function(allow) { @@ -179,6 +171,18 @@ }); }, + removeShare: function(shareType, shareWith) { + var model = this; + var itemType = this.get('itemType'); + var itemSource = this.get('itemSource'); + + OC.Share.unshare(itemType, itemSource, shareType, shareWith, function() { + model.fetch(); + //FIXME: updateIcon belongs to view + OC.Share.updateIcon(itemType, itemSource); + }); + }, + /** * @returns {boolean} */ |