Mercurial > gemma
annotate client/src/components/ui/UIBoxHeader.vue @ 3678:8f58851927c0
client: make layer factory only return new layer config for individual maps
instead of each time it is invoked. The purpose of the factory was to support multiple maps with individual layers.
But returning a new config each time it is invoked leads to bugs that rely on the layer's state. Now this factory
reuses the same objects it created before, per map.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 17 Jun 2019 17:31:35 +0200 |
parents | c36940e53788 |
children | 36cbf14b878a |
rev | line source |
---|---|
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 <template> |
3188
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
2 <h6 :class="['box-header', { small }]"> |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
3 <span class="box-title"> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
4 <font-awesome-icon |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
5 :icon="icon" |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
6 class="box-icon" |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
7 v-if="icon" |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
8 fixed-width |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
9 /> |
2754
d0f6c222f4f9
client:correct a set of strings marking
Fadi Abbud <fadi.abbud@intevation.de>
parents:
2631
diff
changeset
|
10 {{ title }} |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
11 </span> |
3026
619f03a0062a
client: adjusted box control's style
Markus Kottlaender <markus@intevation.de>
parents:
2897
diff
changeset
|
12 <div class="d-flex flex-row"> |
2631
7a0e468d3832
client: ui: allow additional (custom) actions/buttons in box header
Markus Kottlaender <markus@intevation.de>
parents:
2629
diff
changeset
|
13 <span |
2837
61aacfd02812
client: added collapsible legend component for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2754
diff
changeset
|
14 class="box-control" |
2631
7a0e468d3832
client: ui: allow additional (custom) actions/buttons in box header
Markus Kottlaender <markus@intevation.de>
parents:
2629
diff
changeset
|
15 v-for="(action, index) in actions" |
7a0e468d3832
client: ui: allow additional (custom) actions/buttons in box header
Markus Kottlaender <markus@intevation.de>
parents:
2629
diff
changeset
|
16 :key="index" |
7a0e468d3832
client: ui: allow additional (custom) actions/buttons in box header
Markus Kottlaender <markus@intevation.de>
parents:
2629
diff
changeset
|
17 @click="action.callback" |
7a0e468d3832
client: ui: allow additional (custom) actions/buttons in box header
Markus Kottlaender <markus@intevation.de>
parents:
2629
diff
changeset
|
18 > |
3177
fc008b32c593
client: layers: loading animation for refreshing layer sources
Markus Kottlaender <markus@intevation.de>
parents:
3026
diff
changeset
|
19 <font-awesome-icon |
fc008b32c593
client: layers: loading animation for refreshing layer sources
Markus Kottlaender <markus@intevation.de>
parents:
3026
diff
changeset
|
20 :icon="action.icon" |
fc008b32c593
client: layers: loading animation for refreshing layer sources
Markus Kottlaender <markus@intevation.de>
parents:
3026
diff
changeset
|
21 :spin="action.icon === 'spinner'" |
fc008b32c593
client: layers: loading animation for refreshing layer sources
Markus Kottlaender <markus@intevation.de>
parents:
3026
diff
changeset
|
22 /> |
2631
7a0e468d3832
client: ui: allow additional (custom) actions/buttons in box header
Markus Kottlaender <markus@intevation.de>
parents:
2629
diff
changeset
|
23 </span> |
2837
61aacfd02812
client: added collapsible legend component for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2754
diff
changeset
|
24 <span class="box-control" @click="closeCallback" v-if="closeCallback"> |
2549
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2408
diff
changeset
|
25 <font-awesome-icon icon="times" /> |
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2408
diff
changeset
|
26 </span> |
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2408
diff
changeset
|
27 </div> |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
28 </h6> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 </template> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 <style lang="sass"> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
32 .box-header |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
33 display: flex |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 justify-content: space-between |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 align-items: center |
2549
9bf6b767a56a
client: refactored and improved splitscreen for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2408
diff
changeset
|
36 min-height: 34px |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
37 padding-left: .5rem |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 border-bottom: 1px solid #dee2e6 |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 color: $color-info |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
40 margin-bottom: 0 |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
41 padding: 0.25rem |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
42 font-weight: bold |
2566
83b938bf4da9
client: prepared store and minimized splitscreens for multiple simultaneous diagrams
Markus Kottlaender <markus@intevation.de>
parents:
2549
diff
changeset
|
43 background: white |
2629
85927d27c84e
client: box header: rounded corners style fix
Markus Kottlaender <markus@intevation.de>
parents:
2566
diff
changeset
|
44 border-top-left-radius: .25rem |
85927d27c84e
client: box header: rounded corners style fix
Markus Kottlaender <markus@intevation.de>
parents:
2566
diff
changeset
|
45 border-top-right-radius: .25rem |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
46 .box-title |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
47 padding-left: 0.25rem |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
48 .box-icon |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
49 margin-right: 0.25rem |
2897
b7cfbb21f252
client: removed margin from box controls, add margins individually where needed
Markus Kottlaender <markus@intevation.de>
parents:
2837
diff
changeset
|
50 .box-control |
b7cfbb21f252
client: removed margin from box controls, add margins individually where needed
Markus Kottlaender <markus@intevation.de>
parents:
2837
diff
changeset
|
51 margin-left: 3px |
3188
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
52 &.small |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
53 padding: 0.1rem 0.1rem 0.1rem 0.25rem |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
54 min-height: 27px |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
55 </style> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
56 |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
57 <script> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
58 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
59 * without warranty, see README.md and license for details. |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
60 * |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
61 * SPDX-License-Identifier: AGPL-3.0-or-later |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
62 * License-Filename: LICENSES/AGPL-3.0.txt |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
63 * |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
64 * Copyright (C) 2018 by via donau |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
65 * – Österreichische Wasserstraßen-Gesellschaft mbH |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
66 * Software engineering by Intevation GmbH |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
67 * |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
68 * Author(s): |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
69 * Markus Kottländer <markus.kottlaender@intevation.de> |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
70 */ |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
71 |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
72 export default { |
3188
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
73 props: { |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
74 icon: String, |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
75 title: String, |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
76 closeCallback: Function, |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
77 actions: Array, |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
78 small: Boolean |
c36940e53788
client: ui box header: removed old unused functionality and added support for smaller fontsize and padding
Markus Kottlaender <markus@intevation.de>
parents:
3177
diff
changeset
|
79 } |
2408
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
80 }; |
02d30251d594
client: table component for unified style
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
81 </script> |