No commit activity in last 3 years
No release in over 3 years
Transform browse and search filters into dropdowns using jQuery UI Accordion
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Workarea Filter Dropdowns

Filter Dropdowns plugin for the Workarea Commerce platform.

Using Workarea Filter Dropdowns

This gem packages up the workarea-accordions gem and includes a JS config preset to utilize jQuery UI's accordion functionality to the browse filters into dropdown menus. Other elements may be converted into dropdowns by applying the same accordion preset data attribute value, but they will have to match the relavent markup from the browse filters. Or the config will need to be customized. See https://jqueryui.com/accordion/ for jQuery UI Accordion documentation.

Simply add a data attribute to .result-filters element like this:

.result-filters{ data: { accordion: { presetConfig: 'filtersAccordionOptions' }.to_json } }

Along with the filtersAccordionOptions preset configuration, there is a filtersAccordionOptionsActive config that will default the dropdown to open. This version of the gem also includes a helper method, contains_selected_filter? to help you conditionally apply the appropriate preset configuration based on the presence of any selected filters.

.result-filters{ data: { accordion: { presetConfig: contains_selected_filter?(name) ? 'filtersAccordionOptionsActive' : 'filtersAccordionOptions' }.to_json } }

Workarea Platform Documentation

See https://developer.workarea.com for Workarea platform documentation.

Copyright & Licensing

Workarea Commerce Platform is released under the Business Software License