fix conflicts
This commit is contained in:
commit
691c5ac4a3
@ -1,8 +1,8 @@
|
||||
{if count($sizes) > 0}
|
||||
<div class="block_filter">
|
||||
<div class="content">
|
||||
<h4 class="open">{l s='Recherche par' mod='filtervp'} {$name} {l s='disponible' mod='filtervp'}</h4>
|
||||
|
||||
<h4 class="open">{l s='Recherche par' mod='filtervp'} {$name}</h4>
|
||||
|
||||
<div class="content_filter">
|
||||
<ul id="filters">
|
||||
{foreach from=$sizes item=size}
|
||||
@ -24,8 +24,18 @@
|
||||
$(document).ready(function() {
|
||||
$('.open').live('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
$('.block_filter .content').css({'position':'relative'});
|
||||
var new_top = $('#privatesales_categories_block_left').position().top;
|
||||
|
||||
$(this).toggleClass('active');
|
||||
$('.content_filter').toggle();
|
||||
if($(this).hasClass('active') == true) {
|
||||
new_top = $('#privatesales_categories_block_left').position().top + $('.block_filter .content_filter').height() + 25;
|
||||
} else {
|
||||
new_top = $('.block_filter').position().top + $('.block_filter').height();
|
||||
}
|
||||
$('#privatesales_categories_block_left').css({'top': new_top});
|
||||
});
|
||||
});
|
||||
{/literal}
|
||||
|
@ -102,26 +102,56 @@ $(document).ready(function() {
|
||||
var position_elem = $(elem).position();
|
||||
var initial_position = position_elem.top;
|
||||
|
||||
if($('.block_filter').length > 0){
|
||||
elem = $('.block_filter');
|
||||
var position_elt_filter = $(elem).position();
|
||||
initial_position = position_elt_filter.top;
|
||||
|
||||
var elem_content = $('.block_filter .content');
|
||||
var elem_2 = $('#privatesales_categories_block_left');
|
||||
}
|
||||
|
||||
$(window).scroll(function(){
|
||||
var scroll = $(window).scrollTop();
|
||||
var marginApply = scroll + 10;
|
||||
|
||||
if(parseInt(scroll) >= parseInt(initial_position) ){
|
||||
var position_menu_bas = $(elem).position().top + $(elem).height() + 10;
|
||||
var position_menu_bas = $(elem).position().top + $(elem).height() + 10;
|
||||
var position_center_bas = $('.main_category_vp').position().top + $('.main_category_vp').height() - 20;
|
||||
|
||||
var top_max = scroll + $(elem).height();
|
||||
|
||||
if($('.block_filter').length > 0){
|
||||
var top_elem_2 = position_center_bas - $(elem).height();
|
||||
var top_elem_2_margin = marginApply + $(elem).height();
|
||||
}
|
||||
|
||||
if(top_max > position_center_bas){
|
||||
elem.css({'position': 'absolute' });
|
||||
elem.css({'top': position_center_bas - $(elem).height() });
|
||||
elem.css({'position': 'absolute'});
|
||||
elem.css({'top': position_center_bas - $(elem).height() });
|
||||
if($('.block_filter').length > 0){
|
||||
elem_2.css({'position': 'absolute' });
|
||||
elem_2.css({'top': top_elem_2 });
|
||||
|
||||
elem.css({'width': $(elem_2).width() });
|
||||
}
|
||||
}else{
|
||||
elem.css({'position': 'absolute' });
|
||||
elem.css({'top': marginApply });
|
||||
if($('.block_filter').length > 0){
|
||||
elem_2.css({'position': 'absolute' });
|
||||
elem_2.css({'top': top_elem_2_margin });
|
||||
|
||||
elem.css({'width': $(elem_2).width() });
|
||||
}
|
||||
}
|
||||
}else{
|
||||
elem.css({'position': 'inherit' });
|
||||
elem.css({'top': 'auto' });
|
||||
if($('.block_filter').length > 0){
|
||||
elem_2.css({'position': 'inherit' });
|
||||
elem_2.css({'top': 'auto' });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user