diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-10-29 13:58:14 +0100 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-01 21:29:40 +0100 |
commit | 1bd6d39b39dd527ad095510173e9012afaafd3b0 (patch) | |
tree | 9b3cad7e1dc621498cf519c3aadc53247f0582e1 /core/js/share | |
parent | feb9f72e8bd4b5601974ec894d60e1bad3570dde (diff) | |
download | nextcloud-server-1bd6d39b39dd527ad095510173e9012afaafd3b0.tar.gz nextcloud-server-1bd6d39b39dd527ad095510173e9012afaafd3b0.zip |
Migrate link shares to array
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/js/share')
-rw-r--r-- | core/js/share/sharedialoglinkshareview.handlebars | 27 | ||||
-rw-r--r-- | core/js/share/sharedialoglinkshareview_popover_menu.handlebars | 17 | ||||
-rw-r--r-- | core/js/share/sharedialogshareelistview.handlebars | 2 |
3 files changed, 31 insertions, 15 deletions
diff --git a/core/js/share/sharedialoglinkshareview.handlebars b/core/js/share/sharedialoglinkshareview.handlebars index bc7051683a2..a8a6e795839 100644 --- a/core/js/share/sharedialoglinkshareview.handlebars +++ b/core/js/share/sharedialoglinkshareview.handlebars @@ -1,14 +1,19 @@ {{#if shareAllowed}} <ul id="shareLink" class="shareWithList"> - <li data-share-id="{{cid}}"> - <div class="avatar icon-public-white"></div><span class="username" title="{{linkShareLabel}}">{{linkShareLabel}}</span> - <span class="sharingOptionsGroup"> - <span class="shareOption"> - <span class="icon-loading-small hidden"></span> - <input id="linkCheckbox-{{cid}}" {{#if isLinkShare}}checked="checked"{{/if}} type="checkbox" name="linkCheckbox" class="linkCheckbox permissions checkbox"> - <label for="linkCheckbox-{{cid}}">{{linkShareEnableLabel}}</label> + {{#if nolinkShares}} + <li> + <div class="avatar icon-public-white"></div> + <span class="username">{{newShareLabel}}</span> + <span class="sharingOptionsGroup"> + <span class="icon icon-add new-share" title="{{newShareTitle}}"></span> + <span class="icon icon-loading-small hidden"></span> </span> - {{#if showMenu}} + </li> + {{/if}} + {{#each linkShares}} + <li data-share-id="{{cid}}"> + <div class="avatar icon-public-white"></div><span class="username" title="{{linkShareLabel}}">{{linkShareLabel}}</span> + <span class="sharingOptionsGroup"> <div class="share-menu" tabindex="0"><span class="icon icon-more"></span> {{#if showPending}} {{{pendingPopoverMenu}}} @@ -16,9 +21,9 @@ {{{popoverMenu}}} {{/if}} </div> - {{/if}} - </span> - </li> + </span> + </li> + {{/each}} </ul> {{else}} {{#if noSharingPlaceholder}}<input id="shareWith-{{cid}}" class="shareWithField" type="text" placeholder="{{noSharingPlaceholder}}" disabled="disabled"/>{{/if}} diff --git a/core/js/share/sharedialoglinkshareview_popover_menu.handlebars b/core/js/share/sharedialoglinkshareview_popover_menu.handlebars index baee3aa6630..6f504811be4 100644 --- a/core/js/share/sharedialoglinkshareview_popover_menu.handlebars +++ b/core/js/share/sharedialoglinkshareview_popover_menu.handlebars @@ -6,6 +6,13 @@ <span>{{copyLabel}}</span> </a> </li> + <li> + <a href="#" class="new-share"> + <span class="icon-loading-small hidden"></span> + <span class="icon icon-add"></span> + <span>{{newShareTitle}}</span> + </a> + </li> <li class="hidden linkTextMenu"> <span class="menuitem icon-link-text"> <input id="linkText-{{cid}}" class="linkText" type="text" readonly="readonly" value="{{shareLinkURL}}" /> @@ -70,14 +77,15 @@ <li> <span class="shareOption menuitem"> <input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox" - {{#if hasExpireDate}}checked="checked"{{/if}} {{#if isExpirationEnforced}}disabled="disabled"{{/if}}" /> + {{#if hasExpireDate}}checked="checked"{{/if}} {{#if isExpirationEnforced}}disabled="disabled"{{/if}} /> <label for="expireDate-{{cid}}">{{expireDateLabel}}</label> </span> </li> <li class="{{#unless hasExpireDate}}hidden{{/unless}}"> <span class="menuitem icon-expiredate expirationDateContainer-{{cid}}"> <label for="expirationDatePicker-{{cid}}" class="hidden-visually" value="{{expirationDate}}">{{expirationLabel}}</label> - <input id="expirationDatePicker-{{cid}}" class="datepicker" type="text" placeholder="{{expirationDatePlaceholder}}" value="{{#if hasExpireDate}}{{expireDate}}{{else}}{{defaultExpireDate}}{{/if}}" /> + <input id="expirationDatePicker-{{cid}}" class="datepicker" type="text" placeholder="{{expirationDatePlaceholder}}" + value="{{#if hasExpireDate}}{{expireDate}}{{else}}{{defaultExpireDate}}{{/if}}" data-max-date="{{maxDate}}" /> </span> </li> <li> @@ -88,7 +96,7 @@ <input type="button" class="share-note-delete icon-delete"> </a> </li> - <li class="share-note-form share-note-link hidden"> + <li class="share-note-form share-note-link {{#unless hasNote}}hidden{{/unless}}"> <span class="menuitem icon-note"> <textarea class="share-note">{{shareNote}}</textarea> <input type="submit" class="icon-confirm share-note-submit" value="" id="add-note-{{shareId}}" /> @@ -102,5 +110,8 @@ </a> </li> {{/each}} + <li> + <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span>{{unshareLabel}}</span></a> + </li> </ul> </div> diff --git a/core/js/share/sharedialogshareelistview.handlebars b/core/js/share/sharedialogshareelistview.handlebars index a95949c8157..dc2496daaa8 100644 --- a/core/js/share/sharedialogshareelistview.handlebars +++ b/core/js/share/sharedialogshareelistview.handlebars @@ -15,7 +15,7 @@ </div> </span> </li> - {{/each}} + {{/each}} {{#each linkReshares}} <li data-share-id="{{shareId}}" data-share-type="{{shareType}}"> <div class="avatar" data-username="{{shareInitiator}}"></div> |