Skip to content

Commit

Permalink
resolved Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rbcoder1 committed Nov 28, 2023
1 parent 35d9f8e commit 38abfce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
11 changes: 2 additions & 9 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ document.getElementById('btnTop').addEventListener('click', function (event) {
document.getElementById('btnHome').addEventListener('click', function (event) {
// Highlight the selected section in the navbar
event.preventDefault();
this.blur();
document.getElementById('liHomeNav').setAttribute('class', 'active');
document.getElementById('liConfigureNav').setAttribute('class', '');
document.getElementById('liAboutNav').setAttribute('class', '');
Expand Down Expand Up @@ -408,7 +407,6 @@ document.getElementById('btnHome').addEventListener('click', function (event) {
});
document.getElementById('btnConfigure').addEventListener('click', function (event) {
event.preventDefault();
this.blur();
// Highlight the selected section in the navbar
document.getElementById('liHomeNav').setAttribute('class', '');
document.getElementById('liConfigureNav').setAttribute('class', 'active');
Expand All @@ -417,8 +415,7 @@ document.getElementById('btnConfigure').addEventListener('click', function (even
if (document.getElementById('configuration').style.display == 'none') {
// Show the selected content in the page
uiUtil.tabTransitionToSection('config', params.showUIAnimations);
}
else{
} else {
uiUtil.viewArticle();
}

Expand All @@ -430,21 +427,17 @@ document.getElementById('btnConfigure').addEventListener('click', function (even
});
document.getElementById('btnAbout').addEventListener('click', function (event) {
event.preventDefault();
this.blur();
// Highlight the selected section in the navbar
document.getElementById('liHomeNav').setAttribute('class', '');
document.getElementById('liConfigureNav').setAttribute('class', '');
document.getElementById('liAboutNav').setAttribute('class', 'active');
$('.navbar-collapse').collapse('hide');

if (document.getElementById('about').style.display == 'none') {
// Show the selected content in the page
uiUtil.tabTransitionToSection('about', params.showUIAnimations);
}
else{
} else {
uiUtil.viewArticle();
}

// Use a timeout of 400ms because uiUtil.applyAnimationToSection uses a timeout of 300ms
setTimeout(resizeIFrame, 400);
});
Expand Down
7 changes: 4 additions & 3 deletions www/js/lib/uiUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -862,13 +862,14 @@ function applyAppTheme (theme) {

// Displays the return link and handles click event. Called by applyAppTheme()
function showReturnLink () {
document.getElementById('viewArticle').style.display = 'block';
document.getElementById('viewArticle').addEventListener('click', function (e) {
const viewArticleLink = document.getElementById('viewArticle');
viewArticleLink.style.display = 'block';
viewArticleLink.addEventListener('click', function (e) {
e.preventDefault();
document.getElementById('liConfigureNav').classList.remove('active');
document.getElementById('liHomeNav').classList.add('active');
viewArticle();
viewArticle.style.display = 'none';
viewArticleLink.style.display = 'none';
});
}

Expand Down

0 comments on commit 38abfce

Please sign in to comment.