Commit dcc8c23b authored by imac's avatar imac

[Bugix]JIRA : NAP-58-> Add white circle to active filter

parent 9a561eba
......@@ -1849,13 +1849,27 @@ label.chevron.bottom::first-letter {
cursor: pointer;
}
.filter-btn span{
display:block;
/*display:block;*/
display: table;
position: relative;
text-transform: uppercase;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
left: -9px;
}
.filter-btn.selected-filter span:after{
content: '';
height: 5px;
width: 5px;
border-radius: 50%;
background: #fff;
display: inline-block;
vertical-align: super;
margin-left: 8px;
position: absolute;
top: 2px;
}
.filter-btn span:before{
content: '';
......
......@@ -526,6 +526,9 @@
.filter-btn span:before{
bottom: 9px;
}
.filter-btn.selected-filter span:after{
position: relative;
}
.filter-wrapper .close-btn{
top: 22px;
width: 25px;
......
......@@ -291,15 +291,28 @@ $.fn.loadPageContent = function(){
$(this).toggleClass('selected');
var e = $(this).parent().find('.selected').length,
parentFilter = $(this).parent().parent().parent();
e ? parentFilter.addClass('selected-filter') : parentFilter.removeClass('selected-filter') ;
if (e){
parentFilter.addClass('selected-filter');
$('.filter-btn').addClass('selected-filter');
}else{
parentFilter.removeClass('selected-filter') ;
$('.filter-btn').removeClass('selected-filter');
}
//e ? parentFilter.addClass('selected-filter') : parentFilter.removeClass('selected-filter') ;
}).on('click','.filter-bloc .reinit',function(){
selector = $(this).parent().parent();
selector.parent().reinitFilter();
selector.find('li').reinitFilter();
}).on('click','.reinit-all',function(){
$('.filter-bloc , .filter-bloc li').reinitFilter();
$('.filter-btn').removeClass('selected-filter');
});
}
$.fn.checkSelectedFilter = function(){
if ($('.filter-content .filter-bloc.selected-filter').length){
$('.filter-btn').addClass('selected-filter');
}
}
$.fn.changeProductImageBg = function(){
var
selectedColor = checkWhiteColor($(this).data("color")),
......@@ -683,6 +696,7 @@ $(document).ready(function(){
$('.news-btn').open_news();
$('.close-btn').close_news();
$('.filter-wrapper').open_filter();
$.fn.checkSelectedFilter();
$.fn.showSubmenu(); //Catalog subMenu
$('#fullpage').fullpageSlide(); //Stories
$.fn.responsive();
......
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