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 67d8e3aed9
commit 676a070240
No known key found for this signature in database
GPG key ID: F8A415C5EA602A41
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