1
0
mirror of synced 2024-11-22 21:16:10 +03:00
Commit Graph

66 Commits

Author SHA1 Message Date
Kevin Brown
f427451853 Expose the defaults
This exposes the default options for Select2 as
`$.fn.select2.defaults`. A default option can be set using the
`set(key, val)` option which is available. The key should use the
same formatting as the HTML data attributes.

This also adds some documentation about it.
2015-01-17 21:27:53 -05:00
Kevin Brown
b43656c13c Added basic accessibility tests
This adds basic tests to ensure that the selection is accessible by
all users. This checks for common attributes, ensuring that the
container is always keyboard accessible and follows ARIA guidelines.

This also changes the base selection to create a common element so
we don't need to repeat attributes and such across multiple selection
containers.
2015-01-14 22:54:19 -05:00
Kevin Brown
28f9cae5d7 Added some more jQuery events
This adds the `select` and `unselect` events so users can still
hook into them from their jQuery plugins.

This also modifies the core `trigger` to fire pre-events that can
be canceled for the `open`, `close`, `select`, and `unselect`
events. Users implementing these events who need to handle cases
where the event has been prevented should check `args.prevented`,
where `args` is the object that was included for arguments when
triggering the internal event.
2015-01-13 18:28:21 -05:00
Kevin Brown
05cbaf7bf7 Universally use the object query return
There was a plan to universally use an array as the return from
query methods, but now that we've realized pagination and extra
things are impossible without it, we're going back to the return
object. Anyone looking to migrate their data should be returning
an object with the key `results` containing what they previously
returned.

This should fix https://github.com/select2/select2/issues/2898
2015-01-07 21:11:32 -05:00
Kevin Brown
063859160d Add a few translations, label the others 2015-01-07 20:39:29 -05:00
Kevin Brown
e111ea0420 Added a few new translations
Also fixed the JSHint issues in the new Ukranian translation.
2015-01-07 20:11:58 -05:00
Kevin Brown
33809f1fef Added some translations 2014-12-16 20:45:44 -05:00
Kevin Brown
4cdda7e156 Finish off the incomplete options documentation
The documentation is not completely finished, but now we have no
placeholders waiting to be completed.
2014-12-09 20:30:57 -05:00
Kevin Brown
fda973c34f Started adding more translations 2014-11-26 23:19:04 -05:00
Kevin Brown
5ec201ca30 Built out the translations
This migrates over the required English translations under their
new names.

The "Searching" message has also been adjusted to use "Searching..."
instead of "Loading more results...", which is what it used to
say sometimes.

This also changes the AJAX handler to call `abort` when needed.
2014-11-19 17:48:46 -05:00
Kevin Brown
c7e8f81595 Added Spanish translation and fixed the example 2014-11-05 11:25:41 -05:00
Kevin Brown
5e3b63289c Added infinite scrolling support for AJAX 2014-11-03 19:10:36 -05:00
Kevin Brown
91cecd55ed Handle minimumInputLength 2014-11-01 22:59:59 -04:00
Kevin Brown
959b96eca6 Started work on the "No results found" message 2014-11-01 14:20:51 -04:00
Kevin Brown
9bb993cee9 Added Translation object
This continues the work to get translations built into Select2.
2014-10-31 23:03:03 -04:00
Kevin Brown
20fcaa4449 Start working on translations
This adds a custom r.js build for i18n, which processes each JS
file in the `select2/i18n` directory and builds it.

So far only the "No results found" translation has been added.
2014-10-31 22:24:59 -04:00