2017-08-28 18:08:55 +02:00
|
|
|
{if count($attr) > 0}
|
2016-01-04 12:49:26 +01:00
|
|
|
<div class="block_filter">
|
|
|
|
<div class="content">
|
2017-08-28 18:08:55 +02:00
|
|
|
<h4 class="open">{l s='Recherche par' mod='filtervp'}</h4>
|
2017-04-20 09:47:13 +02:00
|
|
|
|
2016-01-04 12:49:26 +01:00
|
|
|
<div class="content_filter">
|
2017-08-28 18:08:55 +02:00
|
|
|
<h5>{$attr[0]['group']}</h5>
|
|
|
|
{assign var="current_name" value=$attr[0]['group']}
|
|
|
|
<ul class="filters" id="filters">
|
|
|
|
{foreach from=$attr key=key item=attribute}
|
|
|
|
{if $key!=0 && $current_name!=$attribute['group']}
|
|
|
|
</ul>
|
|
|
|
<h5>{$attribute['group']}</h5>
|
|
|
|
<ul class="filters">
|
|
|
|
{/if}
|
2016-01-04 12:49:26 +01:00
|
|
|
<li>
|
2017-08-29 09:50:32 +02:00
|
|
|
<input type="checkbox" name="size" value="{$attribute['id_attribute']}" id="size_{$attribute['id_attribute']}">
|
|
|
|
<label for="size_{$attribute['id_attribute']}">{$attribute['name']}</label>
|
2016-01-04 12:49:26 +01:00
|
|
|
</li>
|
2017-08-28 18:08:55 +02:00
|
|
|
{assign var="current_name" value=$attribute['group']}
|
2016-01-04 12:49:26 +01:00
|
|
|
{/foreach}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
{literal}
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('.open').live('click', function(e){
|
|
|
|
e.preventDefault();
|
2017-04-20 09:47:13 +02:00
|
|
|
|
2017-04-20 10:48:53 +02:00
|
|
|
if($('#privatesales_categories_block_left').length>0) {
|
|
|
|
$('.block_filter .content').css({'position':'relative'});
|
|
|
|
var new_top = $('#privatesales_categories_block_left').position().top;
|
|
|
|
}
|
2017-04-20 09:47:13 +02:00
|
|
|
|
2016-01-04 12:49:26 +01:00
|
|
|
$(this).toggleClass('active');
|
|
|
|
$('.content_filter').toggle();
|
2017-04-20 10:48:53 +02:00
|
|
|
|
|
|
|
if($('#privatesales_categories_block_left').length>0) {
|
|
|
|
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});
|
|
|
|
}
|
2016-01-04 12:49:26 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
{/literal}
|
|
|
|
</script>
|