select2 widget for z3c.form and eea.facetednavigation
Project description
Features
select2 multivalued facetednavigation widget for 2-level vocabulary created with collective.taxonomy. Select “Select2” criteria in facetednavigation and select a taxonomy.
select2 multivalued z3c.form widget that works nice with 2-level vocabulary created with collective.taxonomy
Upon installation, the default zc3form widget for List/Set of Choice will be select2 based. If you don’t want this behavior, you can exclude collective.z3cform.select2.widget adapters.zcml with z3c.unconfigure.
Theming
The widget was developped initially for a bootstrap 3 theme and fontawesome. There is a search button icon left to the select that upon click open the select. If your site doesn’t have a bootstrap based theme, you may want to add this css rule to your project to hide the tiny button:
button[data-select2-open] { display: none; }
The z3cform widget in display mode uses the badge class, without a comma separator so it may be confusing when you don’t have style for the badge class. You can revert to a comma separated display by including minimal.zcml instead of configure.zcml, see Installation below.
Translations
One constant Faceted.taxonomyAllString currently in French.
Installation
Install collective.z3cform.select2 by adding it to your buildout:
[buildout] ... eggs = collective.z3cform.select2 zcml = collective.z3cform.select2 # or collective.z3cform.select2-minimal
and then running bin/buildout
You need to install the collective.z3cform.select2 addon to register the select2 js library. In a facetednav, add a Select2 criterion.
Contribute
Support
If you are having issues, please let us know.
License
The project is licensed under the GPLv2.
Contributors
Vincent Fretin [vincentfretin]
Eric Bréhault
Changelog
1.1 (2016-07-07)
Use faceted-select2-widget instead of faceted-select-widget to not break the original faceted-select-widget widget. [vincentfretin]
Depends on eea.jquery >= 8.8 to fix images in select2. [vincentfretin]
Replace collective.taxonomy.widget.TaxonomySelectFieldWidget by the widget from this package. [vincentfretin]
Initialize widgets in overlays now. [vincentfretin]
1.0 (2016-04-20)
Initial release. [vincentfretin]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for collective.z3cform.select2-1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb7827bdfdc7a33f1be215aaf33bf5dc072c0265871d448b902b280d2da6cf2c |
|
MD5 | 3039033a2572ff8b1dc9bc6e537dd996 |
|
BLAKE2b-256 | 4f5b5fb2fea80a6fe445acb22e0b91891df411083b72278c8a82464c92d04bd6 |