diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-21 18:05:16 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-21 18:05:16 +0100 |
commit | 2db67c3308459c4d30935d87970151ea3cca5426 (patch) | |
tree | 91f8c47dc5019dfcd629d60eb8c5f87025707130 /core/js | |
parent | 36e14762708231e9c8cc785a3509f15c0d67cbc5 (diff) | |
parent | 9ef24b9a0f550e6ed55a5e09692dcfa29a920518 (diff) | |
download | nextcloud-server-2db67c3308459c4d30935d87970151ea3cca5426.tar.gz nextcloud-server-2db67c3308459c4d30935d87970151ea3cca5426.zip |
Merge pull request #23386 from owncloud/share-keepoptioncheckboxinblocks
Keep share checkboxes together
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/sharedialogshareelistview.js | 86 |
1 files changed, 50 insertions, 36 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index 49580cc888b..e4edbf24c08 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -16,42 +16,56 @@ var TEMPLATE = '<ul id="shareWithList" class="shareWithList">' + '{{#each sharees}}' + - ' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' + - ' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' + - ' {{#if avatarEnabled}}' + - ' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' + - ' {{/if}}' + - ' <span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' + - ' {{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' + - ' <input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' + - ' <label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' + - ' {{/unless}} {{/if}}' + - ' {{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' + - ' <input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' + - ' <label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' + - ' {{/unless}} {{/if}} {{/if}}' + - ' {{#if editPermissionPossible}}' + - ' <input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' + - ' <label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' + - ' {{/if}}' + - ' {{#unless isRemoteShare}}' + - ' <a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' + - ' <div class="cruds hidden">' + - ' {{#if createPermissionPossible}}' + - ' <input id="canCreate-{{cid}}-{{shareWith}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>' + - ' <label for="canCreate-{{cid}}-{{shareWith}}">{{createPermissionLabel}}</label>' + - ' {{/if}}' + - ' {{#if updatePermissionPossible}}' + - ' <input id="canUpdate-{{cid}}-{{shareWith}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>' + - ' <label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' + - ' {{/if}}' + - ' {{#if deletePermissionPossible}} {{#unless isRemoteShare}}' + - ' <input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' + - ' <label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' + - ' {{/unless}} {{/if}}' + - ' </div>' + - ' {{/unless}}' + - ' </li>' + + '<li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' + + '<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' + + '{{#if avatarEnabled}}' + + '<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' + + '{{/if}}' + + '<span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' + + '{{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' + + '<span class="shareOption">' + + '<input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' + + '<label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' + + '</span>' + + '{{/unless}} {{/if}}' + + '{{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' + + '<span class="shareOption">' + + '<input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' + + '<label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' + + '</span>' + + '{{/unless}} {{/if}} {{/if}}' + + '{{#if editPermissionPossible}}' + + '<span class="shareOption">' + + '<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' + + '<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' + + '{{#unless isRemoteShare}}' + + '<a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' + + '{{/unless}}' + + '</span>' + + '{{/if}}' + + '{{#unless isRemoteShare}}' + + '<div class="cruds hidden">' + + '{{#if createPermissionPossible}}' + + '<span class="shareOption">' + + '<input id="canCreate-{{cid}}-{{shareWith}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>' + + '<label for="canCreate-{{cid}}-{{shareWith}}">{{createPermissionLabel}}</label>' + + '</span>' + + '{{/if}}' + + '{{#if updatePermissionPossible}}' + + '<span class="shareOption">' + + '<input id="canUpdate-{{cid}}-{{shareWith}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>' + + '<label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' + + '</span>' + + '{{/if}}' + + '{{#if deletePermissionPossible}} {{#unless isRemoteShare}}' + + '<span class="shareOption">' + + '<input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' + + '<label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' + + '</span>' + + '{{/unless}} {{/if}}' + + '</div>' + + '{{/unless}}' + + '</li>' + '{{/each}}' + '</ul>' ; |