Highlight active row
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
0b4083e611
commit
916597dff6
|
@ -3,7 +3,7 @@ const app = new Vue({
|
||||||
template: `
|
template: `
|
||||||
<div>
|
<div>
|
||||||
<div id="msg" v-if="error !== ''"> {{ error }}</div>
|
<div id="msg" v-if="error !== ''"> {{ error }}</div>
|
||||||
<table class="ui celled table">
|
<table class="ui celled striped table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
@ -18,7 +18,7 @@ const app = new Vue({
|
||||||
<tr v-if="data.length === 0">
|
<tr v-if="data.length === 0">
|
||||||
<td colspan="5">Laden...</td>
|
<td colspan="5">Laden...</td>
|
||||||
</tr>
|
</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>{{ item.name }}</td>
|
||||||
<td v-if="mode === 0">{{ item.gemeinde }}</td>
|
<td v-if="mode === 0">{{ item.gemeinde }}</td>
|
||||||
<td>{{ item.kcoins }}</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 v-if="mode === 1">{{ (item.coins_quota).toFixed(2) }}</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="ui action input">
|
<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)">
|
<a class="ui right labeled icon button green" @click="updateCoins(item.id)">
|
||||||
<i class="right dollar icon"></i>
|
<i class="right dollar icon"></i>
|
||||||
KonfiCoins Hinzufügen
|
KonfiCoins Hinzufügen
|
||||||
|
@ -58,6 +58,7 @@ const app = new Vue({
|
||||||
addCoins: 0,
|
addCoins: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
formStuff: {},
|
formStuff: {},
|
||||||
|
currentRow: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
beforeMount() {
|
||||||
|
|
Loading…
Reference in New Issue