Highlight active row
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2019-09-14 17:13:51 +02:00
parent 0b4083e611
commit 916597dff6
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@ const app = new Vue({
template: `
<div>
<div id="msg" v-if="error !== ''"> {{ error }}</div>
<table class="ui celled table">
<table class="ui celled striped table">
<thead>
<tr>
<th>Name</th>
@ -18,7 +18,7 @@ const app = new Vue({
<tr v-if="data.length === 0">
<td colspan="5">Laden...</td>
</tr>
<tr v-for="(item, i) in data">
<tr v-for="(item, i) in data" :class="{ active: currentRow === item.id }">
<td>{{ item.name }}</td>
<td v-if="mode === 0">{{ item.gemeinde }}</td>
<td>{{ item.kcoins }}</td>
@ -26,7 +26,7 @@ const app = new Vue({
<td v-if="mode === 1">{{ (item.coins_quota).toFixed(2) }}</td>
<td>
<span class="ui action input">
<input type="number" :tabindex="(i +1)" @keyup.enter="updateCoins(item.id)" autocomplete="off" v-model="formStuff[item.id].addCoins"/>
<input type="number" :tabindex="(i +1)" @focus="currentRow = item.id" @keyup.enter="updateCoins(item.id)" autocomplete="off" v-model="formStuff[item.id].addCoins"/>
<a class="ui right labeled icon button green" @click="updateCoins(item.id)">
<i class="right dollar icon"></i>
KonfiCoins Hinzufügen
@ -58,6 +58,7 @@ const app = new Vue({
addCoins: 0,
loading: false,
formStuff: {},
currentRow: 0,
}
},
beforeMount() {