-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) * IBX-6338: As an Editor I'd like to sort the list of search results * fixup! IBX-6338: As an Editor I'd like to sort the list of search results * fixup! IBX-6338: As an Editor I'd like to sort the list of search results * Update src/bundle/Resources/views/themes/admin/ui/search/results.html.twig Co-authored-by: Michał Grabowski <[email protected]> * Fixed issues reported by QA --------- Co-authored-by: Michał Grabowski <[email protected]>
- Loading branch information
1 parent
d29e092
commit b7891f8
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/bundle/Resources/public/js/scripts/admin.search.sorting.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(function (global, doc) { | ||
const searchForm = doc.querySelector('.ibexa-search-form'); | ||
const searchSortOrderSelect = doc.querySelector('.ibexa-search-form__sort-order-select'); | ||
|
||
if (searchSortOrderSelect) { | ||
searchSortOrderSelect.addEventListener( | ||
'change', | ||
() => { | ||
searchForm.submit(); | ||
}, | ||
false, | ||
); | ||
} | ||
})(window, window.document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters