Skip to content

Commit

Permalink
[BSv5] Fixes script for persisting tabpanes (#1378)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored Jan 26, 2023
1 parent 92938db commit 1afb4b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions static/js/tabpane-persist.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ if (typeof Storage !== 'undefined') {
document
.querySelectorAll('.persistLang-' + activeLanguage)
.forEach((element) => {
$('#' + element.id).tab('show');
new bootstrap.Tab(element).show();
});
}
}
function persistLang(language) {
console.log("Klicked persistlang");
if (typeof Storage !== 'undefined') {
localStorage.setItem('active_language', language);
document.querySelectorAll('.persistLang-' + language)
.forEach((element) => {
$('#' + element.id).tab('show');
.forEach((element) => {
new bootstrap.Tab(element).show();
});
}
}

0 comments on commit 1afb4b0

Please sign in to comment.