diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-09-14 12:48:01 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:28 +0200 |
commit | 8194d092e71b1c44a441dddc64b7e7533adbbfb9 (patch) | |
tree | d108baa62acb8a08e2b95fadd28ff8ebc82066b8 /core/js/sharedialoglinkshareview.js | |
parent | c2ff2ca9825af347d0247687322d3d12eb311185 (diff) | |
download | nextcloud-server-8194d092e71b1c44a441dddc64b7e7533adbbfb9.tar.gz nextcloud-server-8194d092e71b1c44a441dddc64b7e7533adbbfb9.zip |
Add expiration date handling in share tab
Diffstat (limited to 'core/js/sharedialoglinkshareview.js')
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index f49a73f291b..cadec3071d3 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -108,7 +108,8 @@ if($checkBox.is(':checked')) { if(this.configModel.get('enforcePasswordForPublicLink') === false) { $loading.removeClass('hidden'); - this.model.addLinkShare(); + // this will create it + this.model.saveLinkShare(); } else { this.$el.find('#linkPass').slideToggle(OC.menuSpeed); // TODO drop with IE8 drop @@ -131,7 +132,8 @@ onShowPasswordClick: function() { this.$el.find('#linkPass').slideToggle(OC.menuSpeed); if(!this.$el.find('#showPassword').is(':checked')) { - this.model.addLinkShare({password: ''}); + this.model.setPassword(''); + this.model.saveLinkShare(); } else { this.$el.find('#linkPassText').focus(); } @@ -147,13 +149,15 @@ .removeClass('hidden') .addClass('inlineblock'); - this.model.addLinkShare({password: password}); + this.model.setPassword(password); + this.model.saveLinkShare(); }, onAllowPublicUploadChange: function() { this.$el.find('#sharingDialogAllowPublicUpload') .siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock'); this.model.setPublicUpload(this.$el.find('#sharingDialogAllowPublicUpload').is(':checked')); + this.model.saveLinkShare(); }, render: function() { @@ -205,6 +209,7 @@ mailButtonText: t('core', 'Send') })); + // TODO: move this to delegate events instead this.$el.find('#linkCheckbox').change(this.onLinkCheckBoxChange); this.$el.find('#sharingDialogAllowPublicUpload').change(this.onAllowPublicUploadChange); this.$el.find('#linkText').click(this.onLinkTextClick); |