Commit 6a367699 authored by imac's avatar imac

[Update]Redmine #649 : Structural change + fixed menu

parent f175ed46
...@@ -1883,6 +1883,9 @@ label.chevron.bottom::first-letter { ...@@ -1883,6 +1883,9 @@ label.chevron.bottom::first-letter {
color: #fff; color: #fff;
z-index: 9999999; z-index: 9999999;
} }
.filter-list>input{
display: block;
}
.filter-btn .btn-container{ .filter-btn .btn-container{
height: 100%; height: 100%;
position: relative; position: relative;
......
...@@ -649,6 +649,7 @@ ...@@ -649,6 +649,7 @@
.commercial-details.active-com figure{ .commercial-details.active-com figure{
margin-left: 0; margin-left: 0;
} }
.filter-list>input,
.commercial-details, .commercial-details,
.filter-bloc{ .filter-bloc{
width: 82%; width: 82%;
......
...@@ -667,7 +667,7 @@ var initFunction = function() { ...@@ -667,7 +667,7 @@ var initFunction = function() {
timer = setTimeout(function() { timer = setTimeout(function() {
onScrollCover(); onScrollCover();
}, 330); }, 600);
$(items).each(function() { $(items).each(function() {
var currLink = $(this); var currLink = $(this);
var refElement = $(currLink.attr("href")); var refElement = $(currLink.attr("href"));
...@@ -765,7 +765,7 @@ var initFunction = function() { ...@@ -765,7 +765,7 @@ var initFunction = function() {
$.fn.showSubmenu(); //Catalog subMenu $.fn.showSubmenu(); //Catalog subMenu
setTimeout(function() { setTimeout(function() {
onScrollCover(); onScrollCover();
}, 500); }, 600);
$('#fullpage').fullpageSlide(); //Stories $('#fullpage').fullpageSlide(); //Stories
$.fn.responsive(); $.fn.responsive();
$('.list-color-filter li').setBgColorList(); $('.list-color-filter li').setBgColorList();
......
/*var zones = {zone1: ['02' , '08' , '14' , '22' , '27' , '29' , '35' , '50' , '51' , '53' , '55' , '56' , '59' , '61' , '62' , '76' , '80' , 'BE' , 'LU'], /*var zones = {zone1: ['02' , '08' , '14' , '22' , '27' , '29' , '35' , '50' , '51' , '53' , '55' , '56' , '59' , '61' , '62' , '76' , '80' , 'BE' , 'LU'],
zone2: [ '60' , '75', '77' , '78' , '91', '92' , '93' , '94' , '95'], zone2: [ '60' , '75', '77' , '78' , '91', '92' , '93' , '94' , '95'],
zone3: ['03' , '18' , '28' , '36' , '37' , '41' , '44' , '45' , '49' , '58' , '72' , '89'], zone3: ['03' , '18' , '28' , '36' , '37' , '41' , '44' , '45' , '49' , '58' , '72' , '89'],
zone4: ['12' , '15' , '16' , '17' , '19' , '23' , '24' , '31' , '32' , '33' , '40' , '46' , '47' , '64' , '65' , '79' , '82' , '85' , '86' , '87'], zone4: ['12' , '15' , '16' , '17' , '19' , '23' , '24' , '31' , '32' , '33' , '40' , '46' , '47' , '64' , '65' , '79' , '82' , '85' , '86' , '87'],
zone5: ['01' , '04' , '05' , '07' , '10' , '21' , '25' , '26' , '38' , '39' , '42' , '43' , '52' , '54' , '57' , '63' , '67' , '68' , '69' , '70' , '71' , '73' , '74' , '88' , '90' , 'CH'], zone5: ['01' , '04' , '05' , '07' , '10' , '21' , '25' , '26' , '38' , '39' , '42' , '43' , '52' , '54' , '57' , '63' , '67' , '68' , '69' , '70' , '71' , '73' , '74' , '88' , '90' , 'CH'],
...@@ -42,7 +42,7 @@ function initMap(){ ...@@ -42,7 +42,7 @@ function initMap(){
}); });
}) })
} }
},0); },0);
} }
function selectZone(zone, initialClassDep, initialClassNum) { function selectZone(zone, initialClassDep, initialClassNum) {
...@@ -98,7 +98,7 @@ jQuery("#map-search").bind('submit',function(e) { ...@@ -98,7 +98,7 @@ jQuery("#map-search").bind('submit',function(e) {
}); });
}); });
//Highlight zone when select country //Highlight zone when select country
jQuery(document).find("#selectCountry").on('change',function(e) { jQuery(document).on('change','#selectCountry',function(e) {
var country = e.target.value, var country = e.target.value,
initialClassDep = 'st3', initialClassDep = 'st3',
initialClassNum = 'st5'; initialClassNum = 'st5';
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
function loadProductContent() { function loadProductContent() {
sizeProductDetails = $('.product-details .list').length; sizeProductDetails = $('.product-details .list').length;
if (sizeProductDetails == 0) { if (sizeProductDetails == 0) {
$('.product-images').outerWidth('65%'); $('.product-images').outerWidth('65%');
$('.product-details').outerWidth('34%'); $('.product-details').outerWidth('34%');
$('.product-info').outerWidth('100%'); $('.product-info').outerWidth('100%');
}else if (sizeProductDetails < 2) { }else if (sizeProductDetails < 2) {
$('.product-info').outerWidth('78.3%'); $('.product-info').outerWidth('78.3%');
$('.product-details .list').width('100%'); $('.product-details .list').width('100%');
$('.product-details form').width('21.7%'); $('.product-details form').width('21.7%');
} }
$('.pa_couleur li').getListColors(); $('.pa_couleur li').getListColors();
$('.pa_couleur li').selectColor(); $('.pa_couleur li').selectColor();
$('.pa_format li').selectFormat(); $('.pa_format li').selectFormat();
...@@ -23,16 +23,15 @@ function loadProductContent() { ...@@ -23,16 +23,15 @@ function loadProductContent() {
$('.list-wrapper .color-list').setColorToWhite('input'); $('.list-wrapper .color-list').setColorToWhite('input');
$('#zoom, .element-slider').zoom(); $('#zoom, .element-slider').zoom();
$('article[data-color], .pa_couleur li').click(function(e) { $('article[data-color], .pa_couleur li').click(function(e) {
$(this).selectSlide($('#slides')); $(this).selectSlide($('#slides'));
}); });
$('#mozaique').open_gallery(); $('#mozaique').open_gallery();
initFunction(); initFunction();
$.fn.responsive(); $.fn.responsive();
$('.variations_form').on('reset_data', function() $('.variations_form').on('reset_data', function()
{ {
console.log("reset data");
$attributes = $('.variations .list'); $attributes = $('.variations .list');
var num_attr = $('.variations .list').length; var num_attr = $('.variations .list').length;
// alert(num_attr); // alert(num_attr);
...@@ -41,10 +40,10 @@ function loadProductContent() { ...@@ -41,10 +40,10 @@ function loadProductContent() {
var $attr = $(this); var $attr = $(this);
//alert($attr.hasClass('first_attr')); //alert($attr.hasClass('first_attr'));
if (!$attr.hasClass("first_attr") || num_attr == 1) if (!$attr.hasClass("first_attr") || num_attr == 1)
{ {
console.log(i, $attr, $attr.find('input:not(:disabled):checked').length); // console.log(i, $attr, $attr.find('input:not(:disabled):checked').length);
if (!$attr.find('input:not(:disabled):checked').length) if (!$attr.find('input:not(:disabled):checked').length)
{ {
$firstInput = $attr.find('input:not(:disabled)').first(); $firstInput = $attr.find('input:not(:disabled)').first();
$firstInput.prop('checked',true); $firstInput.prop('checked',true);
$firstInput.change(); $firstInput.change();
...@@ -60,29 +59,29 @@ function loadProductContent() { ...@@ -60,29 +59,29 @@ function loadProductContent() {
}); });
function onFoundVariation() function onFoundVariation()
{ {
console.log('found variation'); //console.log('found variation');
$('.list').first().find('input:disabled').prop('disabled',false); $('.list').first().find('input:disabled').prop('disabled',false);
//$('.variations_form .format_list input').prop('checked',false); //$('.variations_form .format_list input').prop('checked',false);
$('.variations_form .color-list input:disabled').prop('disabled',false); $('.variations_form .color-list input:disabled').prop('disabled',false);
console.log('found', $('.variations_form .format-list input:checked + * + .format-desc')); //console.log('found', $('.variations_form .format-list input:checked + * + .format-desc'));
//var format = $('.variations_form .format-list input:checked + * + .format-desc').text(); //var format = $('.variations_form .format-list input:checked + * + .format-desc').text();
var format=''; var format='';
$('.variations_form .format-list input:checked + * + .format-desc ').each(function() { $('.variations_form .format-list input:checked + * + .format-desc ').each(function() {
format = format + $(this).text()+'<br />'; format = format + $(this).text()+'<br />';
}); });
$('.info-format').html(format); $('.info-format').html(format);
$('.info-format-txt').html(format); $('.info-format-txt').html(format);
$('.info-color').text($('.color-list input:checked').attr('value')); $('.info-color').text($('.color-list input:checked').attr('value'));
var varID = jQuery('input[name="variation_id"]').val(); var varID = jQuery('input[name="variation_id"]').val();
/**********NS***********/ /**********NS***********/
var variations_has_file = $('.download_file').data('fiche'); var variations_has_file = $('.download_file').data('fiche');
var tab_var_file = variations_has_file.split(',').slice(0, -1); var tab_var_file = variations_has_file.split(',').slice(0, -1);
//console.log(tab_var_file); //console.log(tab_var_file);
if ($.inArray(varID, tab_var_file) > -1) if ($.inArray(varID, tab_var_file) > -1)
{ {
$('.download_file').show(); $('.download_file').show();
...@@ -91,8 +90,8 @@ function loadProductContent() { ...@@ -91,8 +90,8 @@ function loadProductContent() {
{ {
$('.download_file').hide(); $('.download_file').hide();
} }
/**********************/ /**********************/
if (varID != 0) { if (varID != 0) {
var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text(); var price = jQuery('.woocommerce-variation-price .woocommerce-Price-amount').text();
...@@ -147,10 +146,10 @@ $(function(){ ...@@ -147,10 +146,10 @@ $(function(){
zoom.removeClass("active"); zoom.removeClass("active");
api.teardown(); api.teardown();
} else { } else {
$this.data("active", true); $this.data("active", true);
zoom.addClass("active"); zoom.addClass("active");
zoom.removeClass('is-loading'); zoom.removeClass('is-loading');
zoom.addClass("is-ready"); zoom.addClass("is-ready");
api._init(); api._init();
...@@ -175,9 +174,9 @@ $(function(){ ...@@ -175,9 +174,9 @@ $(function(){
formatWrapper.css({'height' : formatH , 'width' : formatW }); formatWrapper.css({'height' : formatH , 'width' : formatW });
}) })
} }
$.fn.selectColor= function(){ $.fn.selectColor= function(){
$(this).on('click',function(){ $(this).on('click',function(){
var $input = $(this).find('input'); var $input = $(this).find('input');
...@@ -190,7 +189,7 @@ $(function(){ ...@@ -190,7 +189,7 @@ $(function(){
$(this).toggleClass('selected'); $(this).toggleClass('selected');
} }
*/ */
}) })
} }
$.fn.selectFormat = function(){ $.fn.selectFormat = function(){
$(this).on('click',function(){ $(this).on('click',function(){
...@@ -217,7 +216,7 @@ $(function(){ ...@@ -217,7 +216,7 @@ $(function(){
$(this).find('img').attr('src',initialImage); $(this).find('img').attr('src',initialImage);
} }
*/ */
}) })
} }
/* /*
$.fn.checkIfFormatDisabled = function(){ $.fn.checkIfFormatDisabled = function(){
...@@ -234,7 +233,7 @@ $(function(){ ...@@ -234,7 +233,7 @@ $(function(){
jQuery.map(icons, function(value,key){ jQuery.map(icons, function(value,key){
console.log('key' + key + 'value = ' + value); console.log('key' + key + 'value = ' + value);
var activeImg = $('.format-label #'+value).data('img-active'); var activeImg = $('.format-label #'+value).data('img-active');
$('.format-label #'+value).attr('src',activeImg); $('.format-label #'+value).attr('src',activeImg);
$('.format-list').each(function() { $('.format-list').each(function() {
if ($(this).find("input").is(':disabled')) { if ($(this).find("input").is(':disabled')) {
...@@ -256,14 +255,13 @@ $(function(){ ...@@ -256,14 +255,13 @@ $(function(){
}else{ }else{
$('#download').addClass('disabled'); $('#download').addClass('disabled');
} }
console.log('dwnld');
} }
$.fn.slider_product = function(){ $.fn.slider_product = function(){
$('#slides').not('.slick-initialized').slick({ $('#slides').not('.slick-initialized').slick({
autoplay: false, autoplay: false,
arrows:true, arrows:true,
dots: true, dots: true,
slidesToShow: 1, slidesToShow: 1,
adaptiveHeight: true, adaptiveHeight: true,
//centerMode: true, //centerMode: true,
...@@ -357,7 +355,7 @@ $(function(){ ...@@ -357,7 +355,7 @@ $(function(){
//localStorage['from-site'] = true; //localStorage['from-site'] = true;
$('head').append($('.header-shop')); $('head').append($('.header-shop'));
var toLink = $(this).data('link'); var toLink = $(this).data('link');
$(document).attr("title", $(this).data('title')); $(document).attr("title", $(this).data('title'));
// $(document).attr("description", $(this).data('description')); // $(document).attr("description", $(this).data('description'));
// $.post(toLink, { fromSite: true}); // $.post(toLink, { fromSite: true});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment