Skip to content

Commit

Permalink
Merge pull request #899 from danmichaelo/fix-anylang-label2
Browse files Browse the repository at this point in the history
Fix "Any language" label not showing in edge case
  • Loading branch information
osma authored Feb 11, 2020
2 parents 999f509 + f5650ee commit f2a09c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resource/js/docready.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ $(function() { // DOCUMENT READY
} else if (!search_lang) {
langPretty = $('a[hreflang=' + lang + ']').html();
search_lang = lang;
if (!langPretty) { langPretty = $('a[hreflang="anything"]').html(); }
if (!langPretty) { langPretty = $('.lang-button-all').html(); }
$('#lang-dropdown-toggle').html(langPretty + ' <span class="caret"></span>');
qlang = lang;
} else {
Expand All @@ -558,7 +558,7 @@ $(function() { // DOCUMENT READY
});

if (!search_lang_possible && search_lang !== 'anything') {
langPretty = $('a[hreflang=""]').html();
langPretty = $('.lang-button-all').html();
$('#lang-dropdown-toggle').html(langPretty + ' <span class="caret"></span>');
qlang = '';
createCookie('SKOSMOS_SEARCH_LANG', qlang, 365);
Expand Down

0 comments on commit f2a09c7

Please sign in to comment.