summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-09-14 01:24:21 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:28 +0200
commita5b0ea031de3036fc75c3b1d6b3c030a824c1736 (patch)
tree1b02b52842ccf93e9ac964a985b8afc6c2aabf42 /core/js/shareitemmodel.js
parent7ae84e0e5c60a5b891dcc4183b0a1cff83f36090 (diff)
downloadnextcloud-server-a5b0ea031de3036fc75c3b1d6b3c030a824c1736.tar.gz
nextcloud-server-a5b0ea031de3036fc75c3b1d6b3c030a824c1736.zip
make unshare work
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js22
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}
*/