fix sidebar for translation pages (previously, for example, es_ES matched all es_ES pages, so home was always highlighted)

This commit is contained in:
Plailect 2017-09-29 10:14:22 -04:00
parent d34694bf38
commit 075131c4a5
2 changed files with 6 additions and 2 deletions

View file

@ -207,7 +207,8 @@ $(document).ready(function(){
} }
ol.children().each(function(idx, li) { ol.children().each(function(idx, li) {
var link = $(li).find("a").attr('href'); var link = $(li).find("a").attr('href');
if(window.location.href.indexOf(link) > -1 && link !== "/"){ var name = $(li).attr('data-name');
if(window.location.href.indexOf(link) > -1 && name !== "home"){
$(li).addClass("active"); $(li).addClass("active");
return false; return false;
} }

File diff suppressed because one or more lines are too long