empty rows class moved to the tr from td
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-11-12 11:33:34 +01:00
parent 62e03f4752
commit 259c192c8b
2 changed files with 6 additions and 6 deletions

View File

@ -312,8 +312,8 @@ export default {
},
itemsIndex: {
createItemButton: `vn-float-button`,
firstSearchResult: 'vn-item-index a:nth-child(1)',
searchResult: 'vn-item-index tbody tr td:not(.empty-rows)',
firstSearchResult: 'vn-item-index tr:nth-child(2)',
searchResult: 'vn-item-index tbody tr:not(.empty-rows)',
firstResultPreviewButton: 'vn-item-index tbody > :nth-child(1) .buttons > [icon="preview"]',
searchResultCloneButton: 'vn-item-index .buttons > [icon="icon-clone"]',
acceptClonationAlertButton: '.vn-confirm.shown [response="accept"]',

View File

@ -122,15 +122,15 @@ export default class SmartTable extends Component {
const tbody = this.element.querySelector('tbody');
if (tbody) {
const noSearch = this.$compile(`
<tr ng-if="!model.data">
<td class="empty-rows" colspan="${columns.length}" translate>Enter a new search</td>
<tr class="empty-rows" ng-if="!model.data">
<td colspan="${columns.length}" translate>Enter a new search</td>
</tr>
`)($scope);
tbody.appendChild(noSearch[0]);
const noRows = this.$compile(`
<tr ng-if="model.data.length == 0">
<td class="empty-rows" colspan="${columns.length}" translate>No data</td>
<tr class="empty-rows" ng-if="model.data.length == 0">
<td colspan="${columns.length}" translate>No data</td>
</tr>
`)($scope);
tbody.appendChild(noRows[0]);