Merge pull request #23386 from owncloud/share-keepoptioncheckboxinblocks
Keep share checkboxes together
This commit is contained in:
commit
2db67c3308
2 changed files with 55 additions and 36 deletions
|
@ -63,6 +63,11 @@
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#shareWithList .shareOption {
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
#shareWithList .unshare img, #shareWithList .showCruds img {
|
#shareWithList .unshare img, #shareWithList .showCruds img {
|
||||||
vertical-align:text-bottom; /* properly align icons */
|
vertical-align:text-bottom; /* properly align icons */
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,42 +16,56 @@
|
||||||
var TEMPLATE =
|
var TEMPLATE =
|
||||||
'<ul id="shareWithList" class="shareWithList">' +
|
'<ul id="shareWithList" class="shareWithList">' +
|
||||||
'{{#each sharees}}' +
|
'{{#each sharees}}' +
|
||||||
' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' +
|
'<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>' +
|
'<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}}' +
|
'{{#if avatarEnabled}}' +
|
||||||
' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
|
'<div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
|
||||||
' {{/if}}' +
|
'{{/if}}' +
|
||||||
' <span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' +
|
'<span class="has-tooltip username" title="{{shareWith}}">{{shareWithDisplayName}}</span>' +
|
||||||
' {{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' +
|
'{{#if mailNotificationEnabled}} {{#unless isRemoteShare}}' +
|
||||||
' <input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' +
|
'<span class="shareOption">' +
|
||||||
' <label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
|
'<input id="mail-{{cid}}-{{shareWith}}" type="checkbox" name="mailNotification" class="mailNotification checkbox" {{#if wasMailSent}}checked="checked"{{/if}} />' +
|
||||||
' {{/unless}} {{/if}}' +
|
'<label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
|
||||||
' {{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' +
|
'</span>' +
|
||||||
' <input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
|
'{{/unless}} {{/if}}' +
|
||||||
' <label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
|
'{{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' +
|
||||||
' {{/unless}} {{/if}} {{/if}}' +
|
'<span class="shareOption">' +
|
||||||
' {{#if editPermissionPossible}}' +
|
'<input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
|
||||||
' <input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
|
'<label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
|
||||||
' <label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
|
'</span>' +
|
||||||
' {{/if}}' +
|
'{{/unless}} {{/if}} {{/if}}' +
|
||||||
' {{#unless isRemoteShare}}' +
|
'{{#if editPermissionPossible}}' +
|
||||||
' <a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
|
'<span class="shareOption">' +
|
||||||
' <div class="cruds hidden">' +
|
'<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
|
||||||
' {{#if createPermissionPossible}}' +
|
'<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
|
||||||
' <input id="canCreate-{{cid}}-{{shareWith}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>' +
|
'{{#unless isRemoteShare}}' +
|
||||||
' <label for="canCreate-{{cid}}-{{shareWith}}">{{createPermissionLabel}}</label>' +
|
'<a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
|
||||||
' {{/if}}' +
|
'{{/unless}}' +
|
||||||
' {{#if updatePermissionPossible}}' +
|
'</span>' +
|
||||||
' <input id="canUpdate-{{cid}}-{{shareWith}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>' +
|
'{{/if}}' +
|
||||||
' <label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' +
|
'{{#unless isRemoteShare}}' +
|
||||||
' {{/if}}' +
|
'<div class="cruds hidden">' +
|
||||||
' {{#if deletePermissionPossible}} {{#unless isRemoteShare}}' +
|
'{{#if createPermissionPossible}}' +
|
||||||
' <input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' +
|
'<span class="shareOption">' +
|
||||||
' <label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' +
|
'<input id="canCreate-{{cid}}-{{shareWith}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>' +
|
||||||
' {{/unless}} {{/if}}' +
|
'<label for="canCreate-{{cid}}-{{shareWith}}">{{createPermissionLabel}}</label>' +
|
||||||
' </div>' +
|
'</span>' +
|
||||||
' {{/unless}}' +
|
'{{/if}}' +
|
||||||
' </li>' +
|
'{{#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}}' +
|
'{{/each}}' +
|
||||||
'</ul>'
|
'</ul>'
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue