Merge pull request #535 from Safelite/CSR-668-modal-updates
CSR-668 clean up code per Mark's request.
This commit is contained in:
commit
846fb218b3
1 changed files with 10 additions and 11 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="footerModal" tabindex="-1" aria-labelledby="footerModalLabel" aria-hidden="true" :style="`height: calc(100% - ${currentFooterAndHeaderHeight}px);`">
|
<div class="modal fade" id="footerModal" tabindex="-1" aria-labelledby="footerModalLabel" aria-hidden="true" v-on="{ 'show.bs.modal' : show, 'hide.bs.modal' : hide }" :style="`height: calc(100% - ${currentFooterAndHeaderHeight}px);`">
|
||||||
<div class="modal-dialog modal-fullscreen">
|
<div class="modal-dialog modal-fullscreen">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header visually-hidden">
|
<div class="modal-header visually-hidden">
|
||||||
|
|
@ -36,19 +36,18 @@ export default {
|
||||||
currentFooterAndHeaderHeight: 0,
|
currentFooterAndHeaderHeight: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
methods: {
|
||||||
const myModalEl = document.getElementById('footerModal');
|
show() {
|
||||||
var self = this;
|
this.currentFooterAndHeaderHeight = this.getFooterInfoBoxHeight() + 72;
|
||||||
myModalEl.addEventListener('hide.bs.modal', function (event) {
|
this.isActive = true;
|
||||||
self.isActive = false;
|
|
||||||
});
|
|
||||||
myModalEl.addEventListener('show.bs.modal', function (event) {
|
|
||||||
self.currentFooterAndHeaderHeight = self.getFooterInfoBoxHeight() + 72;
|
|
||||||
self.isActive = true;
|
|
||||||
document.querySelector('.page-container-grouped-styles').scrollTo({
|
document.querySelector('.page-container-grouped-styles').scrollTo({
|
||||||
top: 0, behavior: 'smooth'
|
top: 0, behavior: 'smooth'
|
||||||
});
|
});
|
||||||
})
|
},
|
||||||
|
hide() {
|
||||||
|
var self = this;
|
||||||
|
self.isActive = false;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
textLink,
|
textLink,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue