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