add 'select all stations' toggle
This commit is contained in:
@ -8,6 +8,10 @@
|
|||||||
<div style="padding-bottom: 7px;" id="dropMenu" class="dropdown-menu" aria-labelledby="dropdownMenuButton1" v-on:click.stop="handleClick">
|
<div style="padding-bottom: 7px;" id="dropMenu" class="dropdown-menu" aria-labelledby="dropdownMenuButton1" v-on:click.stop="handleClick">
|
||||||
<div id="prefHeader">STATIONS</div>
|
<div id="prefHeader">STATIONS</div>
|
||||||
<div class="container-fluid" @change="decideShowStations();">
|
<div class="container-fluid" @change="decideShowStations();">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<input @change="selectAllStations();" class="form-check-input" type="checkbox" role="switch" id="showAllStations" v-model="showAllStations"/>
|
||||||
|
<label class="form-check-label" for="showAllStations">Select All Stations</label>
|
||||||
|
</div>
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" role="switch" id="showMainlandStations" v-model="showMainlandStations"/>
|
<input class="form-check-input" type="checkbox" role="switch" id="showMainlandStations" v-model="showMainlandStations"/>
|
||||||
<label class="form-check-label" for="showMainlandStations">Mainline Stations</label>
|
<label class="form-check-label" for="showMainlandStations">Mainline Stations</label>
|
||||||
@ -157,6 +161,7 @@ export default {
|
|||||||
toast,
|
toast,
|
||||||
loader,
|
loader,
|
||||||
|
|
||||||
|
showAllStations: true,
|
||||||
showMainlandStations: true,
|
showMainlandStations: true,
|
||||||
showDARTStations: true,
|
showDARTStations: true,
|
||||||
showLate: true,
|
showLate: true,
|
||||||
@ -289,6 +294,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// method to select all stations
|
||||||
|
selectAllStations() {
|
||||||
|
this.showDARTStations = this.showAllStations;
|
||||||
|
this.showMainlandStations = this.showAllStations;
|
||||||
|
},
|
||||||
|
|
||||||
// method to display a selected train
|
// method to display a selected train
|
||||||
getSelectedTrain(i) {
|
getSelectedTrain(i) {
|
||||||
store.setSelectedTrain(this.allTrains[i]);
|
store.setSelectedTrain(this.allTrains[i]);
|
||||||
|
Reference in New Issue
Block a user