Merge branch 'master' into docs-improvements
Conflicts: docs/announcements-4.0.html docs/index.html
This commit is contained in:
commit
445c48236d
@ -10,9 +10,12 @@ module.exports = function (grunt) {
|
||||
fullIncludes = [
|
||||
'jquery',
|
||||
|
||||
'select2/compat/matcher',
|
||||
'select2/compat/containerCss',
|
||||
'select2/compat/dropdownCss',
|
||||
|
||||
'select2/compat/initSelection',
|
||||
'select2/compat/inputData',
|
||||
'select2/compat/matcher',
|
||||
'select2/compat/query',
|
||||
|
||||
'select2/dropdown/attachContainer',
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "select2",
|
||||
"repo": "select/select2",
|
||||
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
|
||||
"version": "4.0.0-rc.2",
|
||||
"version": "4.0.0",
|
||||
"demo": "https://select2.github.io/",
|
||||
"keywords": [
|
||||
"jquery"
|
||||
|
2
dist/js/i18n/az.js
vendored
2
dist/js/i18n/az.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/bg.js
vendored
2
dist/js/i18n/bg.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/ca.js
vendored
2
dist/js/i18n/ca.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/cs.js
vendored
2
dist/js/i18n/cs.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/da.js
vendored
2
dist/js/i18n/da.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/da",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/de.js
vendored
2
dist/js/i18n/de.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/en.js
vendored
2
dist/js/i18n/en.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/es.js
vendored
2
dist/js/i18n/es.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/et.js
vendored
2
dist/js/i18n/et.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/eu.js
vendored
2
dist/js/i18n/eu.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/fa.js
vendored
2
dist/js/i18n/fa.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/fa",[],function(){return{errorLoading: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}})();
|
2
dist/js/i18n/fi.js
vendored
2
dist/js/i18n/fi.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/fr.js
vendored
2
dist/js/i18n/fr.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/gl.js
vendored
2
dist/js/i18n/gl.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/he.js
vendored
2
dist/js/i18n/he.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/he",[],function(){return{errorLoading:function(){return"התוצאות לא נטענו בהלכה"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק "+t+" תווים";return t!=1&&(n+="s"),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 e.maximum!=1&&(t+="s"),t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/hi.js
vendored
2
dist/js/i18n/hi.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),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}})();
|
2
dist/js/i18n/hr.js
vendored
2
dist/js/i18n/hr.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/hu.js
vendored
2
dist/js/i18n/hu.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/id.js
vendored
2
dist/js/i18n/id.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/id",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/is.js
vendored
2
dist/js/i18n/is.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/it.js
vendored
2
dist/js/i18n/it.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/ko.js
vendored
2
dist/js/i18n/ko.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/ko",[],function(){return{errorLoading: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}})();
|
2
dist/js/i18n/lt.js
vendored
2
dist/js/i18n/lt.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"ių","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"ių","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/lv.js
vendored
2
dist/js/i18n/lv.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/mk.js
vendored
2
dist/js/i18n/mk.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/nb.js
vendored
2
dist/js/i18n/nb.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/nl.js
vendored
2
dist/js/i18n/nl.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t="Er kunnen maar "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t+=" worden geselecteerd",t},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/pl.js
vendored
2
dist/js/i18n/pl.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maxiumum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/pt-BR.js
vendored
2
dist/js/i18n/pt-BR.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/pt.js
vendored
2
dist/js/i18n/pt.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/ro.js
vendored
2
dist/js/i18n/ro.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/ro",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să introduceți mai puțin de "+t;return n+=" caracter",n!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți incă "+t;return n+=" caracter",n!==1&&(n+="e"),n},loadingMore:function(){return"Se încarcă…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",t!==1&&(t+="e"),t},noResults:function(){return"Nu a fost găsit nimic"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
|
4
dist/js/i18n/ru.js
vendored
4
dist/js/i18n/ru.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
|
||||
(function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/sk.js
vendored
2
dist/js/i18n/sk.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/sr.js
vendored
2
dist/js/i18n/sr.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/sv.js
vendored
2
dist/js/i18n/sv.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/th.js
vendored
2
dist/js/i18n/th.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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}})();
|
2
dist/js/i18n/tr.js
vendored
2
dist/js/i18n/tr.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/uk.js
vendored
2
dist/js/i18n/uk.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/vi.js
vendored
2
dist/js/i18n/vi.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
|
2
dist/js/i18n/zh-CN.js
vendored
2
dist/js/i18n/zh-CN.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/zh-CN",[],function(){return{errorLoading: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}})();
|
2
dist/js/i18n/zh-TW.js
vendored
2
dist/js/i18n/zh-TW.js
vendored
@ -1,3 +1,3 @@
|
||||
/*! Select2 4.0.0-rc.2 | https://github.com/select2/select2/blob/master/LICENSE.md */
|
||||
/*! Select2 4.0.0 | 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/zh-TW",[],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}})();
|
299
dist/js/select2.full.js
vendored
299
dist/js/select2.full.js
vendored
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Select2 4.0.0-rc.2
|
||||
* Select2 4.0.0
|
||||
* https://select2.github.io
|
||||
*
|
||||
* Released under the MIT license
|
||||
@ -714,6 +714,23 @@ S2.define('select2/utils',[
|
||||
});
|
||||
};
|
||||
|
||||
// Append an array of jQuery nodes to a given element.
|
||||
Utils.appendMany = function ($element, $nodes) {
|
||||
// jQuery 1.7.x does not support $.fn.append() with an array
|
||||
// Fall back to a jQuery object collection using $.fn.add()
|
||||
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
||||
var $jqNodes = $();
|
||||
|
||||
$.map($nodes, function (node) {
|
||||
$jqNodes = $jqNodes.add(node);
|
||||
});
|
||||
|
||||
$nodes = $jqNodes;
|
||||
}
|
||||
|
||||
$element.append($nodes);
|
||||
};
|
||||
|
||||
return Utils;
|
||||
});
|
||||
|
||||
@ -1565,7 +1582,7 @@ S2.define('select2/selection/multiple',[
|
||||
return;
|
||||
}
|
||||
|
||||
var $selections = $();
|
||||
var $selections = [];
|
||||
|
||||
for (var d = 0; d < data.length; d++) {
|
||||
var selection = data[d];
|
||||
@ -1578,10 +1595,12 @@ S2.define('select2/selection/multiple',[
|
||||
|
||||
$selection.data('data', selection);
|
||||
|
||||
$selections = $selections.add($selection);
|
||||
$selections.push($selection);
|
||||
}
|
||||
|
||||
this.$selection.find('.select2-selection__rendered').append($selections);
|
||||
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||
|
||||
Utils.appendMany($rendered, $selections);
|
||||
};
|
||||
|
||||
return MultipleSelection;
|
||||
@ -3015,7 +3034,7 @@ S2.define('select2/data/select',[
|
||||
};
|
||||
|
||||
SelectAdapter.prototype.addOptions = function ($options) {
|
||||
this.$element.append($options);
|
||||
Utils.appendMany(this.$element, $options);
|
||||
};
|
||||
|
||||
SelectAdapter.prototype.option = function (data) {
|
||||
@ -3185,7 +3204,7 @@ S2.define('select2/data/array',[
|
||||
return self.item($(this)).id;
|
||||
}).get();
|
||||
|
||||
var $options = $();
|
||||
var $options = [];
|
||||
|
||||
// Filter out all items except for the one passed in the argument
|
||||
function onlyItem (item) {
|
||||
@ -3216,10 +3235,10 @@ S2.define('select2/data/array',[
|
||||
if (item.children) {
|
||||
var $children = this.convertToOptions(item.children);
|
||||
|
||||
$option.append($children);
|
||||
Utils.appendMany($option, $children);
|
||||
}
|
||||
|
||||
$options = $options.add($option);
|
||||
$options.push($option);
|
||||
}
|
||||
|
||||
return $options;
|
||||
@ -3403,7 +3422,7 @@ S2.define('select2/data/tags',[
|
||||
var $option = self.option(tag);
|
||||
$option.attr('data-select2-tag', true);
|
||||
|
||||
self.addOptions($option);
|
||||
self.addOptions([$option]);
|
||||
|
||||
self.insertTag(data, tag);
|
||||
}
|
||||
@ -4079,9 +4098,16 @@ S2.define('select2/dropdown/attachBody',[
|
||||
AttachBody.prototype._resizeDropdown = function () {
|
||||
this.$dropdownContainer.width();
|
||||
|
||||
this.$dropdown.css({
|
||||
var css = {
|
||||
width: this.$container.outerWidth(false) + 'px'
|
||||
});
|
||||
};
|
||||
|
||||
if (this.options.get('dropdownAutoWidth')) {
|
||||
css.minWidth = css.width;
|
||||
css.width = 'auto';
|
||||
}
|
||||
|
||||
this.$dropdown.css(css);
|
||||
};
|
||||
|
||||
AttachBody.prototype._showDropdown = function (decorated) {
|
||||
@ -4409,6 +4435,19 @@ S2.define('select2/defaults',[
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
options.dropdownCssClass != null ||
|
||||
options.dropdownCss != null ||
|
||||
options.adaptDropdownCssClass != null
|
||||
) {
|
||||
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
||||
|
||||
options.dropdownAdapter = Utils.Decorate(
|
||||
options.dropdownAdapter,
|
||||
DropdownCSS
|
||||
);
|
||||
}
|
||||
|
||||
options.dropdownAdapter = Utils.Decorate(
|
||||
options.dropdownAdapter,
|
||||
AttachBody
|
||||
@ -4444,6 +4483,19 @@ S2.define('select2/defaults',[
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
options.containerCssClass != null ||
|
||||
options.containerCss != null ||
|
||||
options.adaptContainerCssClass != null
|
||||
) {
|
||||
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
||||
|
||||
options.selectionAdapter = Utils.Decorate(
|
||||
options.selectionAdapter,
|
||||
ContainerCSS
|
||||
);
|
||||
}
|
||||
|
||||
options.selectionAdapter = Utils.Decorate(
|
||||
options.selectionAdapter,
|
||||
EventRelay
|
||||
@ -4574,6 +4626,7 @@ S2.define('select2/defaults',[
|
||||
amdLanguageBase: './i18n/',
|
||||
closeOnSelect: true,
|
||||
debug: false,
|
||||
dropdownAutoWidth: false,
|
||||
escapeMarkup: Utils.escapeMarkup,
|
||||
language: EnglishTranslation,
|
||||
matcher: matcher,
|
||||
@ -5264,47 +5317,162 @@ S2.define('select2/core',[
|
||||
return Select2;
|
||||
});
|
||||
|
||||
S2.define('select2/compat/matcher',[
|
||||
S2.define('select2/compat/utils',[
|
||||
'jquery'
|
||||
], function ($) {
|
||||
function oldMatcher (matcher) {
|
||||
function wrappedMatcher (params, data) {
|
||||
var match = $.extend(true, {}, data);
|
||||
function syncCssClasses ($dest, $src, adapter) {
|
||||
var classes, replacements = [], adapted;
|
||||
|
||||
if (params.term == null || $.trim(params.term) === '') {
|
||||
return match;
|
||||
}
|
||||
classes = $.trim($dest.attr('class'));
|
||||
|
||||
if (data.children) {
|
||||
for (var c = data.children.length - 1; c >= 0; c--) {
|
||||
var child = data.children[c];
|
||||
if (classes) {
|
||||
classes = '' + classes; // for IE which returns object
|
||||
|
||||
// Check if the child object matches
|
||||
// The old matcher returned a boolean true or false
|
||||
var doesMatch = matcher(params.term, child.text, child);
|
||||
|
||||
// If the child didn't match, pop it off
|
||||
if (!doesMatch) {
|
||||
match.children.splice(c, 1);
|
||||
}
|
||||
$(classes.split(/\s+/)).each(function () {
|
||||
// Save all Select2 classes
|
||||
if (this.indexOf('select2-') === 0) {
|
||||
replacements.push(this);
|
||||
}
|
||||
|
||||
if (match.children.length > 0) {
|
||||
return match;
|
||||
}
|
||||
}
|
||||
|
||||
if (matcher(params.term, data.text, data)) {
|
||||
return match;
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
return wrappedMatcher;
|
||||
classes = $.trim($src.attr('class'));
|
||||
|
||||
if (classes) {
|
||||
classes = '' + classes; // for IE which returns object
|
||||
|
||||
$(classes.split(/\s+/)).each(function () {
|
||||
// Only adapt non-Select2 classes
|
||||
if (this.indexOf('select2-') !== 0) {
|
||||
adapted = adapter(this);
|
||||
|
||||
if (adapted != null) {
|
||||
replacements.push(adapted);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$dest.attr('class', replacements.join(' '));
|
||||
}
|
||||
|
||||
return oldMatcher;
|
||||
return {
|
||||
syncCssClasses: syncCssClasses
|
||||
};
|
||||
});
|
||||
|
||||
S2.define('select2/compat/containerCss',[
|
||||
'jquery',
|
||||
'./utils'
|
||||
], function ($, CompatUtils) {
|
||||
// No-op CSS adapter that discards all classes by default
|
||||
function _containerAdapter (clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function ContainerCSS () { }
|
||||
|
||||
ContainerCSS.prototype.render = function (decorated) {
|
||||
var $container = decorated.call(this);
|
||||
|
||||
var containerCssClass = this.options.get('containerCssClass') || '';
|
||||
|
||||
if ($.isFunction(containerCssClass)) {
|
||||
containerCssClass = containerCssClass(this.$element);
|
||||
}
|
||||
|
||||
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
||||
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
||||
|
||||
if (containerCssClass.indexOf(':all:') !== -1) {
|
||||
containerCssClass = containerCssClass.replace(':all', '');
|
||||
|
||||
var _cssAdapter = containerCssAdapter;
|
||||
|
||||
containerCssAdapter = function (clazz) {
|
||||
var adapted = _cssAdapter(clazz);
|
||||
|
||||
if (adapted != null) {
|
||||
// Append the old one along with the adapted one
|
||||
return adapted + ' ' + clazz;
|
||||
}
|
||||
|
||||
return clazz;
|
||||
};
|
||||
}
|
||||
|
||||
var containerCss = this.options.get('containerCss') || {};
|
||||
|
||||
if ($.isFunction(containerCss)) {
|
||||
containerCss = containerCss(this.$element);
|
||||
}
|
||||
|
||||
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
||||
|
||||
$container.css(containerCss);
|
||||
$container.addClass(containerCssClass);
|
||||
|
||||
return $container;
|
||||
};
|
||||
|
||||
return ContainerCSS;
|
||||
});
|
||||
|
||||
S2.define('select2/compat/dropdownCss',[
|
||||
'jquery',
|
||||
'./utils'
|
||||
], function ($, CompatUtils) {
|
||||
// No-op CSS adapter that discards all classes by default
|
||||
function _dropdownAdapter (clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function DropdownCSS () { }
|
||||
|
||||
DropdownCSS.prototype.render = function (decorated) {
|
||||
var $dropdown = decorated.call(this);
|
||||
|
||||
var dropdownCssClass = this.options.get('dropdownCssClass') || '';
|
||||
|
||||
if ($.isFunction(dropdownCssClass)) {
|
||||
dropdownCssClass = dropdownCssClass(this.$element);
|
||||
}
|
||||
|
||||
var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
|
||||
dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
|
||||
|
||||
if (dropdownCssClass.indexOf(':all:') !== -1) {
|
||||
dropdownCssClass = dropdownCssClass.replace(':all', '');
|
||||
|
||||
var _cssAdapter = dropdownCssAdapter;
|
||||
|
||||
dropdownCssAdapter = function (clazz) {
|
||||
var adapted = _cssAdapter(clazz);
|
||||
|
||||
if (adapted != null) {
|
||||
// Append the old one along with the adapted one
|
||||
return adapted + ' ' + clazz;
|
||||
}
|
||||
|
||||
return clazz;
|
||||
};
|
||||
}
|
||||
|
||||
var dropdownCss = this.options.get('dropdownCss') || {};
|
||||
|
||||
if ($.isFunction(dropdownCss)) {
|
||||
dropdownCss = dropdownCss(this.$element);
|
||||
}
|
||||
|
||||
CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
|
||||
|
||||
$dropdown.css(dropdownCss);
|
||||
$dropdown.addClass(dropdownCssClass);
|
||||
|
||||
return $dropdown;
|
||||
};
|
||||
|
||||
return DropdownCSS;
|
||||
});
|
||||
|
||||
S2.define('select2/compat/initSelection',[
|
||||
@ -5468,8 +5636,8 @@ S2.define('select2/compat/inputData',[
|
||||
};
|
||||
|
||||
InputData.prototype.addOptions = function (_, $options) {
|
||||
var options = $.map($options, function (option) {
|
||||
return $.data(option, 'data');
|
||||
var options = $.map($options, function ($option) {
|
||||
return $.data($option[0], 'data');
|
||||
});
|
||||
|
||||
this._currentData.push.apply(this._currentData, options);
|
||||
@ -5478,6 +5646,49 @@ S2.define('select2/compat/inputData',[
|
||||
return InputData;
|
||||
});
|
||||
|
||||
S2.define('select2/compat/matcher',[
|
||||
'jquery'
|
||||
], function ($) {
|
||||
function oldMatcher (matcher) {
|
||||
function wrappedMatcher (params, data) {
|
||||
var match = $.extend(true, {}, data);
|
||||
|
||||
if (params.term == null || $.trim(params.term) === '') {
|
||||
return match;
|
||||
}
|
||||
|
||||
if (data.children) {
|
||||
for (var c = data.children.length - 1; c >= 0; c--) {
|
||||
var child = data.children[c];
|
||||
|
||||
// Check if the child object matches
|
||||
// The old matcher returned a boolean true or false
|
||||
var doesMatch = matcher(params.term, child.text, child);
|
||||
|
||||
// If the child didn't match, pop it off
|
||||
if (!doesMatch) {
|
||||
match.children.splice(c, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (match.children.length > 0) {
|
||||
return match;
|
||||
}
|
||||
}
|
||||
|
||||
if (matcher(params.term, data.text, data)) {
|
||||
return match;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return wrappedMatcher;
|
||||
}
|
||||
|
||||
return oldMatcher;
|
||||
});
|
||||
|
||||
S2.define('select2/compat/query',[
|
||||
|
||||
], function () {
|
||||
|
6
dist/js/select2.full.min.js
vendored
6
dist/js/select2.full.min.js
vendored
File diff suppressed because one or more lines are too long
75
dist/js/select2.js
vendored
75
dist/js/select2.js
vendored
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Select2 4.0.0-rc.2
|
||||
* Select2 4.0.0
|
||||
* https://select2.github.io
|
||||
*
|
||||
* Released under the MIT license
|
||||
@ -714,6 +714,23 @@ S2.define('select2/utils',[
|
||||
});
|
||||
};
|
||||
|
||||
// Append an array of jQuery nodes to a given element.
|
||||
Utils.appendMany = function ($element, $nodes) {
|
||||
// jQuery 1.7.x does not support $.fn.append() with an array
|
||||
// Fall back to a jQuery object collection using $.fn.add()
|
||||
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
||||
var $jqNodes = $();
|
||||
|
||||
$.map($nodes, function (node) {
|
||||
$jqNodes = $jqNodes.add(node);
|
||||
});
|
||||
|
||||
$nodes = $jqNodes;
|
||||
}
|
||||
|
||||
$element.append($nodes);
|
||||
};
|
||||
|
||||
return Utils;
|
||||
});
|
||||
|
||||
@ -1565,7 +1582,7 @@ S2.define('select2/selection/multiple',[
|
||||
return;
|
||||
}
|
||||
|
||||
var $selections = $();
|
||||
var $selections = [];
|
||||
|
||||
for (var d = 0; d < data.length; d++) {
|
||||
var selection = data[d];
|
||||
@ -1578,10 +1595,12 @@ S2.define('select2/selection/multiple',[
|
||||
|
||||
$selection.data('data', selection);
|
||||
|
||||
$selections = $selections.add($selection);
|
||||
$selections.push($selection);
|
||||
}
|
||||
|
||||
this.$selection.find('.select2-selection__rendered').append($selections);
|
||||
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||
|
||||
Utils.appendMany($rendered, $selections);
|
||||
};
|
||||
|
||||
return MultipleSelection;
|
||||
@ -3015,7 +3034,7 @@ S2.define('select2/data/select',[
|
||||
};
|
||||
|
||||
SelectAdapter.prototype.addOptions = function ($options) {
|
||||
this.$element.append($options);
|
||||
Utils.appendMany(this.$element, $options);
|
||||
};
|
||||
|
||||
SelectAdapter.prototype.option = function (data) {
|
||||
@ -3185,7 +3204,7 @@ S2.define('select2/data/array',[
|
||||
return self.item($(this)).id;
|
||||
}).get();
|
||||
|
||||
var $options = $();
|
||||
var $options = [];
|
||||
|
||||
// Filter out all items except for the one passed in the argument
|
||||
function onlyItem (item) {
|
||||
@ -3216,10 +3235,10 @@ S2.define('select2/data/array',[
|
||||
if (item.children) {
|
||||
var $children = this.convertToOptions(item.children);
|
||||
|
||||
$option.append($children);
|
||||
Utils.appendMany($option, $children);
|
||||
}
|
||||
|
||||
$options = $options.add($option);
|
||||
$options.push($option);
|
||||
}
|
||||
|
||||
return $options;
|
||||
@ -3403,7 +3422,7 @@ S2.define('select2/data/tags',[
|
||||
var $option = self.option(tag);
|
||||
$option.attr('data-select2-tag', true);
|
||||
|
||||
self.addOptions($option);
|
||||
self.addOptions([$option]);
|
||||
|
||||
self.insertTag(data, tag);
|
||||
}
|
||||
@ -4079,9 +4098,16 @@ S2.define('select2/dropdown/attachBody',[
|
||||
AttachBody.prototype._resizeDropdown = function () {
|
||||
this.$dropdownContainer.width();
|
||||
|
||||
this.$dropdown.css({
|
||||
var css = {
|
||||
width: this.$container.outerWidth(false) + 'px'
|
||||
});
|
||||
};
|
||||
|
||||
if (this.options.get('dropdownAutoWidth')) {
|
||||
css.minWidth = css.width;
|
||||
css.width = 'auto';
|
||||
}
|
||||
|
||||
this.$dropdown.css(css);
|
||||
};
|
||||
|
||||
AttachBody.prototype._showDropdown = function (decorated) {
|
||||
@ -4409,6 +4435,19 @@ S2.define('select2/defaults',[
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
options.dropdownCssClass != null ||
|
||||
options.dropdownCss != null ||
|
||||
options.adaptDropdownCssClass != null
|
||||
) {
|
||||
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
||||
|
||||
options.dropdownAdapter = Utils.Decorate(
|
||||
options.dropdownAdapter,
|
||||
DropdownCSS
|
||||
);
|
||||
}
|
||||
|
||||
options.dropdownAdapter = Utils.Decorate(
|
||||
options.dropdownAdapter,
|
||||
AttachBody
|
||||
@ -4444,6 +4483,19 @@ S2.define('select2/defaults',[
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
options.containerCssClass != null ||
|
||||
options.containerCss != null ||
|
||||
options.adaptContainerCssClass != null
|
||||
) {
|
||||
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
||||
|
||||
options.selectionAdapter = Utils.Decorate(
|
||||
options.selectionAdapter,
|
||||
ContainerCSS
|
||||
);
|
||||
}
|
||||
|
||||
options.selectionAdapter = Utils.Decorate(
|
||||
options.selectionAdapter,
|
||||
EventRelay
|
||||
@ -4574,6 +4626,7 @@ S2.define('select2/defaults',[
|
||||
amdLanguageBase: './i18n/',
|
||||
closeOnSelect: true,
|
||||
debug: false,
|
||||
dropdownAutoWidth: false,
|
||||
escapeMarkup: Utils.escapeMarkup,
|
||||
language: EnglishTranslation,
|
||||
matcher: matcher,
|
||||
|
4
dist/js/select2.min.js
vendored
4
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
@ -149,7 +149,7 @@ slug: announcements-4.0
|
||||
<p>
|
||||
In Select2 4.0, the <code><select></code> element supports all core
|
||||
options, and support for the old
|
||||
<code><input type="hidden" /></code> has been removed. This means
|
||||
<code><input type="hidden" /></code> has been deprecated. This means
|
||||
that if you previously declared an AJAX field with some pre-selected
|
||||
options that looked like...
|
||||
</p>
|
||||
@ -159,7 +159,7 @@ slug: announcements-4.0
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Will need to be recreated as a <code><select></code> element with
|
||||
It will need to be recreated as a <code><select></code> element with
|
||||
some <code><option></code> tags that have <code>value</code>
|
||||
attributes that match the old value.
|
||||
</p>
|
||||
@ -207,6 +207,57 @@ slug: announcements-4.0
|
||||
matcher function.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
So if your old code used a matcher that only displayed options if they
|
||||
started with the term that was entered, it would look something like...
|
||||
</p>
|
||||
|
||||
<pre class="prettyprint linenums">
|
||||
function matchStart (term, text) {
|
||||
if (text.toUpperCase().indexOf(term.toUpperCase()) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$("select").select2({
|
||||
matcher: matchStart
|
||||
})
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Then in Select2 4.0, you would need to wrap the <code>matchStart</code>
|
||||
method (or the name of the matcher you created) with a
|
||||
<code>oldMatcher</code> method that we have created.
|
||||
</p>
|
||||
|
||||
<pre class="prettyprint linenums">
|
||||
function matchStart (term, text) {
|
||||
if (text.toUpperCase().indexOf(term.toUpperCase()) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$.fn.select2.amd.require(['select2/compat/matcher'], function (oldMatcher) {
|
||||
$("select").select2({
|
||||
matcher: oldMatcher(matchStart)
|
||||
})
|
||||
});
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
This will work for any matchers that only took in the search term and the
|
||||
text of the option as parameters. If your matcher relied on the third
|
||||
parameter containing the jQuery element representing the original
|
||||
<code><option></code> tag, then you may need to slightly change
|
||||
your matcher to expect the full JavaScript data object being passed in
|
||||
instead. You can still retrieve the jQuery element from the data object
|
||||
using the <code>data.element</code> property.
|
||||
</p>
|
||||
|
||||
<h2 id="flexible-placeholders">More flexible placeholders</h2>
|
||||
|
||||
<p>
|
||||
@ -255,9 +306,9 @@ $("select").select2({
|
||||
|
||||
<p>
|
||||
And Select2 will automatically display the placeholder when the value of
|
||||
the select is <code>-1</code>, which it is by default. This does not break
|
||||
the old functionality of Select2 where the placeholder option was blank by
|
||||
default.
|
||||
the select is <code>-1</code>, which it will be by default. This does not
|
||||
break the old functionality of Select2 where the placeholder option was
|
||||
blank by default.
|
||||
</p>
|
||||
|
||||
<h2 id="value-ordering">Display reflects the actual order of the values</h2>
|
||||
|
@ -17,7 +17,7 @@ slug: home
|
||||
</a>
|
||||
</p>
|
||||
<p class="version">
|
||||
Version 4.0.0<em>-rc.2</em>
|
||||
Version 4.0.0
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
@ -61,8 +61,8 @@ slug: home
|
||||
</p>
|
||||
|
||||
<pre class="code prettyprint">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/css/select2.min.css" rel="stylesheet" />
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0-rc.2/js/select2.min.js"></script>
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.min.css" rel="stylesheet" />
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js"></script>
|
||||
</pre>
|
||||
|
||||
<div class="alert alert-info">
|
||||
|
@ -30,7 +30,7 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/js/select2.js",
|
||||
"version": "4.0.0-rc.2",
|
||||
"version": "4.0.0",
|
||||
"jspm": {
|
||||
"main": "js/select2",
|
||||
"directories": {
|
||||
|
@ -11,7 +11,7 @@
|
||||
"tag",
|
||||
"tagging"
|
||||
],
|
||||
"version": "4.0.0-rc.2",
|
||||
"version": "4.0.0",
|
||||
"author": {
|
||||
"name": "Kevin Brown",
|
||||
"url": "https://github.com/kevin-brown"
|
||||
|
56
src/js/select2/compat/containerCss.js
vendored
Normal file
56
src/js/select2/compat/containerCss.js
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
define([
|
||||
'jquery',
|
||||
'./utils'
|
||||
], function ($, CompatUtils) {
|
||||
// No-op CSS adapter that discards all classes by default
|
||||
function _containerAdapter (clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function ContainerCSS () { }
|
||||
|
||||
ContainerCSS.prototype.render = function (decorated) {
|
||||
var $container = decorated.call(this);
|
||||
|
||||
var containerCssClass = this.options.get('containerCssClass') || '';
|
||||
|
||||
if ($.isFunction(containerCssClass)) {
|
||||
containerCssClass = containerCssClass(this.$element);
|
||||
}
|
||||
|
||||
var containerCssAdapter = this.options.get('adaptContainerCssClass');
|
||||
containerCssAdapter = containerCssAdapter || _containerAdapter;
|
||||
|
||||
if (containerCssClass.indexOf(':all:') !== -1) {
|
||||
containerCssClass = containerCssClass.replace(':all', '');
|
||||
|
||||
var _cssAdapter = containerCssAdapter;
|
||||
|
||||
containerCssAdapter = function (clazz) {
|
||||
var adapted = _cssAdapter(clazz);
|
||||
|
||||
if (adapted != null) {
|
||||
// Append the old one along with the adapted one
|
||||
return adapted + ' ' + clazz;
|
||||
}
|
||||
|
||||
return clazz;
|
||||
};
|
||||
}
|
||||
|
||||
var containerCss = this.options.get('containerCss') || {};
|
||||
|
||||
if ($.isFunction(containerCss)) {
|
||||
containerCss = containerCss(this.$element);
|
||||
}
|
||||
|
||||
CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);
|
||||
|
||||
$container.css(containerCss);
|
||||
$container.addClass(containerCssClass);
|
||||
|
||||
return $container;
|
||||
};
|
||||
|
||||
return ContainerCSS;
|
||||
});
|
56
src/js/select2/compat/dropdownCss.js
vendored
Normal file
56
src/js/select2/compat/dropdownCss.js
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
define([
|
||||
'jquery',
|
||||
'./utils'
|
||||
], function ($, CompatUtils) {
|
||||
// No-op CSS adapter that discards all classes by default
|
||||
function _dropdownAdapter (clazz) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function DropdownCSS () { }
|
||||
|
||||
DropdownCSS.prototype.render = function (decorated) {
|
||||
var $dropdown = decorated.call(this);
|
||||
|
||||
var dropdownCssClass = this.options.get('dropdownCssClass') || '';
|
||||
|
||||
if ($.isFunction(dropdownCssClass)) {
|
||||
dropdownCssClass = dropdownCssClass(this.$element);
|
||||
}
|
||||
|
||||
var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');
|
||||
dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;
|
||||
|
||||
if (dropdownCssClass.indexOf(':all:') !== -1) {
|
||||
dropdownCssClass = dropdownCssClass.replace(':all', '');
|
||||
|
||||
var _cssAdapter = dropdownCssAdapter;
|
||||
|
||||
dropdownCssAdapter = function (clazz) {
|
||||
var adapted = _cssAdapter(clazz);
|
||||
|
||||
if (adapted != null) {
|
||||
// Append the old one along with the adapted one
|
||||
return adapted + ' ' + clazz;
|
||||
}
|
||||
|
||||
return clazz;
|
||||
};
|
||||
}
|
||||
|
||||
var dropdownCss = this.options.get('dropdownCss') || {};
|
||||
|
||||
if ($.isFunction(dropdownCss)) {
|
||||
dropdownCss = dropdownCss(this.$element);
|
||||
}
|
||||
|
||||
CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);
|
||||
|
||||
$dropdown.css(dropdownCss);
|
||||
$dropdown.addClass(dropdownCssClass);
|
||||
|
||||
return $dropdown;
|
||||
};
|
||||
|
||||
return DropdownCSS;
|
||||
});
|
4
src/js/select2/compat/inputData.js
vendored
4
src/js/select2/compat/inputData.js
vendored
@ -116,8 +116,8 @@ define([
|
||||
};
|
||||
|
||||
InputData.prototype.addOptions = function (_, $options) {
|
||||
var options = $.map($options, function (option) {
|
||||
return $.data(option, 'data');
|
||||
var options = $.map($options, function ($option) {
|
||||
return $.data($option[0], 'data');
|
||||
});
|
||||
|
||||
this._currentData.push.apply(this._currentData, options);
|
||||
|
43
src/js/select2/compat/utils.js
vendored
Normal file
43
src/js/select2/compat/utils.js
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
define([
|
||||
'jquery'
|
||||
], function ($) {
|
||||
function syncCssClasses ($dest, $src, adapter) {
|
||||
var classes, replacements = [], adapted;
|
||||
|
||||
classes = $.trim($dest.attr('class'));
|
||||
|
||||
if (classes) {
|
||||
classes = '' + classes; // for IE which returns object
|
||||
|
||||
$(classes.split(/\s+/)).each(function () {
|
||||
// Save all Select2 classes
|
||||
if (this.indexOf('select2-') === 0) {
|
||||
replacements.push(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
classes = $.trim($src.attr('class'));
|
||||
|
||||
if (classes) {
|
||||
classes = '' + classes; // for IE which returns object
|
||||
|
||||
$(classes.split(/\s+/)).each(function () {
|
||||
// Only adapt non-Select2 classes
|
||||
if (this.indexOf('select2-') !== 0) {
|
||||
adapted = adapter(this);
|
||||
|
||||
if (adapted != null) {
|
||||
replacements.push(adapted);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$dest.attr('class', replacements.join(' '));
|
||||
}
|
||||
|
||||
return {
|
||||
syncCssClasses: syncCssClasses
|
||||
};
|
||||
});
|
6
src/js/select2/data/array.js
vendored
6
src/js/select2/data/array.js
vendored
@ -35,7 +35,7 @@ define([
|
||||
return self.item($(this)).id;
|
||||
}).get();
|
||||
|
||||
var $options = $();
|
||||
var $options = [];
|
||||
|
||||
// Filter out all items except for the one passed in the argument
|
||||
function onlyItem (item) {
|
||||
@ -66,10 +66,10 @@ define([
|
||||
if (item.children) {
|
||||
var $children = this.convertToOptions(item.children);
|
||||
|
||||
$option.append($children);
|
||||
Utils.appendMany($option, $children);
|
||||
}
|
||||
|
||||
$options = $options.add($option);
|
||||
$options.push($option);
|
||||
}
|
||||
|
||||
return $options;
|
||||
|
2
src/js/select2/data/select.js
vendored
2
src/js/select2/data/select.js
vendored
@ -151,7 +151,7 @@ define([
|
||||
};
|
||||
|
||||
SelectAdapter.prototype.addOptions = function ($options) {
|
||||
this.$element.append($options);
|
||||
Utils.appendMany(this.$element, $options);
|
||||
};
|
||||
|
||||
SelectAdapter.prototype.option = function (data) {
|
||||
|
2
src/js/select2/data/tags.js
vendored
2
src/js/select2/data/tags.js
vendored
@ -71,7 +71,7 @@ define([
|
||||
var $option = self.option(tag);
|
||||
$option.attr('data-select2-tag', true);
|
||||
|
||||
self.addOptions($option);
|
||||
self.addOptions([$option]);
|
||||
|
||||
self.insertTag(data, tag);
|
||||
}
|
||||
|
27
src/js/select2/defaults.js
vendored
27
src/js/select2/defaults.js
vendored
@ -165,6 +165,19 @@ define([
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
options.dropdownCssClass != null ||
|
||||
options.dropdownCss != null ||
|
||||
options.adaptDropdownCssClass != null
|
||||
) {
|
||||
var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');
|
||||
|
||||
options.dropdownAdapter = Utils.Decorate(
|
||||
options.dropdownAdapter,
|
||||
DropdownCSS
|
||||
);
|
||||
}
|
||||
|
||||
options.dropdownAdapter = Utils.Decorate(
|
||||
options.dropdownAdapter,
|
||||
AttachBody
|
||||
@ -200,6 +213,19 @@ define([
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
options.containerCssClass != null ||
|
||||
options.containerCss != null ||
|
||||
options.adaptContainerCssClass != null
|
||||
) {
|
||||
var ContainerCSS = require(options.amdBase + 'compat/containerCss');
|
||||
|
||||
options.selectionAdapter = Utils.Decorate(
|
||||
options.selectionAdapter,
|
||||
ContainerCSS
|
||||
);
|
||||
}
|
||||
|
||||
options.selectionAdapter = Utils.Decorate(
|
||||
options.selectionAdapter,
|
||||
EventRelay
|
||||
@ -330,6 +356,7 @@ define([
|
||||
amdLanguageBase: './i18n/',
|
||||
closeOnSelect: true,
|
||||
debug: false,
|
||||
dropdownAutoWidth: false,
|
||||
escapeMarkup: Utils.escapeMarkup,
|
||||
language: EnglishTranslation,
|
||||
matcher: matcher,
|
||||
|
11
src/js/select2/dropdown/attachBody.js
vendored
11
src/js/select2/dropdown/attachBody.js
vendored
@ -179,9 +179,16 @@ define([
|
||||
AttachBody.prototype._resizeDropdown = function () {
|
||||
this.$dropdownContainer.width();
|
||||
|
||||
this.$dropdown.css({
|
||||
var css = {
|
||||
width: this.$container.outerWidth(false) + 'px'
|
||||
});
|
||||
};
|
||||
|
||||
if (this.options.get('dropdownAutoWidth')) {
|
||||
css.minWidth = css.width;
|
||||
css.width = 'auto';
|
||||
}
|
||||
|
||||
this.$dropdown.css(css);
|
||||
};
|
||||
|
||||
AttachBody.prototype._showDropdown = function (decorated) {
|
||||
|
4
src/js/select2/i18n/gl.js
vendored
4
src/js/select2/i18n/gl.js
vendored
@ -4,7 +4,7 @@ define(function () {
|
||||
inputTooLong: function (args) {
|
||||
var overChars = args.input.length - args.maximum;
|
||||
|
||||
var message = 'Engada ';
|
||||
var message = 'Elimine ';
|
||||
|
||||
if (overChars === 1) {
|
||||
message += 'un carácter';
|
||||
@ -17,7 +17,7 @@ define(function () {
|
||||
inputTooShort: function (args) {
|
||||
var remainingChars = args.minimum - args.input.length;
|
||||
|
||||
var message = 'Elimine ';
|
||||
var message = 'Engada ';
|
||||
|
||||
if (remainingChars === 1) {
|
||||
message += 'un carácter';
|
||||
|
3
src/js/select2/i18n/ru.js
vendored
3
src/js/select2/i18n/ru.js
vendored
@ -14,6 +14,9 @@ define(function () {
|
||||
}
|
||||
|
||||
return {
|
||||
errorLoading: function () {
|
||||
return 'Невозможно загрузить результаты';
|
||||
},
|
||||
inputTooLong: function (args) {
|
||||
var overChars = args.input.length - args.maximum;
|
||||
|
||||
|
8
src/js/select2/selection/multiple.js
vendored
8
src/js/select2/selection/multiple.js
vendored
@ -76,7 +76,7 @@ define([
|
||||
return;
|
||||
}
|
||||
|
||||
var $selections = $();
|
||||
var $selections = [];
|
||||
|
||||
for (var d = 0; d < data.length; d++) {
|
||||
var selection = data[d];
|
||||
@ -89,10 +89,12 @@ define([
|
||||
|
||||
$selection.data('data', selection);
|
||||
|
||||
$selections = $selections.add($selection);
|
||||
$selections.push($selection);
|
||||
}
|
||||
|
||||
this.$selection.find('.select2-selection__rendered').append($selections);
|
||||
var $rendered = this.$selection.find('.select2-selection__rendered');
|
||||
|
||||
Utils.appendMany($rendered, $selections);
|
||||
};
|
||||
|
||||
return MultipleSelection;
|
||||
|
17
src/js/select2/utils.js
vendored
17
src/js/select2/utils.js
vendored
@ -241,5 +241,22 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
// Append an array of jQuery nodes to a given element.
|
||||
Utils.appendMany = function ($element, $nodes) {
|
||||
// jQuery 1.7.x does not support $.fn.append() with an array
|
||||
// Fall back to a jQuery object collection using $.fn.add()
|
||||
if ($.fn.jquery.substr(0, 3) === '1.7') {
|
||||
var $jqNodes = $();
|
||||
|
||||
$.map($nodes, function (node) {
|
||||
$jqNodes = $jqNodes.add(node);
|
||||
});
|
||||
|
||||
$nodes = $jqNodes;
|
||||
}
|
||||
|
||||
$element.append($nodes);
|
||||
};
|
||||
|
||||
return Utils;
|
||||
});
|
||||
|
104
tests/dropdown/dropdownCss-tests.js
Normal file
104
tests/dropdown/dropdownCss-tests.js
Normal file
@ -0,0 +1,104 @@
|
||||
module('Dropdown - dropdownCssClass compatibility');
|
||||
|
||||
var $ = require('jquery');
|
||||
var Utils = require('select2/utils');
|
||||
var Options = require('select2/options');
|
||||
|
||||
var Dropdown = require('select2/dropdown');
|
||||
var DropdownCSS = Utils.Decorate(
|
||||
Dropdown,
|
||||
require('select2/compat/dropdownCss')
|
||||
);
|
||||
|
||||
test('all classes will be copied if :all: is used', function (assert) {
|
||||
var $element = $('<select class="test copy works"></select>');
|
||||
var options = new Options({
|
||||
dropdownCssClass: ':all:'
|
||||
});
|
||||
|
||||
var select = new DropdownCSS($element, options);
|
||||
var $dropdown = select.render();
|
||||
|
||||
assert.ok($dropdown.hasClass('test'));
|
||||
assert.ok($dropdown.hasClass('copy'));
|
||||
assert.ok($dropdown.hasClass('works'));
|
||||
assert.ok(!$dropdown.hasClass(':all:'));
|
||||
});
|
||||
|
||||
test(':all: can be used with other classes', function (assert) {
|
||||
var $element = $('<select class="test copy works"></select>');
|
||||
var options = new Options({
|
||||
dropdownCssClass: ':all: other'
|
||||
});
|
||||
|
||||
var select = new DropdownCSS($element, options);
|
||||
var $dropdown = select.render();
|
||||
|
||||
assert.ok($dropdown.hasClass('test'));
|
||||
assert.ok($dropdown.hasClass('copy'));
|
||||
assert.ok($dropdown.hasClass('works'));
|
||||
assert.ok($dropdown.hasClass('other'));
|
||||
assert.ok(!$dropdown.hasClass(':all:'));
|
||||
});
|
||||
|
||||
test('classes can be passed in as a string', function (assert) {
|
||||
var $element = $('<select class="test copy works"></select>');
|
||||
var options = new Options({
|
||||
dropdownCssClass: 'other'
|
||||
});
|
||||
|
||||
var select = new DropdownCSS($element, options);
|
||||
var $dropdown = select.render();
|
||||
|
||||
assert.ok($dropdown.hasClass('other'));
|
||||
});
|
||||
|
||||
test('a function can be used based on the element', function (assert){
|
||||
var $element = $('<select class="test"></select>');
|
||||
var options = new Options({
|
||||
dropdownCssClass: function ($element) {
|
||||
return 'function';
|
||||
}
|
||||
});
|
||||
|
||||
var select = new DropdownCSS($element, options);
|
||||
var $dropdown = select.render();
|
||||
|
||||
assert.ok($dropdown.hasClass('function'));
|
||||
assert.ok(!$dropdown.hasClass('test'));
|
||||
});
|
||||
|
||||
test(':all: works around custom adapters', function (assert) {
|
||||
var $element = $('<select class="test"></select>');
|
||||
var options = new Options({
|
||||
dropdownCssClass: ':all: something',
|
||||
adaptDropdownCssClass: function (clazz) {
|
||||
return clazz + '-modified';
|
||||
}
|
||||
});
|
||||
|
||||
var select = new DropdownCSS($element, options);
|
||||
var $dropdown = select.render();
|
||||
|
||||
assert.ok($dropdown.hasClass('something'));
|
||||
|
||||
assert.ok($dropdown.hasClass('test'));
|
||||
assert.ok($dropdown.hasClass('test-modified'));
|
||||
});
|
||||
|
||||
module('Dropdown - adaptDropdownCss compatibility');
|
||||
|
||||
test('only return when adapted', function (assert) {
|
||||
var $element = $('<select class="original"></select>');
|
||||
var options = new Options({
|
||||
adaptDropdownCssClass: function (clazz) {
|
||||
return 'modified';
|
||||
}
|
||||
});
|
||||
|
||||
var select = new DropdownCSS($element, options);
|
||||
var $dropdown = select.render();
|
||||
|
||||
assert.ok(!$dropdown.hasClass('original'));
|
||||
assert.ok($dropdown.hasClass('modified'));
|
||||
});
|
104
tests/selection/containerCss-tests.js
Normal file
104
tests/selection/containerCss-tests.js
Normal file
@ -0,0 +1,104 @@
|
||||
module('Dropdown - containerCssClass compatibility');
|
||||
|
||||
var $ = require('jquery');
|
||||
var Utils = require('select2/utils');
|
||||
var Options = require('select2/options');
|
||||
|
||||
var SingleSelection = require('select2/selection/single');
|
||||
var ContainerCSS = Utils.Decorate(
|
||||
SingleSelection,
|
||||
require('select2/compat/containerCss')
|
||||
);
|
||||
|
||||
test('all classes will be copied if :all: is used', function (assert) {
|
||||
var $element = $('<select class="test copy works"></select>');
|
||||
var options = new Options({
|
||||
containerCssClass: ':all:'
|
||||
});
|
||||
|
||||
var select = new ContainerCSS($element, options);
|
||||
var $container = select.render();
|
||||
|
||||
assert.ok($container.hasClass('test'));
|
||||
assert.ok($container.hasClass('copy'));
|
||||
assert.ok($container.hasClass('works'));
|
||||
assert.ok(!$container.hasClass(':all:'));
|
||||
});
|
||||
|
||||
test(':all: can be used with other classes', function (assert) {
|
||||
var $element = $('<select class="test copy works"></select>');
|
||||
var options = new Options({
|
||||
containerCssClass: ':all: other'
|
||||
});
|
||||
|
||||
var select = new ContainerCSS($element, options);
|
||||
var $container = select.render();
|
||||
|
||||
assert.ok($container.hasClass('test'));
|
||||
assert.ok($container.hasClass('copy'));
|
||||
assert.ok($container.hasClass('works'));
|
||||
assert.ok($container.hasClass('other'));
|
||||
assert.ok(!$container.hasClass(':all:'));
|
||||
});
|
||||
|
||||
test('classes can be passed in as a string', function (assert) {
|
||||
var $element = $('<select class="test copy works"></select>');
|
||||
var options = new Options({
|
||||
containerCssClass: 'other'
|
||||
});
|
||||
|
||||
var select = new ContainerCSS($element, options);
|
||||
var $container = select.render();
|
||||
|
||||
assert.ok($container.hasClass('other'));
|
||||
});
|
||||
|
||||
test('a function can be used based on the element', function (assert){
|
||||
var $element = $('<select class="test"></select>');
|
||||
var options = new Options({
|
||||
containerCssClass: function ($element) {
|
||||
return 'function';
|
||||
}
|
||||
});
|
||||
|
||||
var select = new ContainerCSS($element, options);
|
||||
var $container = select.render();
|
||||
|
||||
assert.ok($container.hasClass('function'));
|
||||
assert.ok(!$container.hasClass('test'));
|
||||
});
|
||||
|
||||
test(':all: works around custom adapters', function (assert) {
|
||||
var $element = $('<select class="test"></select>');
|
||||
var options = new Options({
|
||||
containerCssClass: ':all: something',
|
||||
adaptContainerCssClass: function (clazz) {
|
||||
return clazz + '-modified';
|
||||
}
|
||||
});
|
||||
|
||||
var select = new ContainerCSS($element, options);
|
||||
var $container = select.render();
|
||||
|
||||
assert.ok($container.hasClass('something'));
|
||||
|
||||
assert.ok($container.hasClass('test'));
|
||||
assert.ok($container.hasClass('test-modified'));
|
||||
});
|
||||
|
||||
module('Selection - adaptContainerCss compatibility');
|
||||
|
||||
test('only return when adapted', function (assert) {
|
||||
var $element = $('<select class="original"></select>');
|
||||
var options = new Options({
|
||||
adaptContainerCssClass: function (clazz) {
|
||||
return 'modified';
|
||||
}
|
||||
});
|
||||
|
||||
var select = new ContainerCSS($element, options);
|
||||
var $container = select.render();
|
||||
|
||||
assert.ok(!$container.hasClass('original'));
|
||||
assert.ok($container.hasClass('modified'));
|
||||
});
|
@ -66,6 +66,7 @@
|
||||
<script src="data/maximumSelectionLength-tests.js" type="text/javascript"></script>
|
||||
<script src="data/minimumInputLength-tests.js" type="text/javascript"></script>
|
||||
|
||||
<script src="dropdown/dropdownCss-tests.js" type="text/javascript"></script>
|
||||
<script src="dropdown/selectOnClose-tests.js" type="text/javascript"></script>
|
||||
<script src="dropdown/stopPropagation-tests.js" type="text/javascript"></script>
|
||||
|
||||
@ -75,6 +76,7 @@
|
||||
<script src="options/width-tests.js" type="text/javascript"></script>
|
||||
|
||||
<script src="selection/allowClear-tests.js" type="text/javascript"></script>
|
||||
<script src="selection/containerCss-tests.js" type="text/javascript"></script>
|
||||
<script src="selection/multiple-tests.js" type="text/javascript"></script>
|
||||
<script src="selection/placeholder-tests.js" type="text/javascript"></script>
|
||||
<script src="selection/single-tests.js" type="text/javascript"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user