Skip to content

Commit

Permalink
feat: Add Specific Class on Site Body when scrolled - MEED-8196 - Mee…
Browse files Browse the repository at this point in the history
…ds-io/MIPs#175 (#4369)

This change will add a specific class on Site Body when scrolled so that
a specific class can be applied on Site content when scrolled such as an
'elevation' behavior.
  • Loading branch information
boubaker authored and exo-swf committed Jan 29, 2025
1 parent 5117d50 commit b3645eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_10 http://www.gatein.org/xml/ns/gatein_objects_1_10"
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_10">
<portal-name>contribute</portal-name>
<displayed>true</displayed>
<locale>en</locale>
<access-permissions>Everyone</access-permissions>
<edit-permission>*:/platform/administrators</edit-permission>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_10 http://www.gatein.org/xml/ns/gatein_objects_1_10"
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_10">
<portal-name>test</portal-name>
<displayed>true</displayed>
<display-order>4</display-order>
<locale>en</locale>
<access-permissions>test_portal_access_permissions</access-permissions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public void testGetSites() throws Exception {
assertNotNull(entity);
siteRestEntities = (List<SiteEntity>) resp.getEntity();
assertFalse(siteRestEntities.isEmpty());
assertEquals(0, siteRestEntities.get(0).getDisplayOrder());
assertEquals(1, siteRestEntities.get(1).getDisplayOrder());
assertEquals(1, siteRestEntities.get(0).getDisplayOrder());
path =
"/v1/social/sites?siteType=PORTAL&sortByDisplayOrder=true&filterByDisplayed=true&displayed=true&expandNavigations=true&excludeEmptyNavigationSites=true";

Expand Down
2 changes: 2 additions & 0 deletions webapp/src/main/webapp/js/BodyScrollListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ function() {
if (topBarBoxShadow && topBarBoxShadow.style.visibility === 'hidden') {
document.querySelector('#TopBarBoxShadow').style.visibility = '';
}
siteBody.classList.add('site-scroll-top');
} else {
if (topBarBoxShadow && topBarBoxShadow.style.visibility !== 'hidden') {
document.querySelector('#TopBarBoxShadow').style.visibility = 'hidden';
}
siteBody.classList.remove('site-scroll-top');
}
}

Expand Down

0 comments on commit b3645eb

Please sign in to comment.