Mercurial > gemma
diff client/src/application/Sidebar.vue @ 1204:ddfdf440da24
made searchbar contextual
if bottlenecks are open search bar refers to that list
if imports are open search bar is hidden
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 19 Nov 2018 11:23:00 +0100 |
parents | 1d4801145a2d |
children | 70116d392387 |
line wrap: on
line diff
--- a/client/src/application/Sidebar.vue Mon Nov 19 09:09:27 2018 +0100 +++ b/client/src/application/Sidebar.vue Mon Nov 19 11:23:00 2018 +0100 @@ -15,7 +15,7 @@ class="text-body d-flex flex-row nav-link" v-if="routeName == 'mainview'" href="#" - @click="$store.commit('application/showBottlenecks', !showBottlenecks);" + @click="toggleBottlenecks" >Bottlenecks</a> <div v-if="isSysAdmin"> <hr> @@ -30,7 +30,7 @@ <a href="#" class="text-body" - @click="$store.commit('application/showImportSoundingResults', !showImportSoundingResults);" + @click="toggleImportSoundingResults" >Import soundingresults</a> </div> <!-- <router-link class="text-body d-flex flex-row nav-link" to="imports"> @@ -115,6 +115,18 @@ this.$store.commit("application/showUsermenu", false); this.$store.commit("application/showSplitscreen", false); this.$router.push("/login"); + }, + toggleBottlenecks() { + this.$store.commit("application/showBottlenecks", !this.showBottlenecks); + this.$store.commit("application/showImportSoundingResults", false); + this.$store.commit("application/showSearchbar", this.showBottlenecks); + }, + toggleImportSoundingResults() { + this.$store.commit( + "application/showImportSoundingResults", + !this.showImportSoundingResults + ); + this.$store.commit("application/showBottlenecks", false); } } };