From 2b6bfd26e8eb7cc4d1b9e1daa6ee8ef3bffecb63 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Tue, 30 Aug 2016 15:43:02 +0000 Subject: [PATCH] Fix #597 @1 --- framework/application/controllers/AjaxpopupController.php | 7 ++++--- js/002-common.js | 7 +++++++ js/210-home.js | 8 ++++---- less/002-common.less | 6 ++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/framework/application/controllers/AjaxpopupController.php b/framework/application/controllers/AjaxpopupController.php index c653b38..4dbd875 100644 --- a/framework/application/controllers/AjaxpopupController.php +++ b/framework/application/controllers/AjaxpopupController.php @@ -3,9 +3,10 @@ class AjaxpopupController extends CubeIT_Controller_AjaxpopupController { public function quoteForm() { - $this->setPopupMaxWidth('1440'); - $this->setPopupPadding('20'); - $this->setVerticalMargin('20'); + $this->setPopupMaxWidth(1440); + $this->setPopupPadding(20); + $this->setVerticalMargin(20); + $this->setOverlayOpacity(0.5); return $this->view->quoteForm('requestQuotePopup'); // Different ID for popup form so it doesn't conflict with contact page form } diff --git a/js/002-common.js b/js/002-common.js index 0a277e9..4e97ac9 100644 --- a/js/002-common.js +++ b/js/002-common.js @@ -46,6 +46,13 @@ function load_common() { return true; }); + // Allow different styling (background blurring) when popup is open + $(window).on('cubeitopenpopup', function() { + $('body').addClass('popupOpen'); // Add class so we can blur the background + }); + $(window).on('cubeitpopupremoved', function() { + $('body').removeClass('popupOpen'); + }); $(window).on('cubeitresize', _resize); _resize(); diff --git a/js/210-home.js b/js/210-home.js index 18d9a54..a44297b 100644 --- a/js/210-home.js +++ b/js/210-home.js @@ -24,12 +24,12 @@ function load_home() { $.scrollify.move($(this).data('section')); }); - // Handle clicks to AJAX popups and disable scrollify when they open - // because it interferes with internal popup scrolling - $(document).on('click', '.popup', function () { + // Disable scrollify when popups are open because it + // interferes with internal popup scrolling + $(window).on('cubeitopenpopup', function() { disableScrollify(); }); - $(document).on('click', '.closePopup', function () { + $(window).on('cubeitpopupremoved', function() { resizeHome(); // Update layout and re-enable scrollify if space requirements are met }); } diff --git a/less/002-common.less b/less/002-common.less index 7ece960..3d5366e 100644 --- a/less/002-common.less +++ b/less/002-common.less @@ -20,6 +20,12 @@ body { opacity: 0; transition: opacity @transition-time-buttons; + &.popupOpen { + #mm-0, #h { + filter: blur(5px); + } + } + .wf-active & { opacity: 1; } -- 2.39.5