|
1 |
| -<th:block th:fragment="modal(componentId, title, closeLabel, srcUrl, width, height, iframe_attrs, section_attrs, modal_attrs)" |
| 1 | +<th:block th:fragment="modal(componentId, title, closeLabel, srcUrl, width, height, autoHeight, iframe_attrs, section_attrs, modal_attrs)" |
2 | 2 | th:assert="${componentId} != null"
|
3 |
| - th:attr=" objectKey=${model.vContext['componentStates'].addComponentState(componentId).addPrimitive('opened', false)}, |
4 |
| - objectKey=${model.vContext['componentStates']['__${componentId}__'].addPrimitive('title', title?:'')}, |
5 |
| - objectKey=${model.vContext['componentStates']['__${componentId}__'].addPrimitive('srcUrl', srcUrl?:'')}" > |
| 3 | + th:attr=" objectKey=${model.vContext['componentStates'].addComponentState(componentId) |
| 4 | + .addPrimitive('opened', false) |
| 5 | + .addPrimitive('loading', true) |
| 6 | + .addPrimitive('title', title?:'') |
| 7 | + .addPrimitive('srcUrl', srcUrl?:'') |
| 8 | + .addPrimitive('width', width?:'') |
| 9 | + .addPrimitive('height', height?:'')}" > |
6 | 10 | <q-dialog th:v-model="|componentStates.${componentId}.opened|" th:attr="__${modal_attrs}__">
|
7 | 11 | <vu:content>
|
8 | 12 | <q-card class="bg-white v-modal">
|
9 | 13 | <q-toolbar class="bg-primary" th:if="${title != null}">
|
10 | 14 | <vu:button flat dense v-close-popup icon="keyboard_arrow_left" color="primary" textColor="white" th:title="#{layout.modal.close}" />
|
11 | 15 | <q-toolbar-title class="text-white">{{ componentStates.[[${componentId}]].title }}</q-toolbar-title>
|
12 | 16 | </q-toolbar>
|
13 |
| - <q-card-section class="q-pa-none" th:style="|width:${width?:'560px'};height:${height?:'420px'}" th:attr="__${section_attrs}__"> |
14 |
| - <iframe th:v-bind:src="|componentStates.${componentId}.srcUrl|" th:attr="__${iframe_attrs}__" ></iframe> |
| 17 | + <q-card-section class="q-pa-none" th::style="|{width:componentStates.${componentId}.width, height:componentStates.${componentId}.height}|" th:attr="__${section_attrs}__"> |
| 18 | + <div class="loading absolute-center" th:v-if="|componentStates.${componentId}.loading|"><q-spinner-tail size="xl"></q-spinner-tail></div> |
| 19 | + <iframe th:v-bind:src="|componentStates.${componentId}.srcUrl|" |
| 20 | + th:attr="__${iframe_attrs}__" |
| 21 | + th:style="${autoHeight == true ? 'height:100px; opacity:0':''}" |
| 22 | + th:@vue:before-mount="|componentStates.${componentId}.loading=true; componentStates.${componentId}.height='${height?:''}';|" |
| 23 | + onload="VUiPage.modal_iframeLoad(this)" |
| 24 | + th:data-auto-height="${autoHeight}" |
| 25 | + th:data-component-id="${componentId}"></iframe> |
15 | 26 | </q-card-section>
|
16 | 27 | <q-toolbar th:if="${closeLabel} != null" class="bg-primary" >
|
17 | 28 | <q-btn flat v-close-popup th:label="${closeLabel}" text-color="white" ></q-btn>
|
|
0 commit comments