summaryrefslogtreecommitdiffstats
path: root/core/js/shareitemmodel.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-09-14 17:47:47 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:28 +0200
commit06b11dd602b5073d383d14e10072708907513cb3 (patch)
treec210dfa045cbe5ea1dffe736ef98b457eb6a7434 /core/js/shareitemmodel.js
parente90065881d47a64b6c376208ece208932711c765 (diff)
downloadnextcloud-server-06b11dd602b5073d383d14e10072708907513cb3.tar.gz
nextcloud-server-06b11dd602b5073d383d14e10072708907513cb3.zip
Fix shares list events
Some events need preventing default like unshare, but setting permissions doesn't.
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);
},