1
0
mirror of synced 2024-11-27 07:16:03 +03:00
Commit Graph

2148 Commits

Author SHA1 Message Date
Kevin Brown
8edf3c6408 Add dependencies on Almond and jQuery Mousewheel
These are technically only required when building the final versions,
but if someone is pulling from NPM they may want to deal with building
it as well. Almond is used for loading in packages and jQuery Mousewheel
is used to prevent the results from scrolling the page.
2015-11-27 16:07:05 -05:00
Kevin Brown
5ca76fda61 Merge pull request #3782 from nopash/patch-1
Correct Typo in noResults
2015-11-27 15:42:51 -05:00
Kevin Brown
23743a785c Merge pull request #3933 from Decagon/patch-1
Fix #3932
2015-11-27 14:56:40 -05:00
Kevin Brown
3c8366e876 Fixed deep cloning options
In
f1e86470ca
we tried to fix the issue where multiple instances created in a single
call would share the same options, and this worked for the most common
cases. Unfortunately it did not work for the case where data attributes
were also used with an options object, and as a result data attributes
would be copied to all instances. Data attributes are supposed to be
specific to a single instance.

This was fixed by moving the `true` for the deep copy to the start of
the `$.extend` call, as this is where jQuery looks for the deep copy
flag.

This closes https://github.com/select2/select2/issues/3485
2015-11-23 18:55:31 -05:00
Kevin Brown
e2b745ea3e Recompiled dist 2015-11-23 18:44:35 -05:00
Kevin Brown
dc516e7073 Add container to templateResult
This closes https://github.com/select2/select2/issues/3222.
2015-11-23 18:40:50 -05:00
Jono Mingard
7e3d4fb697 Add tests for accessible search results 2015-11-23 18:35:36 -05:00
Jono Mingard
9fae3d74e3 Speak results on selection
This closes https://github.com/select2/select2/issues/3735
This closes https://github.com/select2/select2/pull/3821
2015-11-23 18:34:37 -05:00
Kevin Brown
e08222ef15 Tests for the inline search box
This adds tests for the following commits

5f80c5d9f8

395e06aff5
2015-11-23 18:25:09 -05:00
Kevin Brown
5f80c5d9f8 Resize search after removing a choice
This fixes a previous bug with the backspace handler on the multiple
select search box where unselecting a choice through the keyboard would
not properly size the search box. As a result, most of the text would be
cut off and it was very clear that there was an issue.

In addition, a blank space was automatically being added to the end of
the search query. This blank space would not be removed at all, so the
user had to manually remove it.

Additionally, a query would be triggered for the last used search term
instead of the new search term that would be loaded in. This caused
incorrect results to be displayed most of the time.

All of these issues have been fixed by triggering a new search query
after an option has been removed through the keyboard. This will resize
the search box automatically, which fixes the main issue, and it will
trigger a search with the correct query.

This closes https://github.com/select2/select2/issues/3297
This closes https://github.com/select2/select2/pull/3398
2015-11-23 18:22:33 -05:00
Kevin Brown
8763a87779 Merge pull request #3946 from manuel-alvarez-alvarez/master
Add the decorator parameter to the handlers for the attach and detach of the dropdown
2015-11-23 16:49:59 -05:00
Kevin Brown
f94b462b15 Merge pull request #3943 from limonte/sr-Cyrl
Add sr-Cyrl language.
2015-11-23 15:43:03 -05:00
Limon Monte
410916510d Add errorLoading error message to sr, sr-Latin and hr languages. 2015-11-20 11:39:35 +01:00
Limon Monte
1c8d1f8e0d Add sr-Cyrl language. 2015-11-20 11:38:13 +01:00
Manuel Alvarez Alvarez
a06a08a028 Fixed jshint errors due to too long lines on the attachBody adapter 2015-11-19 15:49:52 +01:00
Manuel Alvarez Alvarez
eae4d01158 Add the decorator parameter to the handlers for the attach and detach the dropdown (otherwise the container is undefined) 2015-11-19 15:39:28 +01:00
Decagon
6dbe2d9164 Fix #3932 2015-11-15 16:11:29 -04:00
Kevin Brown
7e2ade0965 Merge pull request #3926 from stahor/patch-1
Update component.json
2015-11-12 11:17:37 -05:00
stahor
7eaee2be9e Update component.json 2015-11-12 14:28:40 +03:00
Kevin Brown
87b182fe2a Update version identifiers to 4.0.1-rc.1 2015-11-09 20:23:20 -05:00
KahWee Teng
31a329eb6d Fix inline search in Safari
This closes https://github.com/select2/select2/issues/3459
This closes https://github.com/select2/select2/pull/3476
2015-11-09 19:28:58 -05:00
Quentin Pradet
878bb3ab07 Fix select2('') calls on multiple elements
This fixes an issue when any of Select2's special options are called on
multiple elements, it would only affect the first option in the group.
This was because Select2 was only applying any changes to the first
element in the group (as chosen by jQuery) instead of applying changes
on each and every element within the list.

This has the new side effect of special options like `select2('data')`
returning the results for the last element in the list instead of the
first element. Because the previous functionality was considered
unspecified behaviour, this is not being treated as a breaking change.

This closes https://github.com/select2/select2/issues/3413
This closes https://github.com/select2/select2/pull/3495
2015-11-09 19:03:22 -05:00
Kevin Brown
7c47912b73 Set all AJAX parameters as query string parameters
This will now pass all of the AJAX parameters into the AJAX request as
query string parameters, so now the page number (and other variables)
will be set automatically. This can still be overridden in `ajax.data`
to pass anything else, but this should make it easier for the most
common case.

This closes https://github.com/select2/select2/issues/3548
This closes https://github.com/select2/select2/pull/3552
2015-11-09 18:49:40 -05:00
Lars Holm Jensen
ef508db161 Corrected Danish translation for results errors
This closes https://github.com/select2/select2/pull/3870
2015-11-09 18:28:59 -05:00
Kevin Brown
d0ce218c0b Merge pull request #3544 from fk/3306-clear-button-appears-under-long-text
#3306: Position clear button before the inline content of `.select2-selection__rendered`
2015-11-09 18:15:12 -05:00
Kevin Brown
c53b2dcf11 Fixed incorrect classes on "Loading more results" message
This fixes an issue where the old `option` and `load-more` classes were
not switched over to the newer BEM style of class names. Unfortunately
this is a breaking change, but this is also a bug given that it doesn't
follow the proper prefixing and is likely to conflict with larger
applications.

https://github.com/select2/select2/issues/3889
2015-11-09 18:13:02 -05:00
Kevin Brown
6d91da7e63 Recompile dist 2015-11-09 18:03:35 -05:00
SilverFire - Dima Naumenko
3037b933e2 Correct reference for this in AJAX callbacks
Previously `this` would point to the AjaxAdapter that was being used to
process the AJAX, or sometimes the JS object holding the AJAX options,
instead of the jQuery element that Select2 was attached to. This fixes
the issue so `this` will consistently point to the jQuery element, just
like in past versions of Select2.

This closes https://github.com/select2/select2/issues/3361
This closes https://github.com/select2/select2/pull/3410
2015-11-09 18:00:39 -05:00
Kevin Brown
71cc891b83 Merge pull request #3859 from ahmadhussain/master
Added arabic language
2015-11-09 17:49:22 -05:00
Meir Cohen
7974fd1662 Corrected a few Hebrew translations
About  `errorLoading`:
Before the correction, the translation was: "התוצאות לא נטענו בהלכה".
The word "בהלכה" is wrong and should be spelled "כהלכה", but besides that, this translations means "The results were loaded improperly", while my corrected translation means "Error while loading results", which is what needed.

About `inputTooLong`, `inputTooShort`, `maximumSelected`:
In Hebrew, it's not acceptable to have the digit 1 for representing a single object. You should use the actual word "one", which is "אחד" in Hebrew together with the singular noun (e.g. "one item" / "one character", instead of "1 item" / "1 character").
**These 3 parts needed a critical fix anyway**, because they were addind the English letter 's' to the end of the Hebrew string.

About `loadingMore`:
The translation was "טען תוצאות נוספות" which means "Load more results", as an instruction, probably a typo.
I changed "טען" to "טוען" so now it means "loading more results", which is the correct form.

This closes https://github.com/select2/select2/pull/3911
2015-11-09 17:43:53 -05:00
Kevin Brown
ca0fd7c195 Properly disable input handlers in IE
Previously we were only disabling the `input` handler when it was
triggered, which caused a race condition within the `keyup` handlers
which also was triggered by the `input` event. This fixes the issue by
also unbinding the `input` handlers within the `keyup` handler, to avoid
running into the race condition.

Thanks to @Eckankar for pointing out the race condition that still
existed in
66ae2ad1d5

This closes https://github.com/select2/select2/issues/3300
2015-11-09 17:33:30 -05:00
Ahmad Hussain
09d825dd31 added arabic language 2015-10-22 12:01:26 +03:00
Kevin Brown
6be96cfaa1 Merge pull request #3851 from yallups/Terminating-script-undefined-args
Fixes an issue of args === undefined and script terminates
2015-10-20 14:54:24 -04:00
Shawn
f3a29b87e1 Fixes and issue where If args are not present script terminates 2015-10-19 15:34:44 -07:00
Nopachat Kalayanapan
9b020edd80 Correct Typo in noResults 2015-09-18 17:57:43 +07:00
Kevin Brown
8ad8f200ba Merge pull request #3780 from InWayOpenSource/master
Fix option name in documentation - fix #3470
2015-09-17 20:26:23 -04:00
Sebastian Podjasek
96fb1bf2d4 Fix option name 2015-09-17 23:36:18 +02:00
Kevin Brown
19861bfa38 Merge pull request #3724 from select2/docs-faq
Switch option page to FAQ in docs
2015-09-14 19:34:09 -04:00
Kevin Brown
8c26dff234 Merge pull request #3767 from select2/contributing-guide
Add developer information to the contributing guide
2015-09-14 19:31:51 -04:00
Kevin Brown
2b91ac0a20 Rename options-new to options 2015-09-14 19:30:32 -04:00
Kevin Brown
8ac5f1ddf2 Migrate old options to options-old 2015-09-14 19:24:46 -04:00
Kevin Brown
2ff5f6a24c Swap mailing list and IRC channel links
These sections were dropped from the README in
5c71e2da50
and replaced by the Community page on the Select2 website.
2015-09-14 19:15:19 -04:00
Kevin Brown
ff4b47bf74 Add section to contributing about patches 2015-09-14 19:11:25 -04:00
Kevin Brown
b819a495aa Added compatibility section
This is the same as the old documentation, it has not been transformed
into a FAQ yet.
2015-09-13 15:36:52 -04:00
Kevin Brown
84d1218751 Added note about incomplete documentation
This adds two notes, one pointing to the old documentation and the other
pointing to the community, for getting extra help if their question is
not answered.
2015-09-13 15:27:34 -04:00
Kevin Brown
bc82856fb6 Document data object format
So far this just documents how <select> elements have their options
converted to a data object.
2015-09-13 11:33:21 -04:00
Kevin Brown
46ab1ebc8d A bunch of questions are missing answers
These will be filled in at a later point in time, hopefully later today.
2015-09-13 11:32:41 -04:00
Kevin Brown
119df9b09f Add questions about the dropdown 2015-09-13 11:31:59 -04:00
Kevin Brown
e9b89b4ac1 Add template for questions without answers 2015-09-13 11:31:34 -04:00
Kevin Brown
e472cb31f0 Finish off the core option answers
These were mostly there before, it was just a matter of moving some of
the answers around.
2015-09-13 11:31:06 -04:00