1
0
mirror of synced 2024-11-23 05:26:10 +03:00
Commit Graph

18 Commits

Author SHA1 Message Date
Teoh Han Hui
34000de9f8 Fix typo in docs/options.html 2015-02-05 17:50:26 +08:00
Kevin Brown
4c563a3d06 Add back ajax.transport support
This adds back the `ajax.transport` option, which allows anyone to
use their own AJAX backend. By default, `jQuery.ajax` is used as the
default transport backend.

**Breaking change:** Instead of taking `params` that contains a
`success` and `error` keys for the callback, two new callback
parameters are passed alongside of `params` that should be called
when the request succeeds or fails.

This closes https://github.com/select2/select2/issues/2987.
2015-01-29 09:15:02 -05:00
Kevin Brown
15c827b60f Added documentation for matcher
This adds documentation for the revised `matcher` function, as well
as the compatibility `oldMatcher` function for those who are
upgrading.

This closes https://github.com/select2/select2/issues/2971.
2015-01-27 19:36:54 -05:00
Kevin Brown
80bda0ad55 Fixed the selectOnClose option
The `selectOnClose` option did not work in production because we
were decorating the `dropdownAdapter` instead of the `resultsAdpater`
when automatically generating the adapters. This has now been fixed,
and the option should work without errors in production.

This also adds documentation for the `selectOnClose` option.

This closes https://github.com/select2/select2/issues/2953.
2015-01-22 15:19:45 -05:00
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
c5a3f34012 Added notes on the AMD-specific options 2015-01-17 20:59:05 -05:00
Kevin Brown
d6a83ea026 Pull query and initSelection out to compat modules
This also adds more documentation and corrects the release notes
for these breaking changes. These modules will now only be included
in the full builds of Select2, which has been noted in a few places.
2015-01-17 20:47:52 -05:00
Kevin Brown
af1f35176b Added back the width option
In past versions of Select2, the `width` option could be used to
tell Select2 how to determine the width of the container generated
by Select2.

**Breaking change:** The default value for the `width` option has
been changed from `copy` to `resolve.`

**Breaking change:** The old option called `copy` has been renamed
to `style` to better reflect what the width is generated from.

This fixes https://github.com/select2/select2/pull/2090.
This fixes https://github.com/select2/select2/issues/2911.
2015-01-11 18:00:48 -05:00
Eric Dahl
e9455e1a84 Docs: typos 2015-01-10 12:39:53 -08:00
Kevin Brown
64cb528f62 Set up a public event relay
Now Select2 can fire jQuery events that will match the corresponding
internal events. The `open` and `close` events are now publicly
accessible.

The selection adapter was chosen because it is the least likely to
be moved, but handles the most common events. This `EventRelay`
decorator should theoretically be able to decorate any of the
adapters, as they all have the `bind` method that it needs.
2015-01-08 11:44:09 -05:00
Kevin Brown
bba967ba21 Use the star event for internal binding
The star event will allow us to relay any custom events as well as
the ones used internally by Select2. This also makes it much
easier to start triggering events in general, as we don't need to
relay it in the core anymore.

A module has been created for the jQuery-facing events, and the
release announcement has been updated to mention the event name
changes.

This also adds some documentation about the public events.
2015-01-08 10:40:13 -05:00
Kevin Brown
df40e22586 Finish off the initial release notes and prepare for beta 2015-01-07 23:03:30 -05:00
Kevin Brown
14db3fc801 Support data-* attributes for configuration
The documentation is included, along with a few tests, which
explains the general rules for how it is parsed.
2014-12-10 15:23:39 -05:00
Kevin Brown
f6625d2347 Added dropdownParent
`dropdownParent` controls the location of the dropdown when it is
automatically added to the DOM. By default, this is the body
element but it can be modified based on where the user needs it.
2014-12-09 22:12:07 -05:00
Kevin Brown
f7d75b62fa Added more documentation
This adds documentation for a `dropdownParent` option which has
not yet been created, but will come in the next commit.
2014-12-09 22:02:16 -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
78ee1bc01e Continued work on the documentation 2014-11-08 16:48:57 -05:00
Kevin Brown
5454a908a1 Started working on the initial release announcement 2014-11-06 11:27:28 -05:00