fix deal close
This commit is contained in:
parent
1c55112b18
commit
bef78f8afb
@ -1,4 +1,26 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
<script>
|
||||||
|
// Listen for Vue Deal modal close event to reset Close Stage modal state
|
||||||
|
window.addEventListener('dealModalClosed', function () {
|
||||||
|
// Assuming the Close Stage modal is opened via a function `openCloseStageModal()`
|
||||||
|
// and its visibility is controlled by a global variable `isCloseStageOpen`.
|
||||||
|
// Adjust the logic according to the actual implementation.
|
||||||
|
if (typeof isCloseStageOpen !== 'undefined' && isCloseStageOpen) {
|
||||||
|
// Close the modal if it's still open
|
||||||
|
if (typeof closeCloseStageModal === 'function') {
|
||||||
|
closeCloseStageModal();
|
||||||
|
} else {
|
||||||
|
// Fallback: hide the modal element directly
|
||||||
|
const modalEl = document.getElementById('close-stage-modal');
|
||||||
|
if (modalEl) {
|
||||||
|
modalEl.style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Reset the flag
|
||||||
|
isCloseStageOpen = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</div> <!--main-block-->
|
</div> <!--main-block-->
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user