1
0
mirror of synced 2024-11-25 06:16:08 +03:00
Commit Graph

2411 Commits

Author SHA1 Message Date
Petr Kessler
6f21865d8a docs: more appropriate terminology ("highlight" -> "focus") 2016-06-24 09:54:06 +02:00
Kevin Brown
d2d7a9c381 Merge pull request #4435 from ZuBB/patch-1
fix(docs): corrected mistype
2016-06-21 10:00:56 -04:00
Vasyl Zuzyak
3a67616c2f fix(docs): corrected mistype 2016-06-21 16:57:19 +03:00
Nino Schoch
294e7e664d Fixed form focus lost 2016-06-16 13:45:21 +02:00
Kevin Brown
083c2112df Merge pull request #4389 from anasshekhamis/master
Correct typo in "options" page
2016-06-11 19:47:14 -04:00
Anas Shekhamis
ffe780db53 Correct typo in "options" page
Correct a typo in the "options" page, "Data Adapters" section, "Do the
id properties have to be strings?" part.
">select<" to "<select>"
2016-05-29 12:36:00 +03:00
Kevin Brown
566c7846fb Update version identifiers for 4.0.3 2016-05-26 21:16:06 -04:00
Kevin Brown
24a8d73a99 Recompile dist 2016-05-26 20:53:18 -04:00
Kevin Brown
2343fd4ae4 Clarify the Bootstrap docs notice with the dropdownParent option
This closes https://github.com/select2/select2/pull/4253.
2016-05-26 20:52:37 -04:00
Kevin Brown
8bc4f5d41d Added createTag code samples
This lays down part of the path for
https://github.com/select2/select2/issues/4023 as well as
https://github.com/select2/select2/issues/3974.
2016-05-26 20:50:12 -04:00
Harry
7eab29e271 Added Greek (el) translation
Translated English (en) language file to Greek (el).

This closes https://github.com/select2/select2/pull/4139
This closes https://github.com/select2/select2/pull/4146
2016-05-26 20:36:22 -04:00
Kevin Brown
7505347a69 Merge pull request #4379 from petruavram/master
[Docs] Add favicon
2016-05-26 20:25:39 -04:00
Petru-Vasile Avram
d34bff5797 Add favicon
I used the logo image on the site to generate a favicon using
[Real
Favicon Generator tool](http://realfavicongenerator.net/).
2016-05-25 10:25:47 +03:00
Kevin Brown
a74547aaa7 Migrate from expect to assert.expect
After we upgraded to QUnit 1.23.1, we gained support for
assert.expect(). This allows us to guard against any race conditions
within tests, because now expect() will be linked to the specific test
instead of the current running test.
2016-05-23 23:38:45 -04:00
Kevin Brown
2805fa7aa4 Add tests for detecting added and removed options
This adds tests for ea79a197e0.
2016-05-23 23:32:02 -04:00
Kevin Brown
ea79a197e0 Select2 now detects added and removed options
Select2 will now automatically update the selection if there are options
added to or removed from the DOM within the `<select>` element. This is
supported in all browsers except for Internet Explorer 8. Internet
Explorer 8 does not support the DOM mutation events which were added in
Internet Explorer 9, and it does not support mutation observers which
are the recommended way of handling this in modern browsers.

DOM mutation events also trigger for the `<select>` itself when it is
pulled from the DOM, so we need to filter these out within the event
handler.

Despite supporting mutation observers, we cannot accurately detect if
the removed option was selected at one time or another, so we need to
always re-pull the selection when an element is deleted.

This closes https://github.com/select2/select2/issues/4248
This builds upon https://github.com/select2/select2/pull/4249
2016-05-23 23:31:17 -04:00
Kevin Brown
a75482fd30 Upgrades QUnit to 1.23.1
This was required for us to get assert.async() support within tests, as
well as assert.expect() support. This was required because we need them
for multiple async tests that are coming.
2016-05-23 23:25:13 -04:00
Kevin Brown
99c248cc34 Recompiled dist 2016-05-14 22:34:03 -04:00
Kevin Brown
4b9e02f022 Corrected check for opening the dropdown
This corrects the check that was used when the dropdown was opened, so
the results would be immediately rendered instead of delaying the
loading. Previously it would delay the immediate load but immediately
load the results when the search term was emptied.

This closes https://github.com/select2/select2/issues/4191
This closes https://github.com/select2/select2/pull/4192
This closes https://github.com/select2/select2/pull/4202
2016-05-14 22:26:56 -04:00
Kevin Brown
481c43883e selectOnClose now properly works with closeOnSelect
Previously we hacked around the infinite loop between closeOnSelect and
selectOnClose by attempting to detect what event was being triggered
without knowing what event triggered it. Now we properly relay the
Select2 event and the jQuery event that triggered the select or unselect

This closes https://github.com/select2/select2/issues/4012
2016-05-14 22:14:20 -04:00
Kevin Brown
ad8447cc35 Add a new _type parameter for the first event argument
This will include the event type in the _type property, so it can be
accessed within the event handlers if it's not normally passed in. This
should not conflict with any existing handlers, and this should not be
considered a public property on event arguments.
2016-05-14 22:01:42 -04:00
Kevin Brown
acd3306192 Added tests for focusing results
This adds three tests related to focusing selected items in the results.
The tests are for e897d00 and 9f58128.
2016-05-14 21:05:30 -04:00
Kevin Brown
9f581285d8 Renamed focusFirstItem method
This renames the `focusFirstItem` method to `highlightFirstItem`, which
better reflects what is actually happening. This also ensures that the
highlight is visible when it is moved by calling
`ensureHighlightVisible`.

This closes https://github.com/select2/select2/issues/3479
This closes https://github.com/select2/select2/pull/4238
2016-05-14 21:05:14 -04:00
Alexander Leonov
e897d008a6 Fixed infinite scrolling issue using down key. 2016-05-14 21:04:31 -04:00
Nadim Afana
b6f0f3a69e Fixed line is too long warning for jquery-calls.js 2016-05-08 19:51:46 -07:00
Nadim Afana
8663d1bf0b Fixed jshint warnings 2016-05-08 19:45:58 -07:00
Nadim Afana
5fd270c9e4 Added an integration test to ensure issue does not come back in the future. 2016-05-08 19:32:41 -07:00
Nadim Afana
fba261c670 Fixed EOL to Unix format. 2016-05-06 14:54:13 -07:00
Nadim Afana
16e26310e1 Fixed more indentation issues. 2016-05-06 12:28:49 -07:00
Nadim Afana
6e9657105b Fixed indentation. 2016-05-06 12:23:58 -07:00
Nadim Afana
a1dc7f23d1 Fixed unit tests and updated source code to handle HTML5 attribs. 2016-05-05 21:41:20 -07:00
Nadim Afana
95b1f8b409 Reverted a line in base.js regarding tab index. 2016-05-05 18:38:38 -07:00
Nadim Afana
76298267f9 Updated inputData.js 2016-05-05 18:12:51 -07:00
Nadim Afana
54e126a664 Fixed bug #4014 2016-05-05 15:38:31 -07:00
Kevin Brown
07aa8a45b0 Merge pull request #4342 from damienfinck/master
Add missing French translation
2016-05-04 17:30:29 -04:00
Damien Finck
b1ea28bb7d Add missing French translation 2016-05-04 19:55:01 +02:00
Kevin Brown
3663b44b83 Merge pull request #4338 from murb/lt-file-jshint-fix
linting fix for lt i18n file
2016-05-02 22:03:03 -04:00
Maarten Brouwers
89dcfef94b linting fix for lt i18n file 2016-05-03 00:08:06 +02:00
Kevin Brown
f3b91d0680 Recompile dist with master 2016-04-24 12:21:53 -04:00
Aurelijus Rožėnas
5b5eddd183 Fixed broken lithuanian translation
This closes https://github.com/select2/select2/issues/4301.

Signed-off-by: Kevin Brown <kevin@kevin-brown.com>
2016-04-23 22:33:22 -04:00
Kevin Brown
5a831afb9a Added documentation for ajax.url
This closes https://github.com/select2/select2/issues/4213.
2016-04-23 22:23:04 -04:00
Kevin Brown
5b207b287e Add test for focus event on inline search
This adds a test for
02cca7baa7.
2016-04-23 21:38:41 -04:00
Kevin Brown
3bc7f4ac78 Added docs section for HTML labels
This will make it easier in the future to test that we support labels,
and it tells people who are looking to confirm that we support labels
that we in fact do.
2016-04-23 20:36:39 -04:00
Kevin Brown
31e7a1d4c5 Support the focus event on the <select> element
This adds basic support for focusing the Select2 element by triggering
the `focus` event on the underlying <select> element.  This implicitly
adds support for <label> elements, which will trigger the `focus` event
on the `<select>` if it is clicked.

This also fixes the focus issue that previously existed if Select2 was
opened while in a <label>. The focus would be transferred to the search
dropdown, and then immediately pulled away to the <select> element. This
happened because the <label> element triggers the `focus` event when a
`click` event propagates its way up, and we do not stop the propagation
of the `click` event when it is triggered on the selection.

This closes https://github.com/select2/select2/issues/2311.
This closes https://github.com/select2/select2/issues/4203.
This closes https://github.com/select2/select2/pull/4235.
2016-04-23 19:58:04 -04:00
Kevin Brown
b10976bd25 Merge pull request #4318 from acorncom/patch-1
Updated old select2-bootstrap-theme link
2016-04-20 14:03:58 -04:00
David Baker
64a79c3a5b Updated old select2-bootstrap-theme link 2016-04-20 11:11:20 -06:00
Kevin Brown
98f054fc18 Tune the tests for positioning
These tests did not cover the classes that should have been
automatically applied to the dropdown based on the space around it. Now
they both test that the dropdown should be facing down, because there is
enough space below it to display the dropdown.
2016-04-17 17:15:44 -04:00
Ryan Cousart
ecdc416635 Fixing bug with non-static parents for dropdowns
The offset of the parent was only being subtracted if the dropdown was
facing down, this now subtracts it if the dropdown is facing up as well.
This more or less applies the same fix as
e260860789,
but when calculating the position of the dropdown when it is facing up.

This closes https://github.com/select2/select2/issues/3303
This closes https://github.com/select2/select2/pull/4267
2016-04-17 16:58:01 -04:00
Kevin Brown
c099755012 Merge pull request #4246 from somethvictory/master
add Khmer translation
2016-04-14 17:54:48 -04:00
Kevin Brown
120672dce7 Added tests for multiple tags and tokenizing
This adds tests to ensure that 3b8cd2e369
will continue to work in the future.
2016-03-27 18:37:27 -04:00