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

56 Commits

Author SHA1 Message Date
alexweissman
16f6b10628 Compile and minify for 4.0.4 release 2017-09-24 12:09:35 -04:00
Kevin Brown
04d582123d Recompile dist 2016-12-29 19:47:19 -05: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
99c248cc34 Recompiled dist 2016-05-14 22:34:03 -04:00
Kevin Brown
f3b91d0680 Recompile dist with master 2016-04-24 12:21:53 -04:00
Kevin Brown
622a619d25 Updated version identifiers for 4.0.2 2016-03-08 20:33:38 -05:00
Kevin Brown
eae6fcc2bd Update version identifiers to 4.0.2-rc.1 2016-02-14 17:06:23 -05:00
Kevin Brown
bc19964170 Update version identifiers to 4.0.1 2015-11-27 18:26:20 -05:00
Kevin Brown
e2b745ea3e Recompiled dist 2015-11-23 18:44:35 -05:00
Kevin Brown
87b182fe2a Update version identifiers to 4.0.1-rc.1 2015-11-09 20:23:20 -05:00
Kevin Brown
6d91da7e63 Recompile dist 2015-11-09 18:03:35 -05:00
Kevin Brown
8722ae2c81 Compile dist 2015-08-21 14:52:01 -04:00
Kevin Brown
4a1290b4e9 Recompiled dist 2015-08-09 17:47:05 -04:00
Kevin Brown
bfaa9e9b41 Recompile dist 2015-06-21 20:31:09 -04:00
Kevin Brown
80eb44bec7 Bump version numbers for 4.0.0 release 2015-04-26 17:02:52 -04:00
nath
e416e47356 Added back dropdownAutoWidth option
This adds back the `dropdownAutoWidth` option, so the dropdown can
have a width that is automatically determined by the browser. This
works best for smaller dropdowns that contain options with large
amounts of text.

This closes https://github.com/select2/select2/issues/3103.
This closes https://github.com/select2/select2/pull/3113.

Signed-off-by: Kevin Brown <kevin@kevin-brown.com>
2015-04-26 16:55:22 -04:00
Kevin Brown
a6999990b0 Fixed Hebrew translation
This should have been in he.js in the first place.
2015-03-18 09:44:04 -04:00
Kevin Brown
69e2d73c42 Bump version numbers for rc.2 2015-03-14 20:51:32 -04:00
Kevin Brown
d1e8a6fdad Overhaul of the AMD integration
Now we do not have separate AMD builds, instead we use a UMD wrapper
to support both AMD and CommonJS environments along with the browser.
This has been tested with RequireJS and it correctly imports Select2
and hooks into jQuery.

This means that all builds will include the Almond AMD loader, but
this isn't that much of an issue when you consider the file sizes.
The loader is namespaced so RequireJS and other AMD builders don't
complain about `require` and `define` existing. This is also done
so AMD loaders don't conflict, as Select2's AMD loader should
operate independently of others.

There are now two layers of wrappers that are applied to files,
only one of which is used for the translation files. This allows
us to only load in the internal Select2 modules once, and in
general makes most things cleaner. These have also been pulled out
into individual JS files instead of being stored in JSON files,
allowing us to add comments and make things look readable.

Because we use a few hacks, these files are heavily commented as well.

This closes https://github.com/select2/select2/issues/2945.
This closes https://github.com/select2/select2/issues/2946.
2015-03-14 19:05:24 -04:00
Quentin Caron
a3e8cd8f9b Updated 15 of the translation files so 'maximumSelected' is used instead of 'maximumSelection' 2015-03-12 22:11:36 +01:00
Kevin Brown
7feb90f256 Modified banner for translations
We don't need to update the dates on these every time that grunt
is called. This gives it a much more basic banner that is similar
to the minified version.
2015-03-11 20:40:08 -04:00
Kevin Brown
6c0dd6684b Add an actual banner to the JS file
This adds an actual banner that contains the version number and a
link to the license to the top of the files.

This closes https://github.com/select2/select2/issues/3118.
2015-03-11 20:26:48 -04:00
Kevin Brown
fff04c3f0c Merge pull request #3099 from yoonsy/master
added Korean translation.
2015-03-06 20:01:09 -05:00
Ahmad Azimi
be9168bc5a Remove unneeded 's' for plural forms 2015-03-05 22:05:15 +03:30
Ahmad Azimi
a6b5b40eb5 Add Farsi (Persian) language support.
Editor config folder and .DS_Stroe files added to .gitignore
2015-03-05 21:56:12 +03:30
yoonsy
45c815da50 remove unneeded 's' for plural and fix comment. 2015-03-03 22:32:22 +09:00
yoonsy
c1bc88eccd added Korean translation. 2015-03-03 22:20:22 +09:00
Kevin Brown
a954bae228 Compile Swedish translations 2015-02-24 19:36:44 -05:00
Kevin Brown
a9f6d64b72 Added .dataset fallback for jQuery 1.x
As we have established already, jQuery 1.x does not correctly handle
`data-*` attributes where there are multiple dashes.  This makes it
so we can still handle nested options when working with jQuery 1.x
by using the `.dataset` option that is supported by all major
browsers as well as IE 11+.

Browser support tables for the `.dataset` attributes can be found at
http://caniuse.com/dataset

A notice was already added to the documentation about this in
caeb0ec9b7.

The related ticket in the jQuery repository about this issue is
https://github.com/jquery/jquery/issues/2070.

This closes https://github.com/select2/select2/issues/2969.
2015-02-24 14:42:27 -05:00
Kevin Brown
e6f249f66d Fixed Array.indexOf in i18n/uk.js 2015-02-17 12:47:48 -05:00
Flávio
86c23c0f5c Create pt.js
European Portuguese Translation
2015-02-14 12:16:18 -05:00
Kevin Brown
081580bcd8 Fix undefined variables
There were a few undefined variables being referenced within the
Select2 code.  The JSHint configuration has been modified to fail
if there are undefined variables being referenced, including any
global variables.

There is an exception that is being made for the jQuery shim, as it
must try to find the global jQuery references.

An exception is made for the test helpers, as the SauceLabs reporting
variables are not camelCase, and would normally trigger warnings.

This closes https://github.com/select2/select2/pull/3028.
2015-02-13 22:49:54 -05:00
Kevin Brown
e383cb573c Build zh-CN 2015-02-13 22:25:45 -05:00
th3byrdm4n
5a825e0cb3 IE7/8 Compatability fixes
[].indexOf() isn’t supported in old IE. Utilizing jQuery’s $.inArray()
allows for Select2 to work in IE compatibility mode.
2015-02-08 07:29:52 -10:00
Yanick Rochon
75aa419d0a Fixing errors in FR locale. Added missing pl/pt-BR locales in dist. 2015-02-06 03:49:06 -05:00
Kevin Brown
686f846fa5 Changed how the builds are done
This adds a check that triggers an error if Select2 was not able
to detect a copy of jQuery on the page. This should help users when
they are setting up Select2.

**Breaking change:** The full build no longer includes jQuery.
Previously, the full build included all requirements for Select2,
including jQuery, which meant that anyone looking for the optional
requirements had to possibly include multiple versions of jQuery
on their page. This means that anyone requiring Select2 to also
bundle jQuery will now need to include jQuery on their pages
alongside Select2. A copy of jQuery is included in the repository.

**Breaking change:** The AMD build of Select2 will now correctly
wrap the code in a `define` block. It will still create the named
blocks inside of the code, which should be valid in most AMD build
systems, so now Select2 is compatible with cases where the file
does not have the same name as the Select2 module name.

**Breaking change:** Select2 will re-use the AMD methods if they
are available on the page, but it will not longer leak the included
AMD loader to the global scope. The AMD methods will still be
available on the `jQuery.fn.select2.amd` namespace.

The `mock.js` test file has been renamed to `helpers.js` and will
handle the escalation of the `require` and `define` variables to
the global scope. It should be included in all test files, or the
tests will fail.

This closes https://github.com/select2/select2/issues/2946.
2015-01-22 14:49:39 -05:00
Kevin Brown
53c9d53166 Fix jQuery.noConflict compatibility
When `jQuery.noConflict` is called, the global `$` variable is not
defined. We cannot assume in the code that the variable is defined,
and instead should always make sure to import the `jquery` module
when we need jQuery.

This fixes all of the issues where we are assuming that `$` is
defined globally when we are not importing the module. This also
fixes the issues when defining the `jQuery.fn.select2.amd` modules
where we were always attaching to the `$` object instead of the
`jQuery` object.

This closes https://github.com/select2/select2/issues/2947.
2015-01-21 19:56:06 -05:00
Tim
c318cde916 Added dutch translations
nl.js

Signed-off-by: Kevin Brown <kevin@kevinbrown.in>
2015-01-17 22:11:17 -05:00
Kevin Brown
ffb58a1be8 Fixed Russian translation
This fixes a mistake made when migrating the translation.
This closes https://github.com/select2/select2/issues/2933.
2015-01-17 22:05:48 -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
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