Mercurial > gemma
annotate client/src/components/Contextbox.vue @ 4837:3b0ec9b56d7c
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Fri, 08 Nov 2019 13:10:56 +0100 |
parents | 1fd771b08ced |
children | 9f0830a1845d |
rev | line source |
---|---|
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 <template> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
2 <div :class="style"> |
3708
daabb540a204
context_box: move bottlenecks and importoverview out of keep-alive-zone
Thomas Junk <thomas.junk@intevation.de>
parents:
3696
diff
changeset
|
3 <Bottlenecks v-if="contextBoxContent === 'bottlenecks'" /> |
3696
982816fca381
client: keep components in contextboxx alive
Markus Kottlaender <markus@intevation.de>
parents:
3298
diff
changeset
|
4 <keep-alive> |
982816fca381
client: keep components in contextboxx alive
Markus Kottlaender <markus@intevation.de>
parents:
3298
diff
changeset
|
5 <Staging v-if="contextBoxContent === 'staging'" /> |
982816fca381
client: keep components in contextboxx alive
Markus Kottlaender <markus@intevation.de>
parents:
3298
diff
changeset
|
6 <Stretches v-if="contextBoxContent === 'stretches'" /> |
982816fca381
client: keep components in contextboxx alive
Markus Kottlaender <markus@intevation.de>
parents:
3298
diff
changeset
|
7 <Sections v-if="contextBoxContent === 'sections'" /> |
982816fca381
client: keep components in contextboxx alive
Markus Kottlaender <markus@intevation.de>
parents:
3298
diff
changeset
|
8 <ImportConfiguration v-if="contextBoxContent === 'importconfiguration'" /> |
982816fca381
client: keep components in contextboxx alive
Markus Kottlaender <markus@intevation.de>
parents:
3298
diff
changeset
|
9 </keep-alive> |
3708
daabb540a204
context_box: move bottlenecks and importoverview out of keep-alive-zone
Thomas Junk <thomas.junk@intevation.de>
parents:
3696
diff
changeset
|
10 <ImportOverview v-if="contextBoxContent === 'importoverview'" /> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
11 </div> |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
12 </template> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
13 |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
14 <script> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
15 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
16 * without warranty, see README.md and license for details. |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
17 * |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
18 * SPDX-License-Identifier: AGPL-3.0-or-later |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
19 * License-Filename: LICENSES/AGPL-3.0.txt |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
20 * |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
21 * Copyright (C) 2018 by via donau |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
22 * – Österreichische Wasserstraßen-Gesellschaft mbH |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
23 * Software engineering by Intevation GmbH |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
24 * |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
25 * Author(s): |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
26 * Markus Kottländer <markus.kottlaender@intevation.de> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
27 */ |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
28 import { mapState } from "vuex"; |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 export default { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 name: "contextbox", |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
32 components: { |
2399 | 33 Bottlenecks: () => import("@/components/Bottlenecks"), |
3263
d23532a4d0c3
client: define stretches: renamed component file and moved to subdirectory
Markus Kottlaender <markus@intevation.de>
parents:
3262
diff
changeset
|
34 Stretches: () => import("@/components/stretches/Stretches"), |
3298
ec27ee21f7bc
client: define sections: added route and support in context box
Markus Kottlaender <markus@intevation.de>
parents:
3263
diff
changeset
|
35 Sections: () => import("@/components/sections/Sections"), |
2985
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2972
diff
changeset
|
36 ImportOverview: () => import("@/components/importoverview/ImportOverview"), |
1b8bb4f89227
client: removed .js and .vue extention from imports
Markus Kottlaender <markus@intevation.de>
parents:
2972
diff
changeset
|
37 ImportConfiguration: () => import("@/components/importconfiguration/Import") |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 }, |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 computed: { |
1282
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
40 ...mapState("application", [ |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
41 "showSearchbarLastState", |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
42 "contextBoxContent", |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
43 "showContextBox" |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
44 ]), |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
45 style() { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
46 return [ |
1282
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
47 "ui-element shadow-xs contextbox", |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
48 { |
1282
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
49 contextboxcollapsed: !this.showContextBox, |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
50 contextboxextended: this.showContextBox, |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
51 "rounded-bottom": this.contextBoxContent !== "imports", |
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
52 rounded: this.contextBoxContent === "imports" |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
53 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
54 ]; |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
55 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
56 }, |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
57 methods: { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
58 close() { |
3261
916d4c898f08
client: import stretches: prevent map/identify popup from opening when selecting a distance mark on the map
Markus Kottlaender <markus@intevation.de>
parents:
3012
diff
changeset
|
59 this.$store.commit("map/mapPopupEnabled", true); |
2282
2e40909a975d
clean searchbar when context is changed
Thomas Junk <thomas.junk@intevation.de>
parents:
2154
diff
changeset
|
60 this.$store.commit("application/searchQuery", ""); |
1282
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
61 this.$store.commit("application/showContextBox", false); |
4374
ad2bf9580696
importoverview: review of fairwaydimensions improved
Thomas Junk <thomas.junk@intevation.de>
parents:
3708
diff
changeset
|
62 this.$store.commit("map/reviewActive", false); |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
63 this.$store.commit( |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
64 "application/showSearchbar", |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
65 this.showSearchbarLastState |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
66 ); |
2329
514193fd0120
refac: improve routing structure. We now have /bottlenecks, /stretches, /review routes
Thomas Junk <thomas.junk@intevation.de>
parents:
2282
diff
changeset
|
67 this.$router.push("/"); |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
68 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
70 }; |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
71 </script> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
72 |
1449 | 73 <style lang="scss" scoped> |
74 .contextbox { | |
75 position: relative; | |
76 background-color: #ffffff; | |
77 opacity: $slight-transparent; | |
78 transition: max-width 0.3s, max-height 0.3s; | |
79 overflow: hidden; | |
80 background: #fff; | |
81 } | |
82 .contextbox > div:last-child { | |
4774
1fd771b08ced
import_overview: added 'changed' column
Thomas Junk <thomas.junk@intevation.de>
parents:
4374
diff
changeset
|
83 width: 795px; |
1449 | 84 } |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
85 |
1449 | 86 .contextboxcollapsed { |
87 max-width: 0; | |
88 max-height: 0; | |
89 } | |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
90 |
1449 | 91 .contextboxextended { |
4774
1fd771b08ced
import_overview: added 'changed' column
Thomas Junk <thomas.junk@intevation.de>
parents:
4374
diff
changeset
|
92 max-width: 795px; |
1449 | 93 } |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
94 |
1449 | 95 .close-contextbox { |
96 position: absolute; | |
97 z-index: 2; | |
98 right: 0; | |
99 top: 7px; | |
100 height: $icon-width; | |
101 width: $icon-height; | |
102 } | |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
103 </style> |