This also gets rid of the colored buttons in favor of `.btn-default`, prevents wrapping of the "Destroy" button of the first button group of the "Programmatic access" demos to a second line and consistently places buttons below the Select2 widgets they apply to.
Ref. http://getbootstrap.com/components/#btn-groups.
Adds
* version information
* links to the GitHub repository, issues and releases
* links to the examples and options
* a link to the 3.5.2 docs
to the footer as well as namespaced styles for the footer in general as well as all the above.
* adds styles for anchor.js (similar to the official Bootstrap docs)
* currently results some of the generated links to have a suffix (e. g. examples.html#templating-1) added due to sections having the same ID as the headline copy that we want to link to
This also fixes an issue where we were using the `full_name` for
the value instead of the `id` in the example, which technically
wasn't correct.
This closes https://github.com/select2/select2/issues/3148.
In the past, `initSelection` was used for loading in data objects
for the pre-selected options. Now that Select2 is using a `<select>`
element, there is no need for doing this because the `<option>`
elements should provide the relevant information. So you can now
just pull this information from the remote data source
(or static array, in some cases) and build out the `<option>`
elements manually.
In most cases you don't need to go the full length with a custom
data adapter, but instead are just looking to pre-load elements on
the initial page load.
This improves https://github.com/select2/select2/issues/3116.
This also fixes a possible issue where the `< 0` fallback would
not be used because the `minimumResultsForSearch` check would
always return false and never load in the module.
This closes https://github.com/select2/select2/pull/3077.
This adds basic documentation explaining that there are compatibility
decorators for `<input type="text" />` support. This is not fully
compatible with all features and requires the use of an external
adapter like the `ArrayAdapter` or `AjaxAdapter` to provide a
reasonable way to query results.
This also triggers a warning if the adapter is used with a hidden
input, as the degraded functionality when there is no JavaScript
support should be discouraged.
The documentation README was previously intended to be read from
the documentation repository, not from the source repository.
This had the potential to give off the impression that documentation
pull requests were not allowed, when exactly the opposite is the
case. The README has been improved to make it more clear how to
contribute pull requests to update the documentation.
Thanks to Brent Connor [1] for pointing out this issue over at
Stack Overflow [2].
[1]: https://stackoverflow.com/users/3954106/brent-connor
[2]: http://stackoverflow.com/q/28705192/359284
This adds documentation for the `templateResult` and
`templateSelection` options. The fact that placeholders and
custom messages are templated was noted, although most people
should be using the standard `text` property that they provide
anyway. This fixes the templating link provided in the release
announcement to link to the correct location in the documentation.
This also adds support for the `templateSelection` function to
return a DocumentFragment or jQuery compatible object to be
passed back and rendered.
This closes https://github.com/select2/select2/issues/3005.
This closes https://github.com/select2/select2/issues/3019.
The `closeOnSelect` option was previously used to control whether
or not the dropdown was closed when an option was selected. This
could be simulated by triggering the `open` event after the `close`
event was received, but it makes sense to abstract it out into a
decorator.
This also adds support for not closing the dropdown when the control
key is being held. This is useful when multiple options need to be
selected in quick succession, so the dropdown does not have to be
reopened.
This also adds documentation that covers both changes.
This closes https://github.com/select2/select2/pull/2735.
This closes https://github.com/select2/select2/issues/3017.