diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-06 00:02:11 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-07-06 00:02:11 +0200 |
commit | dad91c156fe63894b145530687ed5b9f84a3e571 (patch) | |
tree | d1a3a67d429185dbc5597e8f485709757211cbc9 /core/js | |
parent | e159cbf527822edc28522df48b0526419835ca29 (diff) | |
parent | bc1c77664205c8e044cf611a9339773a9f8af2c6 (diff) | |
download | nextcloud-server-dad91c156fe63894b145530687ed5b9f84a3e571.tar.gz nextcloud-server-dad91c156fe63894b145530687ed5b9f84a3e571.zip |
Merge branch 'master' into fixing-3942-master
Conflicts:
apps/files/ajax/upload.php
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/share.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/js/share.js b/core/js/share.js index 588202d2273..21e352ee1c6 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -163,10 +163,10 @@ OC.Share={ var allowPublicUploadStatus = false; $.each(data.shares, function(key, value) { - if (allowPublicUploadStatus) { - return true; - } - allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false; + if (allowPublicUploadStatus) { + return true; + } + allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false; }); html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Share with')+'" />'; @@ -181,11 +181,13 @@ OC.Share={ html += '<div id="linkPass">'; html += '<input id="linkPassText" type="password" placeholder="'+t('core', 'Password')+'" />'; html += '</div>'; - html += '<div id="allowPublicUploadWrapper" style="display:none;">'; - html += '<input type="checkbox" value="1" name="allowPublicUpload" id="sharingDialogAllowPublicUpload"' + ((allowPublicUploadStatus) ? 'checked="checked"' : '') + ' />'; - html += '<label for="sharingDialogAllowPublicUpload">' + t('core', 'Allow Public Upload') + '</label>'; - html += '</div></div>'; - html += '<form id="emailPrivateLink" >'; + if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) { + html += '<div id="allowPublicUploadWrapper" style="display:none;">'; + html += '<input type="checkbox" value="1" name="allowPublicUpload" id="sharingDialogAllowPublicUpload"' + ((allowPublicUploadStatus) ? 'checked="checked"' : '') + ' />'; + html += '<label for="sharingDialogAllowPublicUpload">' + t('core', 'Allow Public Upload') + '</label>'; + html += '</div>'; + } + html += '</div><form id="emailPrivateLink" >'; html += '<input id="email" style="display:none; width:62%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />'; html += '<input id="emailButton" style="display:none;" type="submit" value="'+t('core', 'Send')+'" />'; html += '</form>'; |