Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  HashtagsInput: Add a constructor allowing to initialize remove member
  Fix gr-identities styles

Change-Id: I5d44bbde7b44ae6e4c5969ca40c428d2cf8acbf0
This commit is contained in:
David Pursehouse
2019-07-31 09:01:50 +09:00
2 changed files with 47 additions and 32 deletions

View File

@@ -26,4 +26,9 @@ public class HashtagsInput {
public HashtagsInput(Set<String> add) { public HashtagsInput(Set<String> add) {
this.add = add; this.add = add;
} }
public HashtagsInput(Set<String> add, Set<String> remove) {
this(add);
this.remove = remove;
}
} }

View File

@@ -27,8 +27,20 @@ limitations under the License.
<template> <template>
<style include="shared-styles"></style> <style include="shared-styles"></style>
<style include="gr-form-styles"> <style include="gr-form-styles">
td { tr th.emailAddressHeader,
width: 5em; tr th.identityHeader {
width: 15em;
padding: 0 10px;
}
tr td.statusColumn,
tr td.emailAddressColumn,
tr td.identityColumn {
word-break: break-word;
}
tr td.emailAddressColumn,
tr td.identityColumn {
padding: 4px 10px;
width: 15em;
} }
.deleteButton { .deleteButton {
float: right; float: right;
@@ -36,40 +48,38 @@ limitations under the License.
.deleteButton:not(.show) { .deleteButton:not(.show) {
display: none; display: none;
} }
.statusColumn {
white-space: nowrap;
}
</style> </style>
<div class="gr-form-styles"> <div class="gr-form-styles">
<table id="identities"> <fieldset>
<thead> <table>
<tr> <thead>
<th class="statusHeader">Status</th>
<th class="emailAddressHeader">Email Address</th>
<th class="identityHeader">Identity</th>
<th class="deleteHeader"></th>
</tr>
</thead>
<tbody>
<template is="dom-repeat" items="[[_identities]]" filter="filterIdentities">
<tr> <tr>
<td class$="statusColumn"> <th class="statusHeader">Status</th>
[[_computeIsTrusted(item.trusted)]] <th class="emailAddressHeader">Email Address</th>
</td> <th class="identityHeader">Identity</th>
<td>[[item.email_address]]</td> <th class="deleteHeader"></th>
<td>[[_computeIdentity(item.identity)]]</td>
<td>
<gr-button
link
class$="deleteButton [[_computeHideDeleteClass(item.can_delete)]]"
on-tap="_handleDeleteItem">
Delete
</gr-button>
</td>
</tr> </tr>
</template> </thead>
</tbody> <tbody>
</table> <template is="dom-repeat" items="[[_identities]]" filter="filterIdentities">
<tr>
<td class="statusColumn">
[[_computeIsTrusted(item.trusted)]]
</td>
<td class="emailAddressColumn">[[item.email_address]]</td>
<td class="identityColumn">[[_computeIdentity(item.identity)]]</td>
<td class="deleteColumn">
<gr-button
class$="deleteButton [[_computeHideDeleteClass(item.can_delete)]]"
on-tap="_handleDeleteItem">
Delete
</gr-button>
</td>
</tr>
</template>
</tbody>
</table>
</fieldset>
</div> </div>
<gr-overlay id="overlay" with-backdrop> <gr-overlay id="overlay" with-backdrop>
<gr-confirm-delete-item-dialog <gr-confirm-delete-item-dialog