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

13 Commits

Author SHA1 Message Date
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
87b182fe2a Update version identifiers to 4.0.1-rc.1 2015-11-09 20:23:20 -05:00
Kevin Brown
80eb44bec7 Bump version numbers for 4.0.0 release 2015-04-26 17:02:52 -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
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
e6f249f66d Fixed Array.indexOf in i18n/uk.js 2015-02-17 12:47:48 -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
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