Mercurial > gemma
changeset 1207:70116d392387
close bottleneck list: made searchbar collapse only if it was collapsed before
opening the bottleneck list will expand the searchbar, closing the bottleneck list
was always collapsing the searchbar too. Now it stays open if it was open beforeopening the bottleneck list
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 19 Nov 2018 13:02:48 +0100 |
parents | 0900b341cef0 |
children | 8df4ebbc5c3f |
files | client/src/application/Search.vue client/src/application/Sidebar.vue client/src/bottlenecks/Bottlenecks.vue client/src/store/application.js |
diffstat | 4 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/application/Search.vue Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/application/Search.vue Mon Nov 19 13:02:48 2018 +0100 @@ -29,7 +29,7 @@ height: $icon-height .searchbar-expanded - min-width: 568px + min-width: 600px .searchbar border-top-left-radius: 0 !important border-bottom-left-radius: 0 !important
--- a/client/src/application/Sidebar.vue Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/application/Sidebar.vue Mon Nov 19 13:02:48 2018 +0100 @@ -89,7 +89,8 @@ ...mapState("application", [ "showSidebar", "showBottlenecks", - "showImportSoundingResults" + "showImportSoundingResults", + "showSearchbarLastState" ]), menuStyle() { return { @@ -119,7 +120,11 @@ toggleBottlenecks() { this.$store.commit("application/showBottlenecks", !this.showBottlenecks); this.$store.commit("application/showImportSoundingResults", false); - this.$store.commit("application/showSearchbar", this.showBottlenecks); + if (this.showBottlenecks) { + this.$store.commit("application/showSearchbar", true); + } else { + this.$store.commit("application/showSearchbar", this.showSearchbarLastState); + } }, toggleImportSoundingResults() { this.$store.commit(
--- a/client/src/bottlenecks/Bottlenecks.vue Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/bottlenecks/Bottlenecks.vue Mon Nov 19 13:02:48 2018 +0100 @@ -82,7 +82,8 @@ ...mapState("application", [ "showBottlenecks", "showSidebar", - "searchQuery" + "searchQuery", + "showSearchbarLastState" ]), ...mapState("bottlenecks", ["bottlenecks"]), ...mapState("map", ["openLayersMap"]), @@ -198,7 +199,7 @@ }, closeBottlenecks() { this.$store.commit("application/showBottlenecks", false); - this.$store.commit("application/showSearchbar", false); + this.$store.commit("application/showSearchbar", this.showSearchbarLastState); }, displayCurrentSurvey(current) { return current ? current.substr(0, current.length - 1) : "";
--- a/client/src/store/application.js Mon Nov 19 12:48:33 2018 +0100 +++ b/client/src/store/application.js Mon Nov 19 13:02:48 2018 +0100 @@ -26,6 +26,7 @@ showBottlenecks: false, showSplitscreen: false, showSearchbar: false, + showSearchbarLastState: false, showIdentify: false, showLayers: true, showPdfTool: false, @@ -57,6 +58,9 @@ }, showBottlenecks: (state, show) => { state.showBottlenecks = show; + if (show) { + state.showSearchbarLastState = state.showSearchbar; + } }, showSplitscreen: (state, show) => { state.showSplitscreen = show;