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>
|
||||
</div>
|
||||
<!-- 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-content">
|
||||
<div class="modal-header visually-hidden">
|
||||
|
|
@ -36,19 +36,18 @@ export default {
|
|||
currentFooterAndHeaderHeight: 0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
const myModalEl = document.getElementById('footerModal');
|
||||
var self = this;
|
||||
myModalEl.addEventListener('hide.bs.modal', function (event) {
|
||||
self.isActive = false;
|
||||
});
|
||||
myModalEl.addEventListener('show.bs.modal', function (event) {
|
||||
self.currentFooterAndHeaderHeight = self.getFooterInfoBoxHeight() + 72;
|
||||
self.isActive = true;
|
||||
methods: {
|
||||
show() {
|
||||
this.currentFooterAndHeaderHeight = this.getFooterInfoBoxHeight() + 72;
|
||||
this.isActive = true;
|
||||
document.querySelector('.page-container-grouped-styles').scrollTo({
|
||||
top: 0, behavior: 'smooth'
|
||||
});
|
||||
})
|
||||
},
|
||||
hide() {
|
||||
var self = this;
|
||||
self.isActive = false;
|
||||
},
|
||||
},
|
||||
components: {
|
||||
textLink,
|
||||
|
|
|
|||
Loading…
Reference in a new issue