From 89bce6218f63b274bc25ef476f04627ad733fadb Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 5 Mar 2024 08:23:47 +0000 Subject: [PATCH] wait #6766 @0.25 --- framework/application/configs/application.ini | 4 +-- framework/application/forms/RequestQuote.php | 1 - js/002-common.js | 26 +++++-------------- js/315-quote.js | 4 +++ 4 files changed, 12 insertions(+), 23 deletions(-) diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 44a1330..e93c371 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -58,7 +58,7 @@ privacy.analytics = 1 [learning : production] -robots = false +seo.robots = false webhost = elearning.fluidbook.com @@ -81,7 +81,7 @@ httpauth.password = fb2016 httpauth.ip_whitelist[] = 130.180.213.67 httpauth.ip_whitelist[] = 82.64.156.165 -robots = false +seo.robots = false webhost = dev.fluidbook.com diff --git a/framework/application/forms/RequestQuote.php b/framework/application/forms/RequestQuote.php index 0f640a2..720c163 100644 --- a/framework/application/forms/RequestQuote.php +++ b/framework/application/forms/RequestQuote.php @@ -70,7 +70,6 @@ class Fluidbook_Form_RequestQuote extends CubeIT_Form } $pays = new Zend_Form_Element_Hidden('pays'); - $pays->setValue(CubeIT_Networking_GeoIP2::lookupCountryCode()); $this->addElement($pays); $locale = new Zend_Form_Element_Hidden('lang'); diff --git a/js/002-common.js b/js/002-common.js index d31dd86..e03a12b 100644 --- a/js/002-common.js +++ b/js/002-common.js @@ -3,6 +3,8 @@ var zoom = 1; var maxContentWidth = 1680; var _mobile = null; +window.IPINFO = {country: ''}; + function load_common() { // Google analytics @@ -46,6 +48,10 @@ function load_common() { return true; }); + $.ajax('https://ipinfo.io/json').done(function (data) { + window.IPINFO = data; + }); + // Allow different styling (background blurring) when popup is open $(window).on('cubeitopenpopup', function () { $('body').addClass('popupOpen'); // Add class so we can blur the background @@ -56,26 +62,6 @@ function load_common() { $(window).on('cubeitresize', _resize); _resize(); - - try { - if (Modernizr.webgl) { - $('body').append(''); - var canvas = $("#gupc").get(0); - var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); - var debugInfo = gl.getExtension('WEBGL_debug_renderer_info'); - var renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); - $.ajax({ - url: "https://workshop.fluidbook.com/services/gup", - dataType: 'json', - data: {gup: btoa(renderer)}, - success: function (data) { - }, error: function () { - } - }); - } - } catch (e) { - - } } function _resize() { diff --git a/js/315-quote.js b/js/315-quote.js index 676be1d..44d3409 100644 --- a/js/315-quote.js +++ b/js/315-quote.js @@ -5,10 +5,14 @@ function load_quoteform() { initFancySelect(); $(window).on('cubeitopenpopup', function () { + $('[name="pays"]').val(IPINFO.country); initFancySelect(); }); + + } + function initFancySelect() { if ((!$('html').hasClass('ie11') && !$('html').hasClass('ie10')) || !isMobile()) { $('#requestQuote select, #requestQuotePopup select').fancySelect(); -- 2.39.5