]> _ Git - fluidbook-v3.git/commitdiff
done #573 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 20 Jul 2016 16:15:19 +0000 (16:15 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 20 Jul 2016 16:15:19 +0000 (16:15 +0000)
framework/application/forms/CMS/Sub/Contact/Footer.php
framework/application/forms/Settings.php
framework/application/views/helpers/BackgroundBlock.php
framework/application/views/helpers/ContactFooter.php
framework/application/views/helpers/Home.php
js/210-home.js
less/103-contact-footer.less

index cfc98f7bc97c4e29ff876099ac2fcc29be793c3d..2389a7e7822a56a86c4ee2c33d9e5dcbe60c2a99 100644 (file)
@@ -24,6 +24,11 @@ class Fluidbook_Form_CMS_Sub_Contact_Footer extends CubeIT_Form_SubForm {
                $intro_bg->setMaxItems(1);\r
                $this->addElement($intro_bg);\r
 \r
+               $intro_bg = new CubeIT_Form_Element_File_Image('bg_image_big');\r
+               $intro_bg->setLabel('Image de fond (grand)');\r
+               $intro_bg->setMaxItems(1);\r
+               $this->addElement($intro_bg);\r
+\r
                $button = new CubeIT_Form_Element_Link();\r
                $button->setLabel('Bouton');\r
                $this->addSubForm($button, 'button');\r
index 2bf989c4cd7289d25d2e5e4002ff48de533ee4f5..ef18efc21231e61983d47748f21345197a17bc4e 100644 (file)
@@ -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');
index db265f86ff588454ed606a9740a3d63910163e78..175ca2574957e42268caeb3e4a3dac9d72d3a4c5 100644 (file)
@@ -25,7 +25,7 @@ class Fluidbook_View_Helper_BackgroundBlock extends CubeIT_View_Helper_Abstract
                        $attributes['data-bg-ratio'] = $image_ratio;\r
                }\r
 \r
-               if ($data['bg_color']) {\r
+               if (isset($data['bg_color'])) {\r
                        $style .= "background-color:" . $data['bg_color'] . ";";\r
                }\r
                $attributes['style'] = $style;\r
index ef1ae52aefa7fa2843c3442fd262383f4c901ede..2e9076858343ed518b2a8a3d38dcc9b7ef8cc1d3 100644 (file)
@@ -4,9 +4,11 @@ class Fluidbook_View_Helper_ContactFooter extends CubeIT_View_Helper_Abstract {
        /**\r
         * @return string\r
         */\r
-       public function contactFooter() {\r
-               $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer'));\r
+       public function contactFooter($cf = null) {\r
+               if (null === $cf) {\r
+                       $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer'));\r
 \r
+               }\r
                $this->addScriptAndStyle('103-contact-footer');\r
 \r
                $res = $this->title($cf['title'], 'h2');\r
index 31f894ca61b230d663ef46e7eca750a32f82f1ef..bfc56bf48d2732c9e41b973d7e6f154873329639 100644 (file)
@@ -18,7 +18,9 @@ class Fluidbook_View_Helper_Home extends CubeIT_View_Helper_Abstract {
                        $viewHelper = 'home' . ucfirst($bloc);\r
                        $res .= $this->$viewHelper($this->{$bloc});\r
                }\r
-               $res.=$this->contactFooter();\r
+               $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer'));\r
+               $cf['bg_image'] = $cf['bg_image_big'];\r
+               $res .= $this->contactFooter($cf);\r
 \r
                return $res;\r
        }\r
index b5daeaf073adfbad29b256ba93d1c40346085ec2..840496c5468f059869212c001c47e5101118ad1a 100644 (file)
@@ -6,6 +6,20 @@ function load_home() {
 }\r
 \r
 function resizeHome() {\r
+    // Resize sections\r
     var wh = $(window).outerHeight() / zoom;\r
+    var ww = $(window).outerWidth() / zoom;\r
     $('main>section').css('height', wh);\r
+\r
+\r
+    resizeHomeContact(ww, wh);\r
+}\r
+\r
+function resizeHomeContact(ww, wh) {\r
+    var c = $(".contactFooter .grid");\r
+    if (ww > 900) {\r
+        var paddingTop = (wh - $(c).outerHeight()) / 2;\r
+        $(".contactFooter .content-wrapper").css({paddingTop: paddingTop});\r
+    }\r
+\r
 }
\ No newline at end of file
index 782c5321b2e5a1c7e1d6a027bd3c296756e06d8d..d7e22b5db83a156931f74d6148fa20db26cd1f4a 100644 (file)
@@ -9,6 +9,10 @@
                        background-size: 180% auto;\r
                        padding-bottom: 55%;\r
                }\r
+\r
+               .home & {\r
+                       min-height: 100% !important;\r
+               }\r
        }\r
 \r
        .buttons {\r