From 21ae96d8471a1c2a86bf21c85a8082dbafa8b94b Mon Sep 17 00:00:00 2001
From: Juliana <juliana@le-filament.com>
Date: Thu, 12 Sep 2019 15:48:10 +0200
Subject: [PATCH] add contact adress

---
 static/src/js/script_to_top.js | 30 ++++++++++++++++++++++++++++++
 views/page_contact.xml         |  5 +++--
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/static/src/js/script_to_top.js b/static/src/js/script_to_top.js
index 5a61573..1e35ba8 100644
--- a/static/src/js/script_to_top.js
+++ b/static/src/js/script_to_top.js
@@ -49,6 +49,36 @@ odoo.define('pylote_website.scroll_totop', function (require) {
             }
         });
 
+        $("#techno-button").click(function() {
+            // $("html, body").animate({ scrollTop: $('#nav-techno').offset().top - 170}, 1000);
+            // window.open("/our-differenciation#our-techno");
+            // console.log(window.location);
+            var 
+            yPos,
+            yInitPos,
+            target = ($($(this).attr("href")));
+            window.location = "/our-differenciation";
+            window.location.reload(true);
+
+            yInitPos = $(window).scrollTop();
+            window.location.hash = "/our-differenciation#our-techno";
+            $(window).scrollTop(yInitPos);
+            target = ($("a[name=#our-techno]"));
+            yPos = target.offset().top;
+            $('html,body').animate({ scrollTop: yPos - 40 }, 1000)
+            // yInitPos = $(window).scrollTop();
+            // window.location.hash = "#our-techno";
+            // $(window).scrollTop( $(window).scrollTop() - 40 );
+            // $(window).scrollTop(yInitPos);
+            // target = ($($(this).attr("href") + ":first"));
+            // if (target.length == 1) {
+            //     yPos = target.offset().top; 
+            //     $('html,body').animate({ scrollTop: yPos - 40 }, 1000); 
+            // }
+
+
+        });
+
         $("#myBtn").click(function(ev){
             document.body.scrollTop = 0; // For Chrome, Safari and Opera
             document.documentElement.scrollTop = 0; // For IE and Firefox
diff --git a/views/page_contact.xml b/views/page_contact.xml
index c4aaf8c..ac4aa49 100644
--- a/views/page_contact.xml
+++ b/views/page_contact.xml
@@ -75,8 +75,9 @@
 	                                <t t-esc="res_company.city"/> - 
 	                                <t t-esc="res_company.country_id.name"/><br/>
 	                                <t t-esc="res_company.website"/> - <t t-esc="res_company.email"/><br/>
-	                                Contact press: <a href="mailto:press@pylote.com">press@pylote.com</a><br/>
-	                                Tel: <t t-esc="res_company.phone"/>
+	                                Tel: <t t-esc="res_company.phone"/><br/><br/>
+	                                Press contact: <a href="mailto:press@pylote.com">press@pylote.com</a><br/>
+	                                Jean-Christophe Huertas: +336 16 99 47 05
 	                            </div>
                             </div>
                         </div>
-- 
GitLab