Skip to content

Commit

Permalink
handle hub-page first load
Browse files Browse the repository at this point in the history
  • Loading branch information
hoseinzadehashraf committed Dec 11, 2024
1 parent abccb59 commit cdca85c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions dist/bundle-built.js
Original file line number Diff line number Diff line change
Expand Up @@ -167224,9 +167224,9 @@ define('app/hubPage',["require", "exports", "olive/olivePage", "./featuresMenu/f
if (currentMenu.length == 0) {
currentMenu = $("a[href='" + pathname.pathnameWithoutHub + "']:not(.feature-button)");
}
if (currentMenu.length == 0) {
currentMenu = $(".features-side-menu a[href!='']").first();
console.log('default menu item:', currentMenu);
if (currentMenu.length == 0 && HubPage.IsFirstPageLoad == true) {
HubPage.IsFirstPageLoad = false;
return;
}
if (currentMenu.length > 0 && HubPage.IsFirstPageLoad == true) {
if (currentMenu.parent().attr("is-side-menu-child") == "true")
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle-built.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "git://github.com/Geeksltd/Olive.Microservices.HubJs.git"
},
"author": "Geeks Ltd",
"version": "4.2.77",
"version": "4.2.78",
"license": "GPL-3.0",
"private": false,
"files": [
Expand Down
6 changes: 3 additions & 3 deletions src/hubPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ export default class HubPage extends OlivePage {
if (currentMenu.length == 0) {
currentMenu = $("a[href='" + pathname.pathnameWithoutHub + "']:not(.feature-button)");
}
if (currentMenu.length == 0) {
currentMenu = $(".features-side-menu a[href!='']").first();
console.log('default menu item:', currentMenu)
if (currentMenu.length == 0 && HubPage.IsFirstPageLoad == true) {
HubPage.IsFirstPageLoad = false;
return;
}
if (currentMenu.length > 0 && HubPage.IsFirstPageLoad == true) {
if (currentMenu.parent().attr("is-side-menu-child") == "true")
Expand Down

0 comments on commit cdca85c

Please sign in to comment.