summaryrefslogtreecommitdiffstats
path: root/core/js/sharedialoglinkshareview.js
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-09-14 01:01:02 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:28 +0200
commit7ae84e0e5c60a5b891dcc4183b0a1cff83f36090 (patch)
tree2de5afc2830862fd37688b0e52457ff1637c7199 /core/js/sharedialoglinkshareview.js
parent6d832359b6f00bed5b2444b8d3cd0680a459619e (diff)
downloadnextcloud-server-7ae84e0e5c60a5b891dcc4183b0a1cff83f36090.tar.gz
nextcloud-server-7ae84e0e5c60a5b891dcc4183b0a1cff83f36090.zip
make 'Allow editing' (aka public upload) checkbox work
Diffstat (limited to 'core/js/sharedialoglinkshareview.js')
-rw-r--r--core/js/sharedialoglinkshareview.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index 04ea41e5e00..f49a73f291b 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -94,7 +94,8 @@
throw 'missing OC.Share.ShareConfigModel';
}
- _.bindAll(this, 'onLinkCheckBoxChange', 'onPasswordEntered', 'onShowPasswordClick');
+ _.bindAll(this, 'onLinkCheckBoxChange', 'onPasswordEntered',
+ 'onShowPasswordClick', 'onAllowPublicUploadChange');
},
onLinkCheckBoxChange: function() {
@@ -149,6 +150,12 @@
this.model.addLinkShare({password: password});
},
+ onAllowPublicUploadChange: function() {
+ this.$el.find('#sharingDialogAllowPublicUpload')
+ .siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');
+ this.model.setPublicUpload(this.$el.find('#sharingDialogAllowPublicUpload').is(':checked'));
+ },
+
render: function() {
var linkShareTemplate = this.template();
@@ -199,6 +206,7 @@
}));
this.$el.find('#linkCheckbox').change(this.onLinkCheckBoxChange);
+ this.$el.find('#sharingDialogAllowPublicUpload').change(this.onAllowPublicUploadChange);
this.$el.find('#linkText').click(this.onLinkTextClick);
this.$el.find('#showPassword').click(this.onShowPasswordClick);
this.$el.find('#linkPassText').focusout(this.onPasswordEntered);