From: vincent@cubedesigners.com Date: Wed, 20 Jul 2016 16:15:19 +0000 (+0000) Subject: done #573 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=14d31637fe4b54ef15f4f69aaa12939658e00423;p=fluidbook-v3.git done #573 @1.5 --- diff --git a/framework/application/forms/CMS/Sub/Contact/Footer.php b/framework/application/forms/CMS/Sub/Contact/Footer.php index cfc98f7..2389a7e 100644 --- a/framework/application/forms/CMS/Sub/Contact/Footer.php +++ b/framework/application/forms/CMS/Sub/Contact/Footer.php @@ -24,6 +24,11 @@ class Fluidbook_Form_CMS_Sub_Contact_Footer extends CubeIT_Form_SubForm { $intro_bg->setMaxItems(1); $this->addElement($intro_bg); + $intro_bg = new CubeIT_Form_Element_File_Image('bg_image_big'); + $intro_bg->setLabel('Image de fond (grand)'); + $intro_bg->setMaxItems(1); + $this->addElement($intro_bg); + $button = new CubeIT_Form_Element_Link(); $button->setLabel('Bouton'); $this->addSubForm($button, 'button'); diff --git a/framework/application/forms/Settings.php b/framework/application/forms/Settings.php index 2bf989c..ef18efc 100644 --- a/framework/application/forms/Settings.php +++ b/framework/application/forms/Settings.php @@ -33,7 +33,7 @@ class Fluidbook_Form_Settings extends CubeIT_Form_Settings { $this->addElementLocalized($quote_description); $quote_form_tips = new CubeIT_Form_Element_Markitup('quote_form_tips'); - $quote_form_tips->setLabel('Conseils de forme "Demander un Devis"'); + $quote_form_tips->setLabel('Conseils pour le formulaire "Demander un Devis"'); $this->addElementLocalized($quote_form_tips); $footer_menu_main = new Fluidbook_Form_CMS_Element_PagesTagList('footer_menu_main'); diff --git a/framework/application/views/helpers/BackgroundBlock.php b/framework/application/views/helpers/BackgroundBlock.php index db265f8..175ca25 100644 --- a/framework/application/views/helpers/BackgroundBlock.php +++ b/framework/application/views/helpers/BackgroundBlock.php @@ -25,7 +25,7 @@ class Fluidbook_View_Helper_BackgroundBlock extends CubeIT_View_Helper_Abstract $attributes['data-bg-ratio'] = $image_ratio; } - if ($data['bg_color']) { + if (isset($data['bg_color'])) { $style .= "background-color:" . $data['bg_color'] . ";"; } $attributes['style'] = $style; diff --git a/framework/application/views/helpers/ContactFooter.php b/framework/application/views/helpers/ContactFooter.php index ef1ae52..2e90768 100644 --- a/framework/application/views/helpers/ContactFooter.php +++ b/framework/application/views/helpers/ContactFooter.php @@ -4,9 +4,11 @@ class Fluidbook_View_Helper_ContactFooter extends CubeIT_View_Helper_Abstract { /** * @return string */ - public function contactFooter() { - $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer')); + public function contactFooter($cf = null) { + if (null === $cf) { + $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer')); + } $this->addScriptAndStyle('103-contact-footer'); $res = $this->title($cf['title'], 'h2'); diff --git a/framework/application/views/helpers/Home.php b/framework/application/views/helpers/Home.php index 31f894c..bfc56bf 100644 --- a/framework/application/views/helpers/Home.php +++ b/framework/application/views/helpers/Home.php @@ -18,7 +18,9 @@ class Fluidbook_View_Helper_Home extends CubeIT_View_Helper_Abstract { $viewHelper = 'home' . ucfirst($bloc); $res .= $this->$viewHelper($this->{$bloc}); } - $res.=$this->contactFooter(); + $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer')); + $cf['bg_image'] = $cf['bg_image_big']; + $res .= $this->contactFooter($cf); return $res; } diff --git a/js/210-home.js b/js/210-home.js index b5daeaf..840496c 100644 --- a/js/210-home.js +++ b/js/210-home.js @@ -6,6 +6,20 @@ function load_home() { } function resizeHome() { + // Resize sections var wh = $(window).outerHeight() / zoom; + var ww = $(window).outerWidth() / zoom; $('main>section').css('height', wh); + + + resizeHomeContact(ww, wh); +} + +function resizeHomeContact(ww, wh) { + var c = $(".contactFooter .grid"); + if (ww > 900) { + var paddingTop = (wh - $(c).outerHeight()) / 2; + $(".contactFooter .content-wrapper").css({paddingTop: paddingTop}); + } + } \ No newline at end of file diff --git a/less/103-contact-footer.less b/less/103-contact-footer.less index 782c532..d7e22b5 100644 --- a/less/103-contact-footer.less +++ b/less/103-contact-footer.less @@ -9,6 +9,10 @@ background-size: 180% auto; padding-bottom: 55%; } + + .home & { + min-height: 100% !important; + } } .buttons {