removed test page
This commit is contained in:
parent
1a8adae934
commit
a28e1dc578
1 changed files with 0 additions and 110 deletions
|
|
@ -1,110 +0,0 @@
|
|||
<template>
|
||||
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }" >
|
||||
|
||||
<div class="page-container-grouped-styles welcome">
|
||||
<siteHeader cmsWidgetName="SiteHeaderWidget"/>
|
||||
<div class="fade-on-route-transition overflow-scroll container">
|
||||
|
||||
<div class="row mt-4 position-sticky top-100">
|
||||
<div class="col">
|
||||
<p @click='() => openModal("TestModal")' class="small">
|
||||
here
|
||||
</p>
|
||||
<p @click='() => openModal("ModalName")'>
|
||||
here
|
||||
</p>
|
||||
|
||||
<a modalTarget="ModalName" class="modal-text" href="#!" aria-label="Modal window">Wow!!</a>
|
||||
<siteFooter
|
||||
cmsWidgetName="SiteFooterWidget"
|
||||
:isForwardActionDisabled="!meta.valid"
|
||||
@back-clicked="backButtonAction"
|
||||
@ForwardClicked="forwardButtonAction" />
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<contentGroupModal cmsWidgetName="TestModal"
|
||||
ref="TestModal"
|
||||
/>
|
||||
<modal
|
||||
ref="ModalName"
|
||||
modalId="ModalName"
|
||||
footerButtonText="test"
|
||||
:onModalClosedCallback="clickModalButton">
|
||||
<p>I'm a modal!</p>
|
||||
</modal>
|
||||
</Form>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import siteHeader from '@/iss-components/site-header/site-header';
|
||||
import siteFooter from "@/iss-components/site-footer/site-footer";
|
||||
import modal from "@/digital-components/modal/modal";
|
||||
|
||||
import contentGroupModal from "@/iss-components/content-group-modal/content-group-modal"
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { Form, defineRule } from "vee-validate";
|
||||
import { required, regex } from "@/helpers/validation-rules";
|
||||
import { errorMessages } from "@/constants/error-messages";
|
||||
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||
import { useMainStore } from '@/store';
|
||||
|
||||
export default {
|
||||
name: "z-test-page-jg",
|
||||
mixins: [BaseFormMixin],
|
||||
methods: {
|
||||
openModal(modalName) {
|
||||
this.$refs[modalName].openModal();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
const elements = document.getElementsByClassName("modal-text")
|
||||
const openModal = (modalName) => {
|
||||
this.$refs[modalName].openModal();
|
||||
};
|
||||
Array.from(elements).forEach((element) => {
|
||||
const target = element.getAttribute("modalTarget");
|
||||
if(target)
|
||||
{
|
||||
element.addEventListener("click", () => openModal(target) )
|
||||
}
|
||||
});
|
||||
},
|
||||
computed: {
|
||||
bodyText() {
|
||||
return this.getCmsContent("ModalLink", "BodyText");
|
||||
},
|
||||
},
|
||||
async beforeRouteEnter(to, from, next)
|
||||
{
|
||||
// Call APIs
|
||||
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
|
||||
|
||||
// Settle promises and get results
|
||||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: "cmsContent",
|
||||
promise: cmsContentPromise,
|
||||
},
|
||||
];
|
||||
|
||||
//use resultMap to populate layout content.
|
||||
let resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
next((vm) => {
|
||||
vm.setCmsContent(resultMap.cmsContent);
|
||||
});
|
||||
},
|
||||
components: {
|
||||
siteHeader,
|
||||
siteFooter,
|
||||
Form,
|
||||
contentGroupModal,
|
||||
modal
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in a new issue