Mercurial > gemma
annotate client/src/components/Contextbox.vue @ 2970:149a8f81f99e unified_import
merge with default
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 05 Apr 2019 10:04:45 +0200 |
parents | 8b32574bed09 cfa0adbfce63 |
children | 7a51fdfead2d |
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"> |
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
3 <Bottlenecks v-if="contextBoxContent === 'bottlenecks'"></Bottlenecks> |
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
4 <Staging v-if="contextBoxContent === 'staging'"></Staging> |
1797
67340ceecc5f
feat: define sections and stretches etd
Thomas Junk <thomas.junk@intevation.de>
parents:
1625
diff
changeset
|
5 <Stretches v-if="contextBoxContent === 'stretches'"></Stretches> |
2399 | 6 <ImportOverview |
7 v-if="contextBoxContent === 'importoverview'" | |
8 ></ImportOverview> | |
2968 | 9 <Stretches v-if="contextBoxContent === 'importconfiguration'"></Stretches> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
10 </div> |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
11 </template> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
12 |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
13 <script> |
1362
ca33ad696594
remove the first empyty lines
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1299
diff
changeset
|
14 /* 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
|
15 * without warranty, see README.md and license for details. |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
16 * |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
17 * SPDX-License-Identifier: AGPL-3.0-or-later |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
18 * License-Filename: LICENSES/AGPL-3.0.txt |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
19 * |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
20 * Copyright (C) 2018 by via donau |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
21 * – Österreichische Wasserstraßen-Gesellschaft mbH |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
22 * Software engineering by Intevation GmbH |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
23 * |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
24 * Author(s): |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
25 * Markus Kottländer <markus.kottlaender@intevation.de> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
26 */ |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
27 import { mapState } from "vuex"; |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
28 |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 export default { |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 name: "contextbox", |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 components: { |
2399 | 32 Bottlenecks: () => import("@/components/Bottlenecks"), |
33 Stretches: () => import("@/components/ImportStretches.vue"), | |
34 ImportOverview: () => | |
2968 | 35 import("@/components/importoverview/ImportOverview.vue"), |
36 ImportConfiguration: () => | |
37 import("@/components/importconfiguration/Import.vue") | |
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() { |
2282
2e40909a975d
clean searchbar when context is changed
Thomas Junk <thomas.junk@intevation.de>
parents:
2154
diff
changeset
|
59 this.$store.commit("application/searchQuery", ""); |
1282
a7dd8a3356fc
fixed contextBox animations
Markus Kottlaender <markus@intevation.de>
parents:
1278
diff
changeset
|
60 this.$store.commit("application/showContextBox", false); |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
61 this.$store.commit( |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
62 "application/showSearchbar", |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
63 this.showSearchbarLastState |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
64 ); |
2329
514193fd0120
refac: improve routing structure. We now have /bottlenecks, /stretches, /review routes
Thomas Junk <thomas.junk@intevation.de>
parents:
2282
diff
changeset
|
65 this.$router.push("/"); |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
66 } |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
67 } |
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 </script> |
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
70 |
1449 | 71 <style lang="scss" scoped> |
72 .contextbox { | |
73 position: relative; | |
74 background-color: #ffffff; | |
75 opacity: $slight-transparent; | |
76 transition: max-width 0.3s, max-height 0.3s; | |
77 overflow: hidden; | |
78 background: #fff; | |
79 } | |
80 .contextbox > div:last-child { | |
2440
999bb511ef67
staging: layout logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2427
diff
changeset
|
81 width: 660px; |
1449 | 82 } |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
83 |
1449 | 84 .contextboxcollapsed { |
85 max-width: 0; | |
86 max-height: 0; | |
87 } | |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
88 |
1449 | 89 .contextboxextended { |
2440
999bb511ef67
staging: layout logs
Thomas Junk <thomas.junk@intevation.de>
parents:
2427
diff
changeset
|
90 max-width: 660px; |
2934
cfa0adbfce63
import_overview: adjust layout height
Thomas Junk <thomas.junk@intevation.de>
parents:
2651
diff
changeset
|
91 max-height: 95vh; |
1449 | 92 } |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
93 |
1449 | 94 .close-contextbox { |
95 position: absolute; | |
96 z-index: 2; | |
97 right: 0; | |
98 top: 7px; | |
99 height: $icon-width; | |
100 width: $icon-height; | |
101 } | |
1276
aec9ed491dad
more cleanup in client/src
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
102 </style> |