diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-23 11:18:00 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-23 11:18:00 +0200 |
commit | fc76a13c520d1d5345c721e0616d770e1fd344ea (patch) | |
tree | 1dc8e108588a52182e0c8c346423aab171e66944 /core/js/share.js | |
parent | 534d93d2d3d549039db2661cdc4b9e939a0abe0d (diff) | |
parent | 9851f0f4f2a97dc6ac1382bcd533eb23feffa4e0 (diff) | |
download | nextcloud-server-fc76a13c520d1d5345c721e0616d770e1fd344ea.tar.gz nextcloud-server-fc76a13c520d1d5345c721e0616d770e1fd344ea.zip |
Merge branch 'master' into sharing_mail_notification_master
Conflicts:
lib/public/share.php
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js index 7342747a15a..cf078d42ffc 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -492,7 +492,7 @@ $(document).ready(function() { if (!$('.cruds', this).is(':visible')) { $('a', this).hide(); if (!$('input[name="edit"]', this).is(':checked')) { - $('input:[type=checkbox]', this).hide(); + $('input[type="checkbox"]', this).hide(); $('label', this).hide(); } } else { @@ -612,7 +612,18 @@ $(document).ready(function() { if (!$('#showPassword').is(':checked') ) { var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); - OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.PERMISSION_READ); + var allowPublicUpload = $('#sharingDialogAllowPublicUpload').is(':checked'); + var permissions = 0; + + // Calculate permissions + if (allowPublicUpload) { + permissions = OC.PERMISSION_UPDATE + OC.PERMISSION_CREATE + OC.PERMISSION_READ; + } else { + permissions = OC.PERMISSION_READ; + } + + + OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', permissions); } else { $('#linkPassText').focus(); } |