d1e8a6fdad
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.
3 lines
953 B
JavaScript
3 lines
953 B
JavaScript
/*! Select2 4.0.0-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
|
|
|
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); |