Skip to content

Commit

Permalink
Merge pull request #23 from Magenerds/fix--dialog-only-if-necessary
Browse files Browse the repository at this point in the history
Fix  dialog only if necessary
  • Loading branch information
steinkopffp committed Apr 29, 2019
2 parents d151ed2 + 9b69ecf commit 7462bd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion view/frontend/templates/modal_container.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
?>

<?php if ($this->showModal()): ?>
<div data-mage-init='{"countryModal":{"contentPath": "<?php echo $this->getModalContentUrl('popup/Popup/Index'); ?>"}}' id="language-modal" style="display:none;">
<div data-mage-init='{"countryModal":{"contentPath": "<?php echo $this->getModalContentUrl('popup/Popup/Index'); ?>"}}' id="language-modal" class="hide-country-popup" style="display:none;">
<div class="img-wrapper">
<img class="modal-image" />
</div>
Expand Down
6 changes: 4 additions & 2 deletions view/frontend/web/js/country_modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ define([
responsive: this.options.modal_responsive,
innerScroll: true,
wrapperClass: 'hint-country-modal'
},
popup = modal(options, this.element);
};

if (!this.options.show_modal && !this.options.default_store) {
// only init modal dialog if necessary
modal(options, this.element);
this.element.removeClass('hide-country-popup');
setTimeout(function () {
that.element.modal('openModal', true);
if (!that.options.show_modal_overlay) {
Expand Down

0 comments on commit 7462bd1

Please sign in to comment.