Commit ba4fc07d authored by imac's avatar imac

[Update]Redmine - #644 : Add back URL of catalogue

parent e8da88a1
......@@ -277,11 +277,11 @@ II/ Helper..............Helper classes
transition: all .6s ease-in-out;
}
.right-panel-wrapper.transition{
-webkit-transition: all 1.3s ease-in-out;
-moz-transition: all 1.3s ease-in-out;
-o-transition: all 1.3s ease-in-out;
-ms-transition: all 1.3s ease-in-out;
transition: all 1.3s ease-in-out;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
.btn{
cursor: pointer;
......
......@@ -45,8 +45,10 @@ $(function(){
})
//END get file name
//END load content page on left Panel
$(document).on('click','.close-panel',function(e){
$(document).on('click','.close-panel:not(.ext-link)',function(e){
e.preventDefault();
$('.load-page').parent().removeClass('active');
history.pushState(null, null, $(this).find('a').attr('href'));
$('html').css('overflow','auto');
tlProduct.reverse();
//$('.load-page').removeClass('fadeInUp').addClass('animated fadeOutUp');
......
......@@ -74,8 +74,6 @@ $(function(){
}
})
}
$.fn.selectFormat = function(){
$(this).on('click',function(){
var actifImage = $(this).find('img').data('img-active'),
......@@ -158,9 +156,9 @@ $(function(){
$('.format-label #format_0').attr('src',activeImg);
tlProduct = new TimelineMax();
tlProduct.fromTo('.product-images',0.2,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},0);
tlProduct.staggerFromTo('.product-details .list',0.2,{opacity:0, marginLeft:"-10%"},{opacity:1, marginLeft:"0"},0.4,0.5);
tlProduct.fromTo('.product-info',0.2,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},1.2);
tlProduct.fromTo('.product-images',0.4,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},0);
tlProduct.staggerFromTo('.product-details .list',0.4,{opacity:0, marginLeft:"-10%"},{opacity:1, marginLeft:"0"},0.4,0.2);
tlProduct.fromTo('.product-info',0.4,{autoAlpha:0, marginLeft:"-10%"},{autoAlpha:1, marginLeft:"0"},0.5);
}
$('.product-list article img, .product-list article ul li').on('click', function() {
......@@ -171,7 +169,6 @@ $(function(){
$('.load-page').load(toLink,function(){
loadProductContent();
$('html').css('overflow','hidden');
console.log('heaeeee');
});
})
loadProductContent();
......
......@@ -24,10 +24,12 @@ global $product;
$id = get_the_ID();
$parent_cat = wp_get_post_terms($product->get_id(), 'product_cat', array( 'parent' => 0,'fields' => 'ids' ));
$sub_cat = wp_get_post_terms($product->get_id(), 'product_cat', array( 'parent' =>$parent_cat[0],'fields' => 'names' ));
//Get Bach URL
//Get Back URL
$ext_ref = externe_referrer();
$class_back = "";
if($ext_ref) {
$category_link = get_category_link($parent_cat[0]);
$class_back = "ext-link";
}else{
$category_link ="#";
}
......@@ -36,8 +38,8 @@ do_action('woocommerce_before_add_to_cart_form');
<div id="product" class="clearfix">
<div class="product-images row animated">
<div class = "btn-wrapper row close-panel">
<div class="pink-btn circle-btn"><a href="<?php echo $category_link ?>"><span class = "abs-center backlink">Retour</span></a></div>
<div class = "btn-wrapper row close-panel <?php echo $class_back ?>">
<div class="pink-btn circle-btn "><a href="<?php echo $category_link ?>"><span class = "abs-center backlink">Retour</span></a></div>
</div>
<div class="product-slides row">
<div class="product-header">
......
......@@ -28,10 +28,10 @@ $parent_cat = wp_get_post_terms($product->get_id(), 'product_cat', array( 'paren
$sub_cat = wp_get_post_terms($product->get_id(), 'product_cat', array( 'parent' =>$parent_cat[0],'fields' => 'names' ));
$current_variationID = $_GET['variation_id'];
$ext_ref = externe_referrer();
$class_back = "";
$category_link = get_category_link($parent_cat[0]);
if($ext_ref) {
$category_link = get_category_link($parent_cat[0]);
}else{
$category_link ="#";
$class_back = "ext-link";
}
if (!function_exists('print_attribute_radio')) {
......@@ -79,7 +79,7 @@ do_action('woocommerce_before_add_to_cart_form');
<div id="product" class="clearfix">
<div class="product-images row animated">
<div class = "btn-wrapper row close-panel">
<div class = "btn-wrapper row close-panel <?php echo $class_back ?>">
<div class="pink-btn circle-btn"><a href="<?php echo $category_link ?>"><span class = "abs-center backlink">Retour</span></a></div>
</div>
<div class="product-slides row">
......
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