diff options
author | Olivier Paroz <oparoz@users.noreply.github.com> | 2016-03-01 18:55:52 +0300 |
---|---|---|
committer | Olivier Paroz <oparoz@users.noreply.github.com> | 2016-03-01 18:55:52 +0300 |
commit | 7cbc0e5d9079c268a5b31e2127d00e412a5fe5a8 (patch) | |
tree | d84e62a39d57a5b2034e554dad16017d5d135648 | |
parent | 60474b12d5eb695e76bf8be19ef1d5b1f0bb4e33 (diff) | |
parent | da5a61c41007e8401be05edad3b32f820743b47d (diff) |
Merge pull request #546 from owncloud/stable8.2-fix-sharing-checkboxesv8.2.5RC2v8.2.5RC1v8.2.5v8.2.4RC2v8.2.4RC1v8.2.4v8.2.3RC2v8.2.3RC1v8.2.3
[Stable8.2] Restore permission checkboxes
-rw-r--r-- | js/vendor/owncloud/share.js | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/js/vendor/owncloud/share.js b/js/vendor/owncloud/share.js index ac40cda8..7e834dba 100644 --- a/js/vendor/owncloud/share.js +++ b/js/vendor/owncloud/share.js @@ -634,24 +634,49 @@ } html += '<label><input type="checkbox" class="checkbox checkbox--right" name="mailNotification" class="mailNotification" ' + checked + ' />'+t('core', 'notify by email')+'</label> '; } - if (oc_appconfig.core.resharingAllowed && (possiblePermissions & OC.PERMISSION_SHARE)) { - html += '<label><input id="canShare-'+escapeHTML(shareWith)+'" type="checkbox" class="checkbox checkbox--right" name="share" class="permissions" '+shareChecked+' data-permissions="'+OC.PERMISSION_SHARE+'" />'+t('core', 'can share')+'</label>'; + if (oc_appconfig.core.resharingAllowed && + (possiblePermissions & OC.PERMISSION_SHARE)) { + html += '<input id="canShare-' + escapeHTML(shareWith) + + '" type="checkbox" class="permissions checkbox checkbox--right" name="share" ' + + shareChecked + ' data-permissions="' + OC.PERMISSION_SHARE + '" />'; + html += '<label for="canShare-' + escapeHTML(shareWith) + '">' + + t('core', 'can share') + '</label>'; } - if (possiblePermissions & OC.PERMISSION_CREATE || possiblePermissions & OC.PERMISSION_UPDATE || possiblePermissions & OC.PERMISSION_DELETE) { - html += '<label><input id="canEdit-'+escapeHTML(shareWith)+'" type="checkbox" class="checkbox checkbox--right" name="edit" class="permissions" '+editChecked+' />'+t('core', 'can edit')+'</label>'; + if (possiblePermissions & OC.PERMISSION_CREATE || + possiblePermissions & OC.PERMISSION_UPDATE || + possiblePermissions & OC.PERMISSION_DELETE) { + html += '<input id="canEdit-' + escapeHTML(shareWith) + + '" type="checkbox" class="permissions checkbox checkbox--right" name="edit" ' + + editChecked + ' />'; + html += '<label for="canEdit-' + escapeHTML(shareWith) + '">' + + t('core', 'can edit') + '</label>'; } - if (shareType !== OC.Share.SHARE_TYPE_REMOTE) { - showCrudsButton = '<a href="#" class="showCruds"><img class="svg" alt="'+t('core', 'access control')+'" src="'+OC.imagePath('core', 'actions/triangle-s')+'"/></a>'; + if (shareType !== this.SHARE_TYPE_REMOTE) { + showCrudsButton = '<a href="#" class="showCruds"><img class="svg" alt="' + + t('core', 'access control') + '" src="' + + OC.imagePath('core', 'actions/triangle-s') + '"/></a>'; } html += '<div class="cruds" style="display:none;">'; if (possiblePermissions & OC.PERMISSION_CREATE) { - html += '<label><input id="canCreate-' + escapeHTML(shareWith) + '" type="checkbox" class="checkbox checkbox--right" name="create" class="permissions" ' + createChecked + ' data-permissions="' + OC.PERMISSION_CREATE + '"/>' + t('core', 'create') + '</label>'; + html += '<input id="canCreate-' + escapeHTML(shareWith) + + '" type="checkbox" class="permissions checkbox checkbox--right" name="create" ' + + createChecked + ' data-permissions="' + OC.PERMISSION_CREATE + '"/>'; + html += '<label for="canCreate-' + escapeHTML(shareWith) + '">' + + t('core', 'create') + '</label>'; } if (possiblePermissions & OC.PERMISSION_UPDATE) { - html += '<label><input id="canUpdate-' + escapeHTML(shareWith) + '" type="checkbox" class="checkbox checkbox--right" name="update" class="permissions" ' + updateChecked + ' data-permissions="' + OC.PERMISSION_UPDATE + '"/>' + t('core', 'change') + '</label>'; + html += '<input id="canUpdate-' + escapeHTML(shareWith) + + '" type="checkbox" class="permissions checkbox checkbox--right" name="update" ' + + updateChecked + ' data-permissions="' + OC.PERMISSION_UPDATE + '"/>'; + html += '<label for="canUpdate-' + escapeHTML(shareWith) + '">' + + t('core', 'change') + '</label>'; } if (possiblePermissions & OC.PERMISSION_DELETE) { - html += '<label><input id="canDelete-' + escapeHTML(shareWith) + '" type="checkbox" class="checkbox checkbox--right" name="delete" class="permissions" ' + deleteChecked + ' data-permissions="' + OC.PERMISSION_DELETE + '"/>' + t('core', 'delete') + '</label>'; + html += '<input id="canDelete-' + escapeHTML(shareWith) + + '" type="checkbox" class="permissions checkbox checkbox--right" name="delete" ' + + deleteChecked + ' data-permissions="' + OC.PERMISSION_DELETE + '"/>'; + html += '<label for="canDelete-' + escapeHTML(shareWith) + '">' + + t('core', 'delete') + '</label>'; } html += '</div>'; html += '</li>'; |