Merge pull request #207 from Safelite/CSR-257-funnel-footer-changes
CSR-257 code updates.
This commit is contained in:
commit
36756df098
2 changed files with 3 additions and 10 deletions
|
|
@ -12,7 +12,7 @@ describe("funnel-footer.vue", () => {
|
|||
offsetHeight: 24,
|
||||
};
|
||||
|
||||
global.document.getElementById = jest.fn().mockImplementation(()=> {
|
||||
global.document.querySelector = jest.fn().mockImplementation(()=> {
|
||||
return r;
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -42,14 +42,12 @@ export default {
|
|||
paddingHeight: 0,
|
||||
backLink: "",
|
||||
buttonText: "",
|
||||
currentYear: new Date().getFullYear(),
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.paddingHeight = document.getElementById("infoBox").offsetHeight + 24;
|
||||
this.paddingHeight = document.querySelector(".footer #infoBox").offsetHeight + 24;
|
||||
this.$nextTick(() => {
|
||||
window.addEventListener('resize', this.onResize);
|
||||
this.checkHeight();
|
||||
})
|
||||
},
|
||||
beforeUnmount() {
|
||||
|
|
@ -57,12 +55,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
onResize() {
|
||||
this.paddingHeight = document.getElementById("infoBox").offsetHeight;
|
||||
this.checkHeight();
|
||||
},
|
||||
checkHeight() {
|
||||
const parentHeight = document.getElementById('infoBox').clientHeight;
|
||||
const wrapper2 = document.getElementById('stacked');
|
||||
this.paddingHeight = document.querySelector(".footer #infoBox").offsetHeight;
|
||||
},
|
||||
initializeComponent(cmsContent) {
|
||||
this.backLink = cmsContent.BackButtonText;
|
||||
|
|
|
|||
Loading…
Reference in a new issue