Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style active section in search results. #1316

Merged
merged 1 commit into from
Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Open correct product page tabs when URL contains a fragment identifier referring to that content [#1304](https://github.com/bigcommerce/cornerstone/pull/1304)
- Display product reviews in tabbed content region of product page. [#1302](https://github.com/bigcommerce/cornerstone/pull/1302)
- Show bulk discounts only if enabled through store settings. [#1310](https://github.com/bigcommerce/cornerstone/pull/1310)
- Style active section in search results. [#1316](https://github.com/bigcommerce/cornerstone/pull/1316)

## 2.2.1 (2018-07-10)
- Fix wishlist dropdown background color bleeding out of container [#1283](https://github.com/bigcommerce/cornerstone/pull/1283)
Expand Down
12 changes: 12 additions & 0 deletions assets/js/theme/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ export default class Search extends CatalogPage {
this.$facetedSearchContainer.removeClass('u-hiddenVisually');
this.$contentResultsContainer.addClass('u-hiddenVisually');

$('[data-content-results-toggle]').removeClass('navBar-action-color--active');
$('[data-content-results-toggle]').addClass('navBar-action');

$('[data-product-results-toggle]').removeClass('navBar-action');
$('[data-product-results-toggle]').addClass('navBar-action-color--active');

urlUtils.goToUrl(url);
}

Expand All @@ -54,6 +60,12 @@ export default class Search extends CatalogPage {
this.$productListingContainer.addClass('u-hiddenVisually');
this.$facetedSearchContainer.addClass('u-hiddenVisually');

$('[data-product-results-toggle]').removeClass('navBar-action-color--active');
$('[data-product-results-toggle]').addClass('navBar-action');

$('[data-content-results-toggle]').removeClass('navBar-action');
$('[data-content-results-toggle]').addClass('navBar-action-color--active');

urlUtils.goToUrl(url);
}

Expand Down