Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2016-03-01 18:18:29 +0300
committerOlivier Paroz <github@oparoz.com>2016-03-01 18:18:29 +0300
commitda5a61c41007e8401be05edad3b32f820743b47d (patch)
treed84e62a39d57a5b2034e554dad16017d5d135648 /js
parent60474b12d5eb695e76bf8be19ef1d5b1f0bb4e33 (diff)
Restore permission checkboxes
Diffstat (limited to 'js')
-rw-r--r--js/vendor/owncloud/share.js43
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>';