| 
8 | 8 |         <div class="columns" id="modal-buttons">  | 
9 | 9 |             <div class="column top-bottom-paddingless">  | 
10 | 10 |                 <button id="cc_license_btn" class="button is-light is-large is-fullwidth help-button"  | 
11 |  | -                    @click="isModal1Active = true">  | 
 | 11 | +                        @click="clickHandler(1)">  | 
12 | 12 |                     <p>  | 
13 | 13 |                         {{ $t('help.what_are_cc_licenses.heading') }}  | 
14 | 14 |                     </p>  | 
15 | 15 |                 </button>  | 
16 | 16 |                 <button id="license_work_btn" class="button is-light is-large is-fullwidth help-button"  | 
17 |  | -                    @click="isModal2Active = true">  | 
 | 17 | +                    @click="clickHandler(2)">  | 
18 | 18 |                     <p>  | 
19 | 19 |                         {{ $t('help.how_licenses_work.heading') }}  | 
20 | 20 |                     </p>  | 
21 | 21 |                 </button>  | 
22 | 22 |                 <button id="icons_meaning_btn" class="button is-light is-large is-fullwidth help-button"  | 
23 |  | -                    @click="isModal3Active = true">  | 
 | 23 | +                    @click="clickHandler(3)">  | 
24 | 24 |                     <p>  | 
25 | 25 |                         {{ $t('help.what_icons_mean.heading') }}  | 
26 | 26 |                     </p>  | 
27 | 27 |                 </button>  | 
28 | 28 |                 <button id="license_communication_btn" class="button is-light is-large is-fullwidth help-button"  | 
29 |  | -                    @click="isModal7Active = true">  | 
 | 29 | +                    @click="clickHandler(7)">  | 
30 | 30 |                     <p>  | 
31 | 31 |                         {{ $t('help.how_licenses_communicated.heading') }}  | 
32 | 32 |                     </p>  | 
33 | 33 |                 </button>  | 
34 | 34 |             </div>  | 
35 | 35 |             <div class="column top-bottom-paddingless">  | 
36 | 36 |                 <button id="consideration_btn" class="button is-light is-large is-fullwidth help-button"  | 
37 |  | -                    @click="isModal4Active = true">  | 
 | 37 | +                    @click="clickHandler(4)">  | 
38 | 38 |                     <p>  | 
39 | 39 |                         {{ $t('help.considerations_before_licensing.heading') }}  | 
40 | 40 |                     </p>  | 
41 | 41 |                 </button>  | 
42 | 42 |                 <button id="formal_license_btn" class="button is-light is-large is-fullwidth help-button"  | 
43 |  | -                    @click="isModal5Active = true">  | 
 | 43 | +                    @click="clickHandler(5)">  | 
44 | 44 |                     <p>  | 
45 | 45 |                         {{ $t('help.how_formally_license.heading') }}  | 
46 | 46 |                     </p>  | 
47 | 47 |                 </button>  | 
48 | 48 |                 <button id="license_description_btn" class="button is-light is-large is-fullwidth help-button"  | 
49 |  | -                    @click="isModal6Active = true">  | 
 | 49 | +                    @click="clickHandler(6)">  | 
50 | 50 |                     <p>  | 
51 | 51 |                         {{ $t('help.six_cc_licenses.heading') }}  | 
52 | 52 |                     </p>  | 
53 | 53 |                 </button>  | 
54 | 54 |             </div>  | 
55 | 55 |         </div>  | 
56 | 56 | 
 
  | 
57 |  | -        <b-modal :active.sync="isModal1Active">  | 
 | 57 | +        <b-modal :active.sync="modals[1].status">  | 
58 | 58 |             <header class="modal-card-head">  | 
59 | 59 |                 <p class="modal-card-title modal-title" v-html="this.$t('help.what_are_cc_licenses.heading')"/>  | 
60 | 60 |             </header>  | 
 | 
65 | 65 |                 </footer>  | 
66 | 66 |             </section>  | 
67 | 67 |         </b-modal>  | 
68 |  | -        <b-modal :active.sync="isModal2Active">  | 
 | 68 | +        <b-modal :active.sync="modals[2].status">  | 
69 | 69 |             <header class="modal-card-head">  | 
70 | 70 |                 <p class="modal-card-title modal-title">  | 
71 | 71 |                     {{ $t('help.how_licenses_work.heading') }}  | 
 | 
76 | 76 |                 <footer class="modal-card-foot" v-html="this.$t('help.how_licenses_work.footer')"/>  | 
77 | 77 |             </section>  | 
78 | 78 |         </b-modal>  | 
79 |  | -        <b-modal :active.sync="isModal3Active">  | 
 | 79 | +        <b-modal :active.sync="modals[3].status">  | 
80 | 80 |             <header class="modal-card-head">  | 
81 | 81 |                 <p class="modal-card-title modal-title">  | 
82 | 82 |                     {{ $t('help.what_icons_mean.heading') }}  | 
 | 
141 | 141 |                 </footer>  | 
142 | 142 |             </section>  | 
143 | 143 |         </b-modal>  | 
144 |  | -        <b-modal :active.sync="isModal4Active">  | 
 | 144 | +        <b-modal :active.sync="modals[4].status">  | 
145 | 145 |             <header class="modal-card-head">  | 
146 | 146 |                 <p class="modal-card-title modal-title">  | 
147 | 147 |                     {{ $t('help.considerations_before_licensing.heading') }}  | 
 | 
154 | 154 |                 </footer>  | 
155 | 155 |             </section>  | 
156 | 156 |         </b-modal>  | 
157 |  | -        <b-modal :active.sync="isModal5Active">  | 
 | 157 | +        <b-modal :active.sync="modals[5].status">  | 
158 | 158 |             <header class="modal-card-head">  | 
159 | 159 |                 <p class="modal-card-title modal-title">  | 
160 | 160 |                     {{ $t('help.how_formally_license.heading') }}  | 
 | 
164 | 164 |                 <article v-html="this.$t('help.how_formally_license.text')"/>  | 
165 | 165 |             </section>  | 
166 | 166 |         </b-modal>  | 
167 |  | -        <b-modal :active.sync="isModal6Active">  | 
 | 167 | +        <b-modal :active.sync="modals[6].status">  | 
168 | 168 |             <header class="modal-card-head">  | 
169 | 169 |                 <p class="modal-card-title modal-title">  | 
170 | 170 |                     {{ $t('help.six_cc_licenses.heading') }}  | 
 | 
187 | 187 |                 </footer>  | 
188 | 188 |             </section>  | 
189 | 189 |         </b-modal>  | 
190 |  | -        <b-modal :active.sync="isModal7Active">  | 
 | 190 | +        <b-modal :active.sync="modals[7].status">  | 
191 | 191 |             <header class="modal-card-head">  | 
192 | 192 |                 <p class="modal-card-title modal-title">{{ $t('help.how_licenses_communicated.heading') }}  | 
193 | 193 |                 </p>  | 
@@ -242,13 +242,46 @@ export default {  | 
242 | 242 |     data() {  | 
243 | 243 |         return {  | 
244 | 244 |             sixLicensesImg: '<img src="../assets/license-openness-scale.png">',  | 
245 |  | -            isModal1Active: false,  | 
246 |  | -            isModal2Active: false,  | 
247 |  | -            isModal3Active: false,  | 
248 |  | -            isModal4Active: false,  | 
249 |  | -            isModal5Active: false,  | 
250 |  | -            isModal6Active: false,  | 
251 |  | -            isModal7Active: false  | 
 | 245 | +            modals: {  | 
 | 246 | +                1: {  | 
 | 247 | +                    status: false,  | 
 | 248 | +                    title: 'what_are_cc_licenses'  | 
 | 249 | +                },  | 
 | 250 | +                2: {  | 
 | 251 | +                    status: false,  | 
 | 252 | +                    title: 'how_licenses_work'  | 
 | 253 | +                },  | 
 | 254 | +                3: {  | 
 | 255 | +                    status: false,  | 
 | 256 | +                    title: 'what_icons_mean'  | 
 | 257 | +                },  | 
 | 258 | +                4: {  | 
 | 259 | +                    status: false,  | 
 | 260 | +                    title: 'considerations_before_licensing'  | 
 | 261 | +                },  | 
 | 262 | +                5: {  | 
 | 263 | +                    status: false,  | 
 | 264 | +                    title: 'how_formally_license'  | 
 | 265 | +                },  | 
 | 266 | +                6: {  | 
 | 267 | +                    status: false,  | 
 | 268 | +                    title: 'six_cc_licenses'  | 
 | 269 | +                },  | 
 | 270 | +                7: {  | 
 | 271 | +                    status: false,  | 
 | 272 | +                    title: 'how_licenses_communicated'  | 
 | 273 | +                }  | 
 | 274 | +            }  | 
 | 275 | +        }  | 
 | 276 | +    },  | 
 | 277 | +    methods: {  | 
 | 278 | +        clickHandler(modalNumber) {  | 
 | 279 | +            this.modals[modalNumber].status = true  | 
 | 280 | +            this.$ga.event({  | 
 | 281 | +                eventCategory: 'HelpSection',  | 
 | 282 | +                eventAction: 'clicked',  | 
 | 283 | +                eventLabel: this.modals[modalNumber].title  | 
 | 284 | +            })  | 
252 | 285 |         }  | 
253 | 286 |     }  | 
254 | 287 | }  | 
 | 
0 commit comments