summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r--core/js/shareitemmodel.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
index 949c86599bc..877b3cb230d 100644
--- a/core/js/shareitemmodel.js
+++ b/core/js/shareitemmodel.js
@@ -201,11 +201,9 @@
this.get('linkShare').password = password;
},
- addShare: function(event, selected, options) {
- event.preventDefault();
-
- var shareType = selected.item.value.shareType;
- var shareWith = selected.item.value.shareWith;
+ addShare: function(attributes, options) {
+ var shareType = attributes.shareType;
+ var shareWith = attributes.shareWith;
var fileName = this.fileInfoModel.get('name');
options = options || {};
@@ -241,6 +239,7 @@
var itemType = this.get('itemType');
var itemSource = this.get('itemSource');
+ // TODO: in the future, only set the permissions on the model but don't save directly
OC.Share.setPermissions(itemType, itemSource, shareType, shareWith, permissions);
},