select2-rails 3.4.7 → 3.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/javascripts/select2.js +134 -58
- data/app/assets/javascripts/select2_locale_bg.js +17 -0
- data/app/assets/javascripts/select2_locale_es.js +4 -4
- data/app/assets/javascripts/select2_locale_fa.js +17 -0
- data/app/assets/javascripts/select2_locale_pt-BR.js +2 -2
- data/app/assets/javascripts/select2_locale_pt-PT.js +2 -2
- data/app/assets/javascripts/select2_locale_th.js +17 -0
- data/app/assets/stylesheets/select2.css.scss +96 -139
- data/lib/select2-rails/source_file.rb +2 -2
- data/lib/select2-rails/version.rb +1 -1
- metadata +5 -3
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
/*
|
2
2
|
Copyright 2012 Igor Vaynberg
|
3
3
|
|
4
|
-
Version: 3.4.
|
4
|
+
Version: 3.4.2 Timestamp: Mon Aug 12 15:04:12 PDT 2013
|
5
5
|
|
6
6
|
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7
7
|
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
@@ -20,7 +20,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
20
20
|
*/
|
21
21
|
(function ($) {
|
22
22
|
if(typeof $.fn.each2 == "undefined") {
|
23
|
-
$.
|
23
|
+
$.extend($.fn, {
|
24
24
|
/*
|
25
25
|
* 4-10 times faster .each replacement
|
26
26
|
* use it carefully, as it overrides jQuery context of element on each iteration
|
@@ -96,12 +96,28 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
96
96
|
return k >= 112 && k <= 123;
|
97
97
|
}
|
98
98
|
},
|
99
|
-
MEASURE_SCROLLBAR_TEMPLATE = "<div class='select2-measure-scrollbar'></div>"
|
99
|
+
MEASURE_SCROLLBAR_TEMPLATE = "<div class='select2-measure-scrollbar'></div>",
|
100
|
+
|
101
|
+
DIACRITICS = {"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z"};
|
100
102
|
|
101
103
|
$document = $(document);
|
102
104
|
|
103
105
|
nextUid=(function() { var counter=1; return function() { return counter++; }; }());
|
104
106
|
|
107
|
+
|
108
|
+
function stripDiacritics(str) {
|
109
|
+
var ret, i, l, c;
|
110
|
+
|
111
|
+
if (!str || str.length < 1) return str;
|
112
|
+
|
113
|
+
ret = "";
|
114
|
+
for (i = 0, l = str.length; i < l; i++) {
|
115
|
+
c = str.charAt(i);
|
116
|
+
ret += DIACRITICS[c] || c;
|
117
|
+
}
|
118
|
+
return ret;
|
119
|
+
}
|
120
|
+
|
105
121
|
function indexOf(value, array) {
|
106
122
|
var i = 0, l = array.length;
|
107
123
|
for (; i < l; i = i + 1) {
|
@@ -343,7 +359,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
343
359
|
|
344
360
|
|
345
361
|
function markMatch(text, term, markup, escapeMarkup) {
|
346
|
-
var match=text.toUpperCase().indexOf(term.toUpperCase()),
|
362
|
+
var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),
|
347
363
|
tl=term.length;
|
348
364
|
|
349
365
|
if (match<0) {
|
@@ -392,7 +408,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
392
408
|
*/
|
393
409
|
function ajax(options) {
|
394
410
|
var timeout, // current scheduled but not yet executed request
|
395
|
-
requestSequence = 0, // sequence used to drop out-of-order responses
|
396
411
|
handler = null,
|
397
412
|
quietMillis = options.quietMillis || 100,
|
398
413
|
ajaxUrl = options.url,
|
@@ -401,9 +416,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
401
416
|
return function (query) {
|
402
417
|
window.clearTimeout(timeout);
|
403
418
|
timeout = window.setTimeout(function () {
|
404
|
-
|
405
|
-
var requestNumber = requestSequence, // this request's sequence number
|
406
|
-
data = options.data, // ajax data function
|
419
|
+
var data = options.data, // ajax data function
|
407
420
|
url = ajaxUrl, // ajax url string or function
|
408
421
|
transport = options.transport || $.fn.select2.ajaxDefaults.transport,
|
409
422
|
// deprecated - to be removed in 4.0 - use params instead
|
@@ -433,9 +446,6 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
433
446
|
dataType: options.dataType,
|
434
447
|
data: data,
|
435
448
|
success: function (data) {
|
436
|
-
if (requestNumber < requestSequence) {
|
437
|
-
return;
|
438
|
-
}
|
439
449
|
// TODO - replace query.page with query so users have access to term, page, etc.
|
440
450
|
var results = options.results(data, query.page);
|
441
451
|
query.callback(results);
|
@@ -668,6 +678,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
668
678
|
|
669
679
|
syncCssClasses(this.container, this.opts.element, this.opts.adaptContainerCssClass);
|
670
680
|
|
681
|
+
this.container.attr("style", opts.element.attr("style"));
|
671
682
|
this.container.css(evaluate(opts.containerCss));
|
672
683
|
this.container.addClass(evaluate(opts.containerCssClass));
|
673
684
|
|
@@ -684,9 +695,12 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
684
695
|
this.dropdown.addClass(evaluate(opts.dropdownCssClass));
|
685
696
|
this.dropdown.data("select2", this);
|
686
697
|
|
698
|
+
syncCssClasses(this.dropdown, this.opts.element, this.opts.adaptDropdownCssClass);
|
699
|
+
|
687
700
|
this.results = results = this.container.find(resultsSelector);
|
688
701
|
this.search = search = this.container.find("input.select2-input");
|
689
702
|
|
703
|
+
this.queryCount = 0;
|
690
704
|
this.resultsPage = 0;
|
691
705
|
this.context = null;
|
692
706
|
|
@@ -758,15 +772,19 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
758
772
|
// Calculate size of scrollbar
|
759
773
|
scrollBarDimensions = scrollBarDimensions || measureScrollbar();
|
760
774
|
|
761
|
-
this.autofocus = opts.element.prop("autofocus")
|
775
|
+
this.autofocus = opts.element.prop("autofocus");
|
762
776
|
opts.element.prop("autofocus", false);
|
763
777
|
if (this.autofocus) this.focus();
|
778
|
+
|
779
|
+
this.nextSearchTerm = undefined;
|
764
780
|
},
|
765
781
|
|
766
782
|
// abstract
|
767
783
|
destroy: function () {
|
768
784
|
var element=this.opts.element, select2 = element.data("select2");
|
769
785
|
|
786
|
+
this.close();
|
787
|
+
|
770
788
|
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
|
771
789
|
|
772
790
|
if (select2 !== undefined) {
|
@@ -944,7 +962,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
944
962
|
} else if ("tags" in opts) {
|
945
963
|
opts.query = tags(opts.tags);
|
946
964
|
if (opts.createSearchChoice === undefined) {
|
947
|
-
opts.createSearchChoice = function (term) { return {id: term, text: term}; };
|
965
|
+
opts.createSearchChoice = function (term) { return {id: $.trim(term), text: $.trim(term)}; };
|
948
966
|
}
|
949
967
|
if (opts.initSelection === undefined) {
|
950
968
|
opts.initSelection = function (element, callback) {
|
@@ -1075,12 +1093,16 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1075
1093
|
// abstract
|
1076
1094
|
enable: function(enabled) {
|
1077
1095
|
if (enabled === undefined) enabled = true;
|
1078
|
-
if (this._enabled === enabled) return
|
1096
|
+
if (this._enabled === enabled) return;
|
1079
1097
|
this._enabled = enabled;
|
1080
1098
|
|
1081
1099
|
this.opts.element.prop("disabled", !enabled);
|
1082
1100
|
this.enableInterface();
|
1083
|
-
|
1101
|
+
},
|
1102
|
+
|
1103
|
+
// abstract
|
1104
|
+
disable: function() {
|
1105
|
+
this.enable(false);
|
1084
1106
|
},
|
1085
1107
|
|
1086
1108
|
// abstract
|
@@ -1244,7 +1266,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1244
1266
|
if (self.opts.selectOnBlur) {
|
1245
1267
|
self.selectHighlighted({noFocus: true});
|
1246
1268
|
}
|
1247
|
-
self.close();
|
1269
|
+
self.close({focus:false});
|
1248
1270
|
e.preventDefault();
|
1249
1271
|
e.stopPropagation();
|
1250
1272
|
}
|
@@ -1261,10 +1283,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1261
1283
|
this.dropdown.attr("id", "select2-drop");
|
1262
1284
|
|
1263
1285
|
// show the elements
|
1264
|
-
|
1265
|
-
|
1266
|
-
mask.css(maskCss).show();
|
1286
|
+
mask.show();
|
1267
1287
|
|
1288
|
+
this.positionDropdown();
|
1268
1289
|
this.dropdown.show();
|
1269
1290
|
this.positionDropdown();
|
1270
1291
|
|
@@ -1275,18 +1296,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1275
1296
|
var that = this;
|
1276
1297
|
this.container.parents().add(window).each(function () {
|
1277
1298
|
$(this).on(resize+" "+scroll+" "+orient, function (e) {
|
1278
|
-
var maskCss=_makeMaskCss();
|
1279
|
-
$("#select2-drop-mask").css(maskCss);
|
1280
1299
|
that.positionDropdown();
|
1281
1300
|
});
|
1282
1301
|
});
|
1283
1302
|
|
1284
|
-
|
1285
|
-
return {
|
1286
|
-
width : Math.max(document.documentElement.scrollWidth, $(window).width()),
|
1287
|
-
height : Math.max(document.documentElement.scrollHeight, $(window).height())
|
1288
|
-
}
|
1289
|
-
}
|
1303
|
+
|
1290
1304
|
},
|
1291
1305
|
|
1292
1306
|
// abstract
|
@@ -1412,7 +1426,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1412
1426
|
if (index >= choices.length) index = choices.length - 1;
|
1413
1427
|
if (index < 0) index = 0;
|
1414
1428
|
|
1415
|
-
this.
|
1429
|
+
this.removeHighlight();
|
1416
1430
|
|
1417
1431
|
choice = $(choices[index]);
|
1418
1432
|
choice.addClass("select2-highlighted");
|
@@ -1425,6 +1439,10 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1425
1439
|
}
|
1426
1440
|
},
|
1427
1441
|
|
1442
|
+
removeHighlight: function() {
|
1443
|
+
this.results.find(".select2-highlighted").removeClass("select2-highlighted");
|
1444
|
+
},
|
1445
|
+
|
1428
1446
|
// abstract
|
1429
1447
|
countSelectableResults: function() {
|
1430
1448
|
return this.findHighlightableChoices().length;
|
@@ -1437,8 +1455,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1437
1455
|
var choices = this.findHighlightableChoices();
|
1438
1456
|
this.highlight(choices.index(el));
|
1439
1457
|
} else if (el.length == 0) {
|
1440
|
-
// if we are over an unselectable item remove
|
1441
|
-
this.
|
1458
|
+
// if we are over an unselectable item remove all highlights
|
1459
|
+
this.removeHighlight();
|
1442
1460
|
}
|
1443
1461
|
},
|
1444
1462
|
|
@@ -1482,6 +1500,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1482
1500
|
self.positionDropdown();
|
1483
1501
|
self.resultsPage = page;
|
1484
1502
|
self.context = data.context;
|
1503
|
+
this.opts.element.trigger({ type: "select2-loaded", items: data });
|
1485
1504
|
})});
|
1486
1505
|
}
|
1487
1506
|
},
|
@@ -1505,7 +1524,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1505
1524
|
self = this,
|
1506
1525
|
input,
|
1507
1526
|
term = search.val(),
|
1508
|
-
lastTerm
|
1527
|
+
lastTerm = $.data(this.container, "select2-last-term"),
|
1528
|
+
// sequence number used to drop out-of-order responses
|
1529
|
+
queryNumber;
|
1509
1530
|
|
1510
1531
|
// prevent duplicate queries against the same term
|
1511
1532
|
if (initial !== true && lastTerm && equal(term, lastTerm)) return;
|
@@ -1527,6 +1548,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1527
1548
|
postRender();
|
1528
1549
|
}
|
1529
1550
|
|
1551
|
+
queryNumber = ++this.queryCount;
|
1552
|
+
|
1530
1553
|
var maxSelSize = this.getMaximumSelectionSize();
|
1531
1554
|
if (maxSelSize >=1) {
|
1532
1555
|
data = this.data();
|
@@ -1561,6 +1584,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1561
1584
|
|
1562
1585
|
search.addClass("select2-active");
|
1563
1586
|
|
1587
|
+
this.removeHighlight();
|
1588
|
+
|
1564
1589
|
// give the tokenizer a chance to pre-process the input
|
1565
1590
|
input = this.tokenize();
|
1566
1591
|
if (input != undefined && input != null) {
|
@@ -1578,6 +1603,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1578
1603
|
callback: this.bind(function (data) {
|
1579
1604
|
var def; // default choice
|
1580
1605
|
|
1606
|
+
// ignore old responses
|
1607
|
+
if (queryNumber != this.queryCount) {
|
1608
|
+
return;
|
1609
|
+
}
|
1610
|
+
|
1581
1611
|
// ignore a response if the select2 has been closed before it was received
|
1582
1612
|
if (!this.opened()) {
|
1583
1613
|
this.search.removeClass("select2-active");
|
@@ -1705,7 +1735,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1705
1735
|
attrs = style.split(';');
|
1706
1736
|
for (i = 0, l = attrs.length; i < l; i = i + 1) {
|
1707
1737
|
matches = attrs[i].replace(/\s/g, '')
|
1708
|
-
.match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
|
1738
|
+
.match(/[^-]width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);
|
1709
1739
|
if (matches !== null && matches.length >= 1)
|
1710
1740
|
return matches[1];
|
1711
1741
|
}
|
@@ -1795,17 +1825,31 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1795
1825
|
el.setSelectionRange(len, len);
|
1796
1826
|
}
|
1797
1827
|
|
1828
|
+
// initializes search's value with nextSearchTerm (if defined by user)
|
1829
|
+
// ignore nextSearchTerm if the dropdown is opened by the user pressing a letter
|
1830
|
+
if(this.search.val() === "") {
|
1831
|
+
if(this.nextSearchTerm != undefined){
|
1832
|
+
this.search.val(this.nextSearchTerm);
|
1833
|
+
this.search.select();
|
1834
|
+
}
|
1835
|
+
}
|
1836
|
+
|
1798
1837
|
this.focusser.prop("disabled", true).val("");
|
1799
1838
|
this.updateResults(true);
|
1800
1839
|
this.opts.element.trigger($.Event("select2-open"));
|
1801
1840
|
},
|
1802
1841
|
|
1803
1842
|
// single
|
1804
|
-
close: function () {
|
1843
|
+
close: function (params) {
|
1805
1844
|
if (!this.opened()) return;
|
1806
1845
|
this.parent.close.apply(this, arguments);
|
1846
|
+
|
1847
|
+
params = params || {focus: true};
|
1807
1848
|
this.focusser.removeAttr("disabled");
|
1808
|
-
|
1849
|
+
|
1850
|
+
if (params.focus) {
|
1851
|
+
this.focusser.focus();
|
1852
|
+
}
|
1809
1853
|
},
|
1810
1854
|
|
1811
1855
|
// single
|
@@ -1830,6 +1874,13 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1830
1874
|
this.focusser.focus();
|
1831
1875
|
},
|
1832
1876
|
|
1877
|
+
// single
|
1878
|
+
destroy: function() {
|
1879
|
+
$("label[for='" + this.focusser.attr('id') + "']")
|
1880
|
+
.attr('for', this.opts.element.attr("id"));
|
1881
|
+
this.parent.destroy.apply(this, arguments);
|
1882
|
+
},
|
1883
|
+
|
1833
1884
|
// single
|
1834
1885
|
initContainer: function () {
|
1835
1886
|
|
@@ -1875,7 +1926,10 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
1875
1926
|
killEvent(e);
|
1876
1927
|
return;
|
1877
1928
|
case KEY.TAB:
|
1878
|
-
|
1929
|
+
// if selectOnBlur == true, select the currently highlighted option
|
1930
|
+
if (this.opts.selectOnBlur) {
|
1931
|
+
this.selectHighlighted({noFocus: true});
|
1932
|
+
}
|
1879
1933
|
return;
|
1880
1934
|
case KEY.ESC:
|
1881
1935
|
this.cancel(e);
|
@@ -2012,7 +2066,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2012
2066
|
initSelection: function () {
|
2013
2067
|
var selected;
|
2014
2068
|
if (this.isPlaceholderOptionSelected()) {
|
2015
|
-
this.updateSelection(
|
2069
|
+
this.updateSelection(null);
|
2016
2070
|
this.close();
|
2017
2071
|
this.setPlaceholder();
|
2018
2072
|
} else {
|
@@ -2029,10 +2083,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2029
2083
|
|
2030
2084
|
isPlaceholderOptionSelected: function() {
|
2031
2085
|
var placeholderOption;
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2086
|
+
if (!this.opts.placeholder) return false; // no placeholder specified so no option should be considered
|
2087
|
+
return ((placeholderOption = this.getPlaceholderOption()) !== undefined && placeholderOption.is(':selected'))
|
2088
|
+
|| (this.opts.element.val() === "")
|
2089
|
+
|| (this.opts.element.val() === undefined)
|
2090
|
+
|| (this.opts.element.val() === null);
|
2036
2091
|
},
|
2037
2092
|
|
2038
2093
|
// single
|
@@ -2157,6 +2212,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2157
2212
|
|
2158
2213
|
this.opts.element.trigger({ type: "select2-selected", val: this.id(data), choice: data });
|
2159
2214
|
|
2215
|
+
this.nextSearchTerm = this.opts.nextSearchTerm(data, this.search.val());
|
2160
2216
|
this.close();
|
2161
2217
|
|
2162
2218
|
if (!options || !options.noFocus)
|
@@ -2173,7 +2229,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2173
2229
|
this.selection.data("select2-data", data);
|
2174
2230
|
|
2175
2231
|
container.empty();
|
2176
|
-
|
2232
|
+
if (data !== null) {
|
2233
|
+
formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup);
|
2234
|
+
}
|
2177
2235
|
if (formatted !== undefined) {
|
2178
2236
|
container.append(formatted);
|
2179
2237
|
}
|
@@ -2247,15 +2305,19 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2247
2305
|
},
|
2248
2306
|
|
2249
2307
|
// single
|
2250
|
-
data: function(value
|
2251
|
-
var data
|
2308
|
+
data: function(value) {
|
2309
|
+
var data,
|
2310
|
+
triggerChange = false;
|
2252
2311
|
|
2253
2312
|
if (arguments.length === 0) {
|
2254
2313
|
data = this.selection.data("select2-data");
|
2255
2314
|
if (data == undefined) data = null;
|
2256
2315
|
return data;
|
2257
2316
|
} else {
|
2258
|
-
if (
|
2317
|
+
if (arguments.length > 1) {
|
2318
|
+
triggerChange = arguments[1];
|
2319
|
+
}
|
2320
|
+
if (!value) {
|
2259
2321
|
this.clear(triggerChange);
|
2260
2322
|
} else {
|
2261
2323
|
data = this.data();
|
@@ -2278,7 +2340,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2278
2340
|
}).html([
|
2279
2341
|
"<ul class='select2-choices'>",
|
2280
2342
|
" <li class='select2-search-field'>",
|
2281
|
-
" <input type='text' autocomplete='off' autocorrect='off'
|
2343
|
+
" <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>",
|
2282
2344
|
" </li>",
|
2283
2345
|
"</ul>",
|
2284
2346
|
"<div class='select2-drop select2-drop-multi select2-display-none'>",
|
@@ -2364,6 +2426,13 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2364
2426
|
}
|
2365
2427
|
},
|
2366
2428
|
|
2429
|
+
// multi
|
2430
|
+
destroy: function() {
|
2431
|
+
$("label[for='" + this.search.attr('id') + "']")
|
2432
|
+
.attr('for', this.opts.element.attr("id"));
|
2433
|
+
this.parent.destroy.apply(this, arguments);
|
2434
|
+
},
|
2435
|
+
|
2367
2436
|
// multi
|
2368
2437
|
initContainer: function () {
|
2369
2438
|
|
@@ -2373,11 +2442,11 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2373
2442
|
this.selection = selection = this.container.find(selector);
|
2374
2443
|
|
2375
2444
|
var _this = this;
|
2376
|
-
this.selection.on("
|
2445
|
+
this.selection.on("click", ".select2-search-choice", function (e) {
|
2377
2446
|
//killEvent(e);
|
2378
2447
|
_this.search[0].focus();
|
2379
2448
|
_this.selectChoice($(this));
|
2380
|
-
})
|
2449
|
+
});
|
2381
2450
|
|
2382
2451
|
// rewrite labels from original element to focusser
|
2383
2452
|
this.search.attr("id", "s2id_autogen"+nextUid());
|
@@ -2452,7 +2521,10 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2452
2521
|
killEvent(e);
|
2453
2522
|
return;
|
2454
2523
|
case KEY.TAB:
|
2455
|
-
|
2524
|
+
// if selectOnBlur == true, select the currently highlighted option
|
2525
|
+
if (this.opts.selectOnBlur) {
|
2526
|
+
this.selectHighlighted({noFocus:true});
|
2527
|
+
}
|
2456
2528
|
this.close();
|
2457
2529
|
return;
|
2458
2530
|
case KEY.ESC:
|
@@ -2661,7 +2733,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2661
2733
|
|
2662
2734
|
this.opts.element.trigger({ type: "selected", val: this.id(data), choice: data });
|
2663
2735
|
|
2664
|
-
if (this.select || !this.opts.closeOnSelect) this.postprocessResults();
|
2736
|
+
if (this.select || !this.opts.closeOnSelect) this.postprocessResults(data, false, this.opts.closeOnSelect===true);
|
2665
2737
|
|
2666
2738
|
if (this.opts.closeOnSelect) {
|
2667
2739
|
this.close();
|
@@ -2945,7 +3017,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
2945
3017
|
self.updateSelection(data);
|
2946
3018
|
self.clearSearch();
|
2947
3019
|
if (triggerChange) {
|
2948
|
-
self.triggerChange(
|
3020
|
+
self.triggerChange(self.buildChangeDetails(oldData, this.data()));
|
2949
3021
|
}
|
2950
3022
|
});
|
2951
3023
|
}
|
@@ -3012,8 +3084,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
3012
3084
|
opts,
|
3013
3085
|
select2,
|
3014
3086
|
method, value, multiple,
|
3015
|
-
allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "readonly", "positionDropdown", "data", "search"],
|
3016
|
-
valueMethods = ["
|
3087
|
+
allowedMethods = ["val", "destroy", "opened", "open", "close", "focus", "isFocused", "container", "dropdown", "onSortStart", "onSortEnd", "enable", "disable", "readonly", "positionDropdown", "data", "search"],
|
3088
|
+
valueMethods = ["opened", "isFocused", "container", "dropdown"],
|
3089
|
+
propertyMethods = ["val", "data"],
|
3017
3090
|
methodsMap = { search: "externalSearch" };
|
3018
3091
|
|
3019
3092
|
this.each(function () {
|
@@ -3051,8 +3124,9 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
3051
3124
|
|
3052
3125
|
value = select2[method].apply(select2, args.slice(1));
|
3053
3126
|
}
|
3054
|
-
if (indexOf(args[0], valueMethods) >= 0
|
3055
|
-
|
3127
|
+
if (indexOf(args[0], valueMethods) >= 0
|
3128
|
+
|| (indexOf(args[0], propertyMethods) && args.length == 1)) {
|
3129
|
+
return false; // abort the iteration, ready to return first matched value
|
3056
3130
|
}
|
3057
3131
|
} else {
|
3058
3132
|
throw "Invalid arguments to select2 plugin: " + args;
|
@@ -3096,7 +3170,7 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
3096
3170
|
maximumSelectionSize: 0,
|
3097
3171
|
id: function (e) { return e.id; },
|
3098
3172
|
matcher: function(term, text) {
|
3099
|
-
return (''+text).toUpperCase().indexOf((''+term).toUpperCase()) >= 0;
|
3173
|
+
return stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase()) >= 0;
|
3100
3174
|
},
|
3101
3175
|
separator: ",",
|
3102
3176
|
tokenSeparators: [],
|
@@ -3105,7 +3179,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
3105
3179
|
blurOnChange: false,
|
3106
3180
|
selectOnBlur: false,
|
3107
3181
|
adaptContainerCssClass: function(c) { return c; },
|
3108
|
-
adaptDropdownCssClass: function(c) { return null; }
|
3182
|
+
adaptDropdownCssClass: function(c) { return null; },
|
3183
|
+
nextSearchTerm: function(selectedObject, currentSearchTerm) { return undefined; }
|
3109
3184
|
};
|
3110
3185
|
|
3111
3186
|
$.fn.select2.ajaxDefaults = {
|
@@ -3126,7 +3201,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
|
3126
3201
|
}, util: {
|
3127
3202
|
debounce: debounce,
|
3128
3203
|
markMatch: markMatch,
|
3129
|
-
escapeMarkup: defaultEscapeMarkup
|
3204
|
+
escapeMarkup: defaultEscapeMarkup,
|
3205
|
+
stripDiacritics: stripDiacritics
|
3130
3206
|
}, "class": {
|
3131
3207
|
"abstract": AbstractSelect2,
|
3132
3208
|
"single": SingleSelect2,
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Select2 <Language> translation.
|
3
|
+
*
|
4
|
+
* Author: Lubomir Vikev <lubomirvikev@gmail.com>
|
5
|
+
*/
|
6
|
+
(function ($) {
|
7
|
+
"use strict";
|
8
|
+
|
9
|
+
$.extend($.fn.select2.defaults, {
|
10
|
+
formatNoMatches: function () { return "Няма намерени съвпадения"; },
|
11
|
+
formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n == 1 ? "" : "а"); },
|
12
|
+
formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n == 1? "" : "а"); },
|
13
|
+
formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit == 1 ? " избор" : " избора"); },
|
14
|
+
formatLoadMore: function (pageNumber) { return "Зареждат се още..."; },
|
15
|
+
formatSearching: function () { return "Търсене..."; }
|
16
|
+
});
|
17
|
+
})(jQuery);
|
@@ -6,10 +6,10 @@
|
|
6
6
|
|
7
7
|
$.extend($.fn.select2.defaults, {
|
8
8
|
formatNoMatches: function () { return "No se encontraron resultados"; },
|
9
|
-
formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor
|
10
|
-
formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor elimine " + n + "
|
11
|
-
formatSelectionTooBig: function (limit) { return "
|
9
|
+
formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "á" : "a") + "cter" + (n == 1? "" : "es"); },
|
10
|
+
formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "á" : "a") + "cter" + (n == 1? "" : "es"); },
|
11
|
+
formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
|
12
12
|
formatLoadMore: function (pageNumber) { return "Cargando más resultados..."; },
|
13
13
|
formatSearching: function () { return "Buscando..."; }
|
14
14
|
});
|
15
|
-
})(jQuery);
|
15
|
+
})(jQuery);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Select2 <fa> translation.
|
3
|
+
*
|
4
|
+
* Author: Ali Choopan <choopan@arsh.co>
|
5
|
+
*/
|
6
|
+
(function ($) {
|
7
|
+
"use strict";
|
8
|
+
|
9
|
+
$.extend($.fn.select2.defaults, {
|
10
|
+
formatNoMatches: function () { return "نتیجهای یافت نشد."; },
|
11
|
+
formatInputTooShort: function (input, min) { var n = min - input.length; return " لطفا بیش از"+n+"کاراکتر وارد نمایید "; },
|
12
|
+
formatInputTooLong: function (input, max) { var n = input.length - max; return " لطفا" + n + " کاراکتر را حذف کنید."; },
|
13
|
+
formatSelectionTooBig: function (limit) { return "شما فقط میتوانید " + limit + " مورد را انتخاب کنید"; },
|
14
|
+
formatLoadMore: function (pageNumber) { return "در حال بارگذاری موارد بیشتر ..."; },
|
15
|
+
formatSearching: function () { return "در حال جستجو"; }
|
16
|
+
});
|
17
|
+
})(jQuery);
|
@@ -6,8 +6,8 @@
|
|
6
6
|
|
7
7
|
$.extend($.fn.select2.defaults, {
|
8
8
|
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
|
9
|
-
formatInputTooShort: function (input, min) { var n = min - input.length; return "Informe " + n + "
|
10
|
-
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + "
|
9
|
+
formatInputTooShort: function (input, min) { var n = min - input.length; return "Informe " + n + " caractere" + (n == 1? "" : "s"); },
|
10
|
+
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caractere" + (n == 1? "" : "s"); },
|
11
11
|
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
|
12
12
|
formatLoadMore: function (pageNumber) { return "Carregando mais resultados..."; },
|
13
13
|
formatSearching: function () { return "Buscando..."; }
|
@@ -6,8 +6,8 @@
|
|
6
6
|
|
7
7
|
$.extend($.fn.select2.defaults, {
|
8
8
|
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
|
9
|
-
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + "
|
10
|
-
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + "
|
9
|
+
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
|
10
|
+
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
|
11
11
|
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
|
12
12
|
formatLoadMore: function (pageNumber) { return "A carregar mais resultados..."; },
|
13
13
|
formatSearching: function () { return "A pesquisar..."; }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* Select2 Thai translation.
|
3
|
+
*
|
4
|
+
* Author: Atsawin Chaowanakritsanakul <joke@nakhon.net>
|
5
|
+
*/
|
6
|
+
(function ($) {
|
7
|
+
"use strict";
|
8
|
+
|
9
|
+
$.extend($.fn.select2.defaults, {
|
10
|
+
formatNoMatches: function () { return "ไม่พบข้อมูล"; },
|
11
|
+
formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; },
|
12
|
+
formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; },
|
13
|
+
formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; },
|
14
|
+
formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม..."; },
|
15
|
+
formatSearching: function () { return "กำลังค้นข้อมูล..."; }
|
16
|
+
});
|
17
|
+
})(jQuery);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Version: 3.4.
|
2
|
+
Version: 3.4.2 Timestamp: Mon Aug 12 15:04:12 PDT 2013
|
3
3
|
*/
|
4
4
|
.select2-container {
|
5
5
|
margin: 0;
|
@@ -14,7 +14,7 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
14
14
|
.select2-container,
|
15
15
|
.select2-drop,
|
16
16
|
.select2-search,
|
17
|
-
.select2-search input{
|
17
|
+
.select2-search input {
|
18
18
|
/*
|
19
19
|
Force border-box so that % widths fit the parent
|
20
20
|
container without overlap because of margin/padding.
|
@@ -22,9 +22,7 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
22
22
|
More Info : http://www.quirksmode.org/css/box.html
|
23
23
|
*/
|
24
24
|
-webkit-box-sizing: border-box; /* webkit */
|
25
|
-
-khtml-box-sizing: border-box; /* konqueror */
|
26
25
|
-moz-box-sizing: border-box; /* firefox */
|
27
|
-
-ms-box-sizing: border-box; /* ie */
|
28
26
|
box-sizing: border-box; /* css3 */
|
29
27
|
}
|
30
28
|
|
@@ -41,13 +39,9 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
41
39
|
color: #444;
|
42
40
|
text-decoration: none;
|
43
41
|
|
44
|
-
|
45
|
-
-moz-border-radius: 4px;
|
46
|
-
border-radius: 4px;
|
42
|
+
border-radius: 4px;
|
47
43
|
|
48
|
-
|
49
|
-
-moz-background-clip: padding;
|
50
|
-
background-clip: padding-box;
|
44
|
+
background-clip: padding-box;
|
51
45
|
|
52
46
|
-webkit-touch-callout: none;
|
53
47
|
-webkit-user-select: none;
|
@@ -57,29 +51,27 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
57
51
|
user-select: none;
|
58
52
|
|
59
53
|
background-color: #fff;
|
60
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #
|
61
|
-
background-image: -webkit-linear-gradient(center bottom, #
|
62
|
-
background-image: -moz-linear-gradient(center bottom, #
|
63
|
-
background-image: -o-linear-gradient(bottom, #
|
64
|
-
background-image: -ms-linear-gradient(top, #
|
54
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff));
|
55
|
+
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%);
|
56
|
+
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%);
|
57
|
+
background-image: -o-linear-gradient(bottom, #eee 0%, #fff 50%);
|
58
|
+
background-image: -ms-linear-gradient(top, #fff 0%, #eee 50%);
|
65
59
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
|
66
|
-
background-image: linear-gradient(top, #
|
60
|
+
background-image: linear-gradient(top, #fff 0%, #eee 50%);
|
67
61
|
}
|
68
62
|
|
69
63
|
.select2-container.select2-drop-above .select2-choice {
|
70
64
|
border-bottom-color: #aaa;
|
71
65
|
|
72
|
-
|
73
|
-
-moz-border-radius:0 0 4px 4px;
|
74
|
-
border-radius:0 0 4px 4px;
|
66
|
+
border-radius: 0 0 4px 4px;
|
75
67
|
|
76
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #
|
77
|
-
background-image: -webkit-linear-gradient(center bottom, #
|
78
|
-
background-image: -moz-linear-gradient(center bottom, #
|
79
|
-
background-image: -o-linear-gradient(bottom, #
|
80
|
-
background-image: -ms-linear-gradient(top, #
|
81
|
-
filter: progid:DXImageTransform.Microsoft.gradient(
|
82
|
-
background-image: linear-gradient(top, #
|
68
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff));
|
69
|
+
background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%);
|
70
|
+
background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%);
|
71
|
+
background-image: -o-linear-gradient(bottom, #eee 0%, #fff 90%);
|
72
|
+
background-image: -ms-linear-gradient(top, #eee 0%, #fff 90%);
|
73
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
|
74
|
+
background-image: linear-gradient(top, #eee 0%, #fff 90%);
|
83
75
|
}
|
84
76
|
|
85
77
|
.select2-container.select2-allowclear .select2-choice .select2-chosen {
|
@@ -93,9 +85,7 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
93
85
|
|
94
86
|
white-space: nowrap;
|
95
87
|
|
96
|
-
|
97
|
-
-o-text-overflow: ellipsis;
|
98
|
-
text-overflow: ellipsis;
|
88
|
+
text-overflow: ellipsis;
|
99
89
|
}
|
100
90
|
|
101
91
|
.select2-container .select2-choice abbr {
|
@@ -124,25 +114,18 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
124
114
|
cursor: pointer;
|
125
115
|
}
|
126
116
|
|
127
|
-
.select2-drop-undermask {
|
128
|
-
border: 0;
|
129
|
-
margin: 0;
|
130
|
-
padding: 0;
|
131
|
-
position: absolute;
|
132
|
-
left: 0;
|
133
|
-
top: 0;
|
134
|
-
z-index: 9998;
|
135
|
-
background-color: transparent;
|
136
|
-
filter: alpha(opacity=0);
|
137
|
-
}
|
138
|
-
|
139
117
|
.select2-drop-mask {
|
140
118
|
border: 0;
|
141
119
|
margin: 0;
|
142
120
|
padding: 0;
|
143
|
-
position:
|
121
|
+
position: fixed;
|
144
122
|
left: 0;
|
145
123
|
top: 0;
|
124
|
+
min-height: 100%;
|
125
|
+
min-width: 100%;
|
126
|
+
height: auto;
|
127
|
+
width: auto;
|
128
|
+
opacity: 0;
|
146
129
|
z-index: 9998;
|
147
130
|
/* styles required for IE to work */
|
148
131
|
background-color: #fff;
|
@@ -162,12 +145,9 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
162
145
|
border: 1px solid #aaa;
|
163
146
|
border-top: 0;
|
164
147
|
|
165
|
-
|
166
|
-
-moz-border-radius: 0 0 4px 4px;
|
167
|
-
border-radius: 0 0 4px 4px;
|
148
|
+
border-radius: 0 0 4px 4px;
|
168
149
|
|
169
150
|
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
170
|
-
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
171
151
|
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
172
152
|
}
|
173
153
|
|
@@ -185,12 +165,9 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
185
165
|
border-top: 1px solid #aaa;
|
186
166
|
border-bottom: 0;
|
187
167
|
|
188
|
-
|
189
|
-
-moz-border-radius: 4px 4px 0 0;
|
190
|
-
border-radius: 4px 4px 0 0;
|
168
|
+
border-radius: 4px 4px 0 0;
|
191
169
|
|
192
170
|
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
193
|
-
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
194
171
|
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
195
172
|
}
|
196
173
|
|
@@ -212,22 +189,18 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
212
189
|
top: 0;
|
213
190
|
|
214
191
|
border-left: 1px solid #aaa;
|
215
|
-
|
216
|
-
-moz-border-radius: 0 4px 4px 0;
|
217
|
-
border-radius: 0 4px 4px 0;
|
192
|
+
border-radius: 0 4px 4px 0;
|
218
193
|
|
219
|
-
|
220
|
-
-moz-background-clip: padding;
|
221
|
-
background-clip: padding-box;
|
194
|
+
background-clip: padding-box;
|
222
195
|
|
223
196
|
background: #ccc;
|
224
197
|
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
|
225
198
|
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
226
199
|
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
227
200
|
background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
|
228
|
-
background-image: -ms-linear-gradient(top, #
|
201
|
+
background-image: -ms-linear-gradient(top, #ccc 0%, #eee 60%);
|
229
202
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
|
230
|
-
background-image: linear-gradient(top, #
|
203
|
+
background-image: linear-gradient(top, #ccc 0%, #eee 60%);
|
231
204
|
}
|
232
205
|
|
233
206
|
.select2-container .select2-choice .select2-arrow b {
|
@@ -263,21 +236,18 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
263
236
|
font-size: 1em;
|
264
237
|
|
265
238
|
border: 1px solid #aaa;
|
266
|
-
|
267
|
-
-moz-border-radius: 0;
|
268
|
-
border-radius: 0;
|
239
|
+
border-radius: 0;
|
269
240
|
|
270
241
|
-webkit-box-shadow: none;
|
271
|
-
-moz-box-shadow: none;
|
272
242
|
box-shadow: none;
|
273
243
|
|
274
244
|
background: #fff image-url('select2.png') no-repeat 100% -22px;
|
275
|
-
background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85,
|
276
|
-
background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom,
|
277
|
-
background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom,
|
278
|
-
background: image-url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom,
|
279
|
-
background: image-url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #
|
280
|
-
background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(top, #
|
245
|
+
background: image-url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
|
246
|
+
background: image-url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
247
|
+
background: image-url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
248
|
+
background: image-url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, #fff 85%, #eee 99%);
|
249
|
+
background: image-url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #fff 85%, #eee 99%);
|
250
|
+
background: image-url('select2.png') no-repeat 100% -22px, linear-gradient(top, #fff 85%, #eee 99%);
|
281
251
|
}
|
282
252
|
|
283
253
|
.select2-drop.select2-drop-above .select2-search input {
|
@@ -286,12 +256,12 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
286
256
|
|
287
257
|
.select2-search input.select2-active {
|
288
258
|
background: #fff image-url('select2-spinner.gif') no-repeat 100%;
|
289
|
-
background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85,
|
290
|
-
background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom,
|
291
|
-
background: image-url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom,
|
292
|
-
background: image-url('select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom,
|
293
|
-
background: image-url('select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #
|
294
|
-
background: image-url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #
|
259
|
+
background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
|
260
|
+
background: image-url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
261
|
+
background: image-url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
|
262
|
+
background: image-url('select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, #fff 85%, #eee 99%);
|
263
|
+
background: image-url('select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #fff 85%, #eee 99%);
|
264
|
+
background: image-url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #fff 85%, #eee 99%);
|
295
265
|
}
|
296
266
|
|
297
267
|
.select2-container-active .select2-choice,
|
@@ -299,33 +269,26 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
299
269
|
border: 1px solid #5897fb;
|
300
270
|
outline: none;
|
301
271
|
|
302
|
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0
|
303
|
-
|
304
|
-
box-shadow: 0 0 5px rgba(0,0,0,.3);
|
272
|
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
273
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
305
274
|
}
|
306
275
|
|
307
276
|
.select2-dropdown-open .select2-choice {
|
308
277
|
border-bottom-color: transparent;
|
309
278
|
-webkit-box-shadow: 0 1px 0 #fff inset;
|
310
|
-
-moz-box-shadow: 0 1px 0 #fff inset;
|
311
279
|
box-shadow: 0 1px 0 #fff inset;
|
312
280
|
|
313
|
-
|
314
|
-
|
315
|
-
border-bottom-left-radius: 0;
|
316
|
-
|
317
|
-
-webkit-border-bottom-right-radius: 0;
|
318
|
-
-moz-border-radius-bottomright: 0;
|
319
|
-
border-bottom-right-radius: 0;
|
281
|
+
border-bottom-left-radius: 0;
|
282
|
+
border-bottom-right-radius: 0;
|
320
283
|
|
321
284
|
background-color: #eee;
|
322
|
-
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0,
|
323
|
-
background-image: -webkit-linear-gradient(center bottom,
|
324
|
-
background-image: -moz-linear-gradient(center bottom,
|
325
|
-
background-image: -o-linear-gradient(bottom,
|
326
|
-
background-image: -ms-linear-gradient(top, #
|
327
|
-
filter: progid:DXImageTransform.Microsoft.gradient(
|
328
|
-
background-image: linear-gradient(top, #
|
285
|
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee));
|
286
|
+
background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%);
|
287
|
+
background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%);
|
288
|
+
background-image: -o-linear-gradient(bottom, #fff 0%, #eee 50%);
|
289
|
+
background-image: -ms-linear-gradient(top, #fff 0%, #eee 50%);
|
290
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
|
291
|
+
background-image: linear-gradient(top, #fff 0%, #eee 50%);
|
329
292
|
}
|
330
293
|
|
331
294
|
.select2-dropdown-open.select2-drop-above .select2-choice,
|
@@ -333,13 +296,13 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
333
296
|
border: 1px solid #5897fb;
|
334
297
|
border-top-color: transparent;
|
335
298
|
|
336
|
-
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0,
|
337
|
-
background-image: -webkit-linear-gradient(center top,
|
338
|
-
background-image: -moz-linear-gradient(center top,
|
339
|
-
background-image: -o-linear-gradient(top,
|
340
|
-
background-image: -ms-linear-gradient(bottom, #
|
341
|
-
filter: progid:DXImageTransform.Microsoft.gradient(
|
342
|
-
background-image: linear-gradient(bottom, #
|
299
|
+
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee));
|
300
|
+
background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%);
|
301
|
+
background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%);
|
302
|
+
background-image: -o-linear-gradient(top, #fff 0%, #eee 50%);
|
303
|
+
background-image: -ms-linear-gradient(bottom, #fff 0%, #eee 50%);
|
304
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0);
|
305
|
+
background-image: linear-gradient(bottom, #fff 0%, #eee 50%);
|
343
306
|
}
|
344
307
|
|
345
308
|
.select2-dropdown-open .select2-choice .select2-arrow {
|
@@ -359,7 +322,7 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
359
322
|
position: relative;
|
360
323
|
overflow-x: hidden;
|
361
324
|
overflow-y: auto;
|
362
|
-
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
325
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
363
326
|
}
|
364
327
|
|
365
328
|
.select2-results ul.select2-result-sub {
|
@@ -415,7 +378,7 @@ Version: 3.4.1 Timestamp: Thu Jun 27 18:02:10 PDT 2013
|
|
415
378
|
}
|
416
379
|
|
417
380
|
.select2-results .select2-highlighted ul {
|
418
|
-
background:
|
381
|
+
background: #fff;
|
419
382
|
color: #000;
|
420
383
|
}
|
421
384
|
|
@@ -489,12 +452,12 @@ disabled look for disabled choices in the results dropdown
|
|
489
452
|
overflow: hidden;
|
490
453
|
|
491
454
|
background-color: #fff;
|
492
|
-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #
|
493
|
-
background-image: -webkit-linear-gradient(top, #
|
494
|
-
background-image: -moz-linear-gradient(top, #
|
495
|
-
background-image: -o-linear-gradient(top, #
|
496
|
-
background-image: -ms-linear-gradient(top, #
|
497
|
-
background-image: linear-gradient(top, #
|
455
|
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff));
|
456
|
+
background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%);
|
457
|
+
background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%);
|
458
|
+
background-image: -o-linear-gradient(top, #eee 1%, #fff 15%);
|
459
|
+
background-image: -ms-linear-gradient(top, #eee 1%, #fff 15%);
|
460
|
+
background-image: linear-gradient(top, #eee 1%, #fff 15%);
|
498
461
|
}
|
499
462
|
|
500
463
|
.select2-locked {
|
@@ -509,9 +472,8 @@ disabled look for disabled choices in the results dropdown
|
|
509
472
|
border: 1px solid #5897fb;
|
510
473
|
outline: none;
|
511
474
|
|
512
|
-
-webkit-box-shadow: 0 0 5px rgba(0,0,0
|
513
|
-
|
514
|
-
box-shadow: 0 0 5px rgba(0,0,0,.3);
|
475
|
+
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
476
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, .3);
|
515
477
|
}
|
516
478
|
.select2-container-multi .select2-choices li {
|
517
479
|
float: left;
|
@@ -533,7 +495,6 @@ disabled look for disabled choices in the results dropdown
|
|
533
495
|
outline: 0;
|
534
496
|
border: 0;
|
535
497
|
-webkit-box-shadow: none;
|
536
|
-
-moz-box-shadow: none;
|
537
498
|
box-shadow: none;
|
538
499
|
background: transparent !important;
|
539
500
|
}
|
@@ -556,17 +517,12 @@ disabled look for disabled choices in the results dropdown
|
|
556
517
|
cursor: default;
|
557
518
|
border: 1px solid #aaaaaa;
|
558
519
|
|
559
|
-
|
560
|
-
-moz-border-radius: 3px;
|
561
|
-
border-radius: 3px;
|
520
|
+
border-radius: 3px;
|
562
521
|
|
563
|
-
-webkit-box-shadow: 0 0 2px #
|
564
|
-
|
565
|
-
box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
522
|
+
-webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
523
|
+
box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05);
|
566
524
|
|
567
|
-
|
568
|
-
-moz-background-clip: padding;
|
569
|
-
background-clip: padding-box;
|
525
|
+
background-clip: padding-box;
|
570
526
|
|
571
527
|
-webkit-touch-callout: none;
|
572
528
|
-webkit-user-select: none;
|
@@ -576,13 +532,13 @@ disabled look for disabled choices in the results dropdown
|
|
576
532
|
user-select: none;
|
577
533
|
|
578
534
|
background-color: #e4e4e4;
|
579
|
-
filter: progid:DXImageTransform.Microsoft.gradient(
|
580
|
-
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #
|
581
|
-
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #
|
582
|
-
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #
|
583
|
-
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #
|
584
|
-
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #
|
585
|
-
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #
|
535
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0);
|
536
|
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee));
|
537
|
+
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
538
|
+
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
539
|
+
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
540
|
+
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
541
|
+
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%);
|
586
542
|
}
|
587
543
|
.select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
|
588
544
|
cursor: default;
|
@@ -616,7 +572,7 @@ disabled look for disabled choices in the results dropdown
|
|
616
572
|
}
|
617
573
|
|
618
574
|
/* disabled styles */
|
619
|
-
.select2-container-multi.select2-container-disabled .select2-choices{
|
575
|
+
.select2-container-multi.select2-container-disabled .select2-choices {
|
620
576
|
background-color: #f4f4f4;
|
621
577
|
background-image: none;
|
622
578
|
border: 1px solid #ddd;
|
@@ -631,7 +587,7 @@ disabled look for disabled choices in the results dropdown
|
|
631
587
|
}
|
632
588
|
|
633
589
|
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none;
|
634
|
-
background:none;
|
590
|
+
background: none;
|
635
591
|
}
|
636
592
|
/* end multiselect */
|
637
593
|
|
@@ -642,16 +598,17 @@ disabled look for disabled choices in the results dropdown
|
|
642
598
|
}
|
643
599
|
|
644
600
|
.select2-offscreen, .select2-offscreen:focus {
|
645
|
-
clip: rect(0 0 0 0);
|
646
|
-
width: 1px;
|
647
|
-
height: 1px;
|
648
|
-
border: 0;
|
649
|
-
margin: 0;
|
650
|
-
padding: 0;
|
651
|
-
overflow: hidden;
|
652
|
-
position: absolute;
|
653
|
-
outline: 0;
|
654
|
-
left: 0px;
|
601
|
+
clip: rect(0 0 0 0) !important;
|
602
|
+
width: 1px !important;
|
603
|
+
height: 1px !important;
|
604
|
+
border: 0 !important;
|
605
|
+
margin: 0 !important;
|
606
|
+
padding: 0 !important;
|
607
|
+
overflow: hidden !important;
|
608
|
+
position: absolute !important;
|
609
|
+
outline: 0 !important;
|
610
|
+
left: 0px !important;
|
611
|
+
top: 0px !important;
|
655
612
|
}
|
656
613
|
|
657
614
|
.select2-display-none {
|
@@ -45,9 +45,9 @@ class SourceFile < Thor
|
|
45
45
|
response.map{|tag| tag["name"]}.sort
|
46
46
|
end
|
47
47
|
def languages
|
48
|
-
[ "ar", "ca", "cs", "da", "de", "el", "es", "et", "eu", "fi", "fr", "gl", "he", "hr",
|
48
|
+
[ "ar", "bg", "ca", "cs", "da", "de", "el", "es", "et", "eu", "fa", "fi", "fr", "gl", "he", "hr",
|
49
49
|
"hu", "id", "is", "it", "ja", "ko", "lt", "lv", "mk", "nl", "no", "pl", "pt-BR",
|
50
|
-
"pt-PT", "ro", "ru", "sk", "sv", "tr", "ua", "vi", "zh-CN", "zh-TW"
|
50
|
+
"pt-PT", "ro", "ru", "sk", "sv", "th", "tr", "ua", "vi", "zh-CN", "zh-TW"
|
51
51
|
].sort
|
52
52
|
end
|
53
53
|
def select msg, elements
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: select2-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-08-
|
13
|
+
date: 2013-08-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
@@ -111,6 +111,7 @@ files:
|
|
111
111
|
- app/assets/images/select2x2.png
|
112
112
|
- app/assets/javascripts/select2.js
|
113
113
|
- app/assets/javascripts/select2_locale_ar.js
|
114
|
+
- app/assets/javascripts/select2_locale_bg.js
|
114
115
|
- app/assets/javascripts/select2_locale_ca.js
|
115
116
|
- app/assets/javascripts/select2_locale_cs.js
|
116
117
|
- app/assets/javascripts/select2_locale_da.js
|
@@ -119,6 +120,7 @@ files:
|
|
119
120
|
- app/assets/javascripts/select2_locale_es.js
|
120
121
|
- app/assets/javascripts/select2_locale_et.js
|
121
122
|
- app/assets/javascripts/select2_locale_eu.js
|
123
|
+
- app/assets/javascripts/select2_locale_fa.js
|
122
124
|
- app/assets/javascripts/select2_locale_fi.js
|
123
125
|
- app/assets/javascripts/select2_locale_fr.js
|
124
126
|
- app/assets/javascripts/select2_locale_gl.js
|
@@ -142,6 +144,7 @@ files:
|
|
142
144
|
- app/assets/javascripts/select2_locale_ru.js
|
143
145
|
- app/assets/javascripts/select2_locale_sk.js
|
144
146
|
- app/assets/javascripts/select2_locale_sv.js
|
147
|
+
- app/assets/javascripts/select2_locale_th.js
|
145
148
|
- app/assets/javascripts/select2_locale_tr.js
|
146
149
|
- app/assets/javascripts/select2_locale_ua.js
|
147
150
|
- app/assets/javascripts/select2_locale_vi.js
|
@@ -179,4 +182,3 @@ signing_key:
|
|
179
182
|
specification_version: 3
|
180
183
|
summary: Integrate Select2 javascript library with Rails asset pipeline
|
181
184
|
test_files: []
|
182
|
-
has_rdoc:
|