Rework a bit on top of bnjbvr's fix for #49.

* Remove the text-decoration due to the use of links
* Make the link element occupy the whole table cell, without padding
* Use `router-link` instead of `a` tag
This commit is contained in:
Lucas Verney 2017-06-26 16:22:13 +02:00
parent aac6b63e0a
commit 210192d09c
1 changed files with 9 additions and 9 deletions

View File

@ -47,8 +47,8 @@
<i class="fa fa-star" aria-hidden="true" :title="capitalize($t('status.followed'))"></i> <i class="fa fa-star" aria-hidden="true" :title="capitalize($t('status.followed'))"></i>
</template> </template>
</td> </td>
<td> <td class="no-padding">
<a class="fill" :href="makeDetailsUrl(flat.id)"> <router-link class="fill" :to="{name: 'details', params: {id: flat.id}}">
<template v-if="!showNotationColumn" v-for="n in range(flat.notation)"> <template v-if="!showNotationColumn" v-for="n in range(flat.notation)">
<i class="fa fa-star" aria-hidden="true" :title="capitalize($t('status.followed'))"></i> <i class="fa fa-star" aria-hidden="true" :title="capitalize($t('status.followed'))"></i>
</template> </template>
@ -64,7 +64,7 @@
<br/> <br/>
<pre>{{ flat.notes }}</pre> <pre>{{ flat.notes }}</pre>
</template> </template>
</a> </router-link>
</td> </td>
<td>{{ flat.area }} </td> <td>{{ flat.area }} </td>
<td> <td>
@ -171,9 +171,6 @@ export default {
this.sortBy = field this.sortBy = field
} }
}, },
makeDetailsUrl(flatId) {
return `/#/flat/${flatId}`;
},
capitalize: capitalize, capitalize: capitalize,
range: range range: range
} }
@ -218,10 +215,13 @@ pre {
word-break: break-all; word-break: break-all;
} }
.no-padding {
padding: 0;
}
.fill { .fill {
display: block; display: block;
width: 100%; padding: 2em;
padding-left: 0; text-decoration: none;
padding-right: 0;
} }
</style> </style>