├── example ├── .meteor │ ├── .gitignore │ ├── release │ └── packages ├── public │ ├── static │ └── README.md ├── client │ ├── index.html │ ├── lib │ │ └── example.controller.coffee │ ├── views │ │ ├── pages │ │ │ └── home │ │ │ │ ├── home.coffee │ │ │ │ └── home.html │ │ └── select2ExamplesPanel │ │ │ ├── select2ExamplesPanel.html │ │ │ ├── select2DataSources │ │ │ ├── select2DataSources.html │ │ │ └── select2DataSources.coffee │ │ │ ├── select2ExamplesPanel.coffee │ │ │ └── select2Configurations │ │ │ ├── select2Configurations.coffee │ │ │ └── select2Configurations.html │ └── main.less ├── smart.json ├── server │ └── lib │ │ └── settings.coffee ├── routes.coffee └── smart.lock ├── vendor └── select2 │ ├── .gitignore │ ├── select2.png │ ├── select2x2.png │ ├── select2-spinner.gif │ ├── bower.json │ ├── select2_locale_zh-CN.js │ ├── select2_locale_zh-TW.js │ ├── select2_locale_ja.js │ ├── package.json │ ├── composer.json │ ├── select2_locale_ko.js │ ├── select2_locale_hu.js │ ├── select2_locale_he.js │ ├── select2_locale_de.js │ ├── select2_locale_tr.js │ ├── select2_locale_is.js │ ├── select2_locale_th.js │ ├── select2_locale_ms.js │ ├── select2_locale_nl.js │ ├── select2_locale_ka.js │ ├── select2_locale_sv.js │ ├── select2_locale_da.js │ ├── select2_locale_it.js │ ├── select2_locale_no.js │ ├── select2_locale_pt-BR.js │ ├── select2_locale_es.js │ ├── select2_locale_pt-PT.js │ ├── select2_locale_ro.js │ ├── select2_locale_et.js │ ├── select2_locale_id.js │ ├── select2_locale_vi.js │ ├── select2_locale_mk.js │ ├── select2_locale_ca.js │ ├── select2_locale_el.js │ ├── select2_locale_bg.js │ ├── select2_locale_az.js │ ├── select2_locale_fi.js │ ├── select2_locale_lv.js │ ├── LICENSE │ ├── select2_locale_hr.js │ ├── select2_locale_en.js.template │ ├── select2_locale_fa.js │ ├── select2_locale_fr.js │ ├── select2_locale_rs.js │ ├── select2_locale_ru.js │ ├── select2_locale_pl.js │ ├── select2_locale_ar.js │ ├── select2_locale_lt.js │ ├── select2.jquery.json │ ├── select2_locale_uk.js │ ├── select2_locale_eu.js │ ├── select2_locale_gl.js │ ├── release.sh │ ├── component.json │ ├── select2_locale_sk.js │ ├── select2_locale_cs.js │ ├── select2-bootstrap.css │ ├── README.md │ └── select2.css ├── .travis.yml ├── tests └── select2.tests.coffee ├── .gitignore ├── lib ├── select2.html └── select2.component.coffee ├── smart.json ├── .groc.json ├── package.js ├── LICENSE.md └── README.md /example/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local -------------------------------------------------------------------------------- /example/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.8.1.3 2 | -------------------------------------------------------------------------------- /vendor/select2/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | -------------------------------------------------------------------------------- /example/public/static: -------------------------------------------------------------------------------- 1 | ../packages/luma-ui/static -------------------------------------------------------------------------------- /example/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | jquery-select2 3 | -------------------------------------------------------------------------------- /vendor/select2/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LumaPictures/meteor-jquery-select2/HEAD/vendor/select2/select2.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | before_install: 5 | - "curl -L http://git.io/ejPSng | /bin/sh" -------------------------------------------------------------------------------- /vendor/select2/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LumaPictures/meteor-jquery-select2/HEAD/vendor/select2/select2x2.png -------------------------------------------------------------------------------- /vendor/select2/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LumaPictures/meteor-jquery-select2/HEAD/vendor/select2/select2-spinner.gif -------------------------------------------------------------------------------- /tests/select2.tests.coffee: -------------------------------------------------------------------------------- 1 | Tinytest.add "Select2 - Write some tests bro", ( test ) -> 2 | test.notEqual true, false, "Write some tests bro." -------------------------------------------------------------------------------- /example/smart.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": { 3 | "jquery-select2": { 4 | "path": ".." 5 | }, 6 | "luma-ui": {}, 7 | "githubReadme": {} 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/select2/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "select2", 3 | "version": "3.4.8", 4 | "main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"], 5 | "dependencies": { 6 | "jquery": ">= 1.7.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /example/client/lib/example.controller.coffee: -------------------------------------------------------------------------------- 1 | class @ExampleController extends PackageLayoutController 2 | onBeforeAction: -> super 3 | data: -> 4 | @data.select2 = 5 | options: 6 | width: 200 7 | super 8 | onAfterAction: -> super 9 | action: -> super -------------------------------------------------------------------------------- /example/client/views/pages/home/home.coffee: -------------------------------------------------------------------------------- 1 | # # Home 2 | 3 | # ###### home.created() 4 | Template.home.created = -> return 5 | 6 | # ###### home.rendered() 7 | Template.home.rendered = -> return 8 | 9 | # ###### home.destroyed() 10 | Template.home.destroyed = -> return 11 | 12 | # ###### home.events() 13 | Template.home.events {} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### WebStorm ### 2 | .idea/ 3 | 4 | ### OSX ### 5 | .DS_STORE 6 | 7 | ### Node ### 8 | lib-cov 9 | *.seed 10 | *.log 11 | *.csv 12 | *.dat 13 | *.out 14 | *.pid 15 | *.gz 16 | 17 | pids 18 | logs 19 | results 20 | 21 | npm-debug.log 22 | node_modules 23 | 24 | ### Private Scripts ### 25 | .npm 26 | .git 27 | .build* 28 | packages/ -------------------------------------------------------------------------------- /lib/select2.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /smart.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-select2", 3 | "description": "A Blaze UI select2 component that supports reactive search.", 4 | "homepage": "https://github.com/LumaPictures/meteor-jquery-select2", 5 | "author": "Austin Rivas (https://github.com/austinrivas)", 6 | "version": "0.2.3", 7 | "git": "https://github.com/LumaPictures/meteor-jquery-select2", 8 | "packages": {} 9 | } -------------------------------------------------------------------------------- /example/public/README.md: -------------------------------------------------------------------------------- 1 | # Static 2 | 3 | These are the default static assets used by this module and its included `less` files. 4 | 5 | To include these assets in your application you must create a symlink into you `public` folder like so : 6 | 7 | ```shell 8 | $ cd public && ln -s ../packages/luma-ui/static ./ 9 | ``` 10 | 11 | All of these assets will then be served statically by your application at `http:///static/` -------------------------------------------------------------------------------- /example/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | standard-app-packages 7 | insecure 8 | templating 9 | ui 10 | less 11 | spacebars 12 | coffeescript 13 | showdown 14 | luma-ui 15 | iron-router 16 | jquery-select2 17 | githubReadme 18 | blaze-layout 19 | iron-router-progress 20 | jquery-ui 21 | -------------------------------------------------------------------------------- /.groc.json: -------------------------------------------------------------------------------- 1 | { 2 | "glob": [ 3 | "*.md", 4 | "*.js", 5 | "*.json", 6 | "*.coffee", 7 | "lib/**/*.coffee", 8 | "example/*.coffee", 9 | "example/lib/*.coffee", 10 | "tests/**/*.coffee" 11 | ], 12 | "except": [ 13 | "*.build", 14 | "*.idea", 15 | "*vendor", 16 | ".groc.json", 17 | "*temp.coffee", 18 | "example/packages/**", 19 | "example/.meteor/**" 20 | ], 21 | "github": true 22 | } -------------------------------------------------------------------------------- /example/client/views/select2ExamplesPanel/select2ExamplesPanel.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/client/views/pages/home/home.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/select2.component.coffee: -------------------------------------------------------------------------------- 1 | Template.Select2.rendered = -> 2 | @data.options ?= {} 3 | throw new Error "`id` must be defined" unless @data.id 4 | defaults = 5 | minimumResultsForSearch: "5" 6 | width: "100%" 7 | $select2 = $( 'select#'+@data.id ).select2 _.defaults @data.options, defaults 8 | $select2.select2 "enable", @data.options.disabled if @data.options.disabled 9 | $select2.select2 "readonly", @data.options.readonly if @data.options.readonly 10 | $select2.select2 "val", @data.selected if @data.selected 11 | 12 | Template.Select2.destroyed = -> 13 | $('body .select2-hidden-accessible').remove() -------------------------------------------------------------------------------- /vendor/select2/select2_locale_zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Chinese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | $.extend($.fn.select2.defaults, { 7 | formatNoMatches: function () { return "没有找到匹配项"; }, 8 | formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";}, 9 | formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";}, 10 | formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; }, 11 | formatLoadMore: function (pageNumber) { return "加载结果中…"; }, 12 | formatSearching: function () { return "搜索中…"; } 13 | }); 14 | })(jQuery); 15 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_zh-TW.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Traditional Chinese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | $.extend($.fn.select2.defaults, { 7 | formatNoMatches: function () { return "沒有找到相符的項目"; }, 8 | formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";}, 9 | formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";}, 10 | formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; }, 11 | formatLoadMore: function (pageNumber) { return "載入中…"; }, 12 | formatSearching: function () { return "搜尋中…"; } 13 | }); 14 | })(jQuery); 15 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ja.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Japanese translation. 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "該当なし"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "後" + n + "文字入れてください"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "検索文字列が" + n + "文字長すぎます"; }, 11 | formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; }, 12 | formatLoadMore: function (pageNumber) { return "読込中・・・"; }, 13 | formatSearching: function () { return "検索中・・・"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Select2", 3 | "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.", 4 | "homepage": "http://ivaynberg.github.io/select2", 5 | "author": "Igor Vaynberg", 6 | "repository": {"type": "git", "url": "git://github.com/ivaynberg/select2.git"}, 7 | "main": "select2.js", 8 | "version": "3.4.8", 9 | "jspm": { 10 | "main": "select2", 11 | "files": ["select2.js", "select2.png", "select2.css", "select2-spinner.gif"], 12 | "shim": { 13 | "select2": { 14 | "imports": ["jquery", "./select2.css!"], 15 | "exports": "$" 16 | } 17 | }, 18 | "buildConfig": { "uglify": true } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/select2/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": 3 | "ivaynberg/select2", 4 | "description": "Select2 is a jQuery based replacement for select boxes.", 5 | "version": "3.4.8", 6 | "type": "component", 7 | "homepage": "http://ivaynberg.github.io/select2/", 8 | "license": "Apache-2.0", 9 | "require": { 10 | "robloach/component-installer": "*", 11 | "components/jquery": ">=1.7.1" 12 | }, 13 | "extra": { 14 | "component": { 15 | "scripts": [ 16 | "select2.js" 17 | ], 18 | "files": [ 19 | "select2.js", 20 | "select2_locale_*.js", 21 | "select2.css", 22 | "select2-bootstrap.css", 23 | "select2-spinner.gif", 24 | "select2.png", 25 | "select2x2.png" 26 | ] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ko.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Korean translation. 3 | * 4 | * @author Swen Mun 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); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_hu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Hungarian translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nincs találat."; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " karakterrel több, mint kellene."; }, 11 | formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; }, 12 | formatLoadMore: function (pageNumber) { return "Töltés…"; }, 13 | formatSearching: function () { return "Keresés…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_he.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Hebrew translation. 3 | * 4 | * Author: Yakir Sitbon 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); 18 | -------------------------------------------------------------------------------- /example/client/views/select2ExamplesPanel/select2DataSources/select2DataSources.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_de.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 German translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; }, 11 | formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; }, 12 | formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; }, 13 | formatSearching: function () { return "Suche…"; } 14 | }); 15 | })(jQuery); -------------------------------------------------------------------------------- /vendor/select2/select2_locale_tr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Turkish translation. 3 | * 4 | * Author: Salim KAYABAŞI 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Sonuç bulunamadı"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; }, 13 | formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; }, 14 | formatLoadMore: function (pageNumber) { return "Daha fazla…"; }, 15 | formatSearching: function () { return "Aranıyor…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_is.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Icelandic translation. 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Ekkert fannst"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n > 1 ? "i" : "") + " í viðbót"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n > 1 ? "i" : ""); }, 11 | formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; }, 12 | formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; }, 13 | formatSearching: function () { return "Leita…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_th.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Thai translation. 3 | * 4 | * Author: Atsawin Chaowanakritsanakul 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); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ms.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Malay translation. 3 | * 4 | * Author: Kepoweran 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Tiada padanan yang ditemui"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Sila masukkan " + n + " aksara lagi"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Sila hapuskan " + n + " aksara"; }, 13 | formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; }, 14 | formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; }, 15 | formatSearching: function () { return "Mencari…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_nl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Dutch translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Geen resultaten gevonden"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; }, 11 | formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; }, 12 | formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; }, 13 | formatSearching: function () { return "Zoeken…"; } 14 | }); 15 | })(jQuery); -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ka.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Georgian (Kartuli) translation. 3 | * 4 | * Author: Dimitri Kurashvili dimakura@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 + " სიმბოლო"; }, 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); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_sv.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Swedish translation. 3 | * 4 | * Author: Jens Rantil 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Inga träffar"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; }, 13 | formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; }, 14 | formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; }, 15 | formatSearching: function () { return "Söker…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_da.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Danish translation. 3 | * 4 | * Author: Anders Jenbo 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Ingen resultater fundet"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; }, 13 | formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); }, 14 | formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; }, 15 | formatSearching: function () { return "Søger…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_it.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Italian translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nessuna corrispondenza trovata"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; }, 11 | formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); }, 12 | formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; }, 13 | formatSearching: function () { return "Ricerca…"; } 14 | }); 15 | })(jQuery); -------------------------------------------------------------------------------- /vendor/select2/select2_locale_no.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Norwegian translation. 3 | * 4 | * Author: Torgeir Veimo 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Ingen treff"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vennligst skriv inn " + n + (n>1 ? " flere tegn" : " tegn til"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vennligst fjern " + n + " tegn"; }, 13 | formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; }, 14 | formatLoadMore: function (pageNumber) { return "Laster flere resultater…"; }, 15 | formatSearching: function () { return "Søker…"; } 16 | }); 17 | })(jQuery); 18 | 19 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_pt-BR.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Brazilian Portuguese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nenhum resultado encontrado"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite mais " + n + " caracter" + (n == 1? "" : "es"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); }, 11 | formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, 12 | formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; }, 13 | formatSearching: function () { return "Buscando…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_es.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Spanish translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "No se encontraron resultados"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); }, 11 | formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, 12 | formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; }, 13 | formatSearching: function () { return "Buscando…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_pt-PT.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Portuguese (Portugal) translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nenhum resultado encontrado"; }, 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 | formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, 12 | formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; }, 13 | formatSearching: function () { return "A pesquisar…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ro.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Romanian translation. 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatNoMatches: function () { return "Nu a fost găsit nimic"; }, 9 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); }, 10 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); }, 11 | formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); }, 12 | formatLoadMore: function (pageNumber) { return "Se încarcă…"; }, 13 | formatSearching: function () { return "Căutare…"; } 14 | }); 15 | })(jQuery); 16 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_et.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Estonian translation. 3 | * 4 | * Author: Kuldar Kalvik 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Tulemused puuduvad"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; }, 13 | formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; }, 14 | formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; }, 15 | formatSearching: function () { return "Otsin.."; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_id.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Indonesian translation. 3 | * 4 | * Author: Ibrahim Yusuf 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Tidak ada data yang sesuai"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Masukkan " + n + " huruf lagi" + (n == 1 ? "" : "s"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Hapus " + n + " huruf" + (n == 1 ? "" : "s"); }, 13 | formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); }, 14 | formatLoadMore: function (pageNumber) { return "Mengambil data…"; }, 15 | formatSearching: function () { return "Mencari…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_vi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Vietnamese translation. 3 | * 4 | * Author: Long Nguyen 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Không tìm thấy kết quả"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); }, 13 | formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); }, 14 | formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; }, 15 | formatSearching: function () { return "Đang tìm…"; } 16 | }); 17 | })(jQuery); 18 | 19 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_mk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Macedonian translation. 3 | * 4 | * Author: Marko Aleksic 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); -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ca.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Catalan translation. 3 | * 4 | * Author: David Planella 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "No s'ha trobat cap coincidència"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; }, 13 | formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); }, 14 | formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; }, 15 | formatSearching: function () { return "S'està cercant…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_el.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Greek translation. 3 | * 4 | * @author Uriy Efremochkin 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 ? "υς" : "") + " χαρακτήρ" + (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); -------------------------------------------------------------------------------- /vendor/select2/select2_locale_bg.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Bulgarian translation. 3 | * 4 | * @author Lubomir Vikev 5 | * @author Uriy Efremochkin 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | 10 | $.extend($.fn.select2.defaults, { 11 | formatNoMatches: function () { return "Няма намерени съвпадения"; }, 12 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n > 1 ? "а" : ""); }, 13 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n > 1 ? "а" : ""); }, 14 | formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); }, 15 | formatLoadMore: function (pageNumber) { return "Зареждат се още…"; }, 16 | formatSearching: function () { return "Търсене…"; } 17 | }); 18 | })(jQuery); 19 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_az.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Azerbaijani translation. 3 | * 4 | * Author: Farhad Safarov 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatMatches: function (matches) { return matches + " nəticə mövcuddur, hərəkət etdirmək üçün yuxarı və aşağı düymələrindən istifadə edin."; }, 11 | formatNoMatches: function () { return "Nəticə tapılmadı"; }, 12 | formatInputTooShort: function (input, min) { var n = min - input.length; return n + " simvol daxil edin"; }, 13 | formatInputTooLong: function (input, max) { var n = input.length - max; return n + " simvol silin"; }, 14 | formatSelectionTooBig: function (limit) { return "Sadəcə " + limit + " element seçə bilərsiniz"; }, 15 | formatLoadMore: function (pageNumber) { return "Daha çox nəticə yüklənir…"; }, 16 | formatSearching: function () { return "Axtarılır…"; } 17 | }); 18 | })(jQuery); 19 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_fi.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Finnish translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | $.extend($.fn.select2.defaults, { 7 | formatNoMatches: function () { 8 | return "Ei tuloksia"; 9 | }, 10 | formatInputTooShort: function (input, min) { 11 | var n = min - input.length; 12 | return "Ole hyvä ja anna " + n + " merkkiä lisää"; 13 | }, 14 | formatInputTooLong: function (input, max) { 15 | var n = input.length - max; 16 | return "Ole hyvä ja anna " + n + " merkkiä vähemmän"; 17 | }, 18 | formatSelectionTooBig: function (limit) { 19 | return "Voit valita ainoastaan " + limit + " kpl"; 20 | }, 21 | formatLoadMore: function (pageNumber) { 22 | return "Ladataan lisää tuloksia…"; 23 | }, 24 | formatSearching: function () { 25 | return "Etsitään…"; 26 | } 27 | }); 28 | })(jQuery); 29 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_lv.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Latvian translation. 3 | * 4 | * @author Uriy Efremochkin 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Sakritību nav"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Lūdzu ievadiet vēl " + n + " simbol" + (n == 11 ? "us" : n%10 == 1 ? "u" : "us"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Lūdzu ievadiet par " + n + " simbol" + (n == 11 ? "iem" : n%10 == 1 ? "u" : "iem") + " mazāk"; }, 13 | formatSelectionTooBig: function (limit) { return "Jūs varat izvēlēties ne vairāk kā " + limit + " element" + (limit == 11 ? "us" : limit%10 == 1 ? "u" : "us"); }, 14 | formatLoadMore: function (pageNumber) { return "Datu ielāde…"; }, 15 | formatSearching: function () { return "Meklēšana…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 Igor Vaynberg 2 | 3 | Version: @@ver@@ Timestamp: @@timestamp@@ 4 | 5 | This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU 6 | General Public License version 2 (the "GPL License"). You may choose either license to govern your 7 | use of this software only upon the condition that you accept all of the terms of either the Apache 8 | License or the GPL License. 9 | 10 | You may obtain a copy of the Apache License and the GPL License at: 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | http://www.gnu.org/licenses/gpl-2.0.html 14 | 15 | Unless required by applicable law or agreed to in writing, software distributed under the Apache License 16 | or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 17 | either express or implied. See the Apache License and the GPL License for the specific language governing 18 | permissions and limitations under the Apache License and the GPL License. 19 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_hr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Croatian translation. 3 | * 4 | * @author Edi Modrić 5 | * @author Uriy Efremochkin 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | 10 | $.extend($.fn.select2.defaults, { 11 | formatNoMatches: function () { return "Nema rezultata"; }, 12 | formatInputTooShort: function (input, min) { return "Unesite još" + character(min - input.length); }, 13 | formatInputTooLong: function (input, max) { return "Unesite" + character(input.length - max) + " manje"; }, 14 | formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; }, 15 | formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; }, 16 | formatSearching: function () { return "Pretraga…"; } 17 | }); 18 | 19 | function character (n) { 20 | return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova"); 21 | } 22 | })(jQuery); 23 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_en.js.template: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 translation. 3 | * 4 | * Author: Your Name 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatMatches: function (matches) { return matches + " results are available, use up and down arrow keys to navigate."; }, 11 | formatNoMatches: function () { return "No matches found"; }, 12 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1 ? "" : "s"); }, 13 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1 ? "" : "s"); }, 14 | formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); }, 15 | formatLoadMore: function (pageNumber) { return "Loading more results…"; }, 16 | formatSearching: function () { return "Searching…"; } 17 | }); 18 | })(jQuery); 19 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_fa.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Persian translation. 3 | * 4 | * Author: Ali Choopan 5 | * Author: Ebrahim Byagowi 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | 10 | $.extend($.fn.select2.defaults, { 11 | formatMatches: function (matches) { return matches + " نتیجه موجود است، کلیدهای جهت بالا و پایین را برای گشتن استفاده کنید."; }, 12 | formatNoMatches: function () { return "نتیجه‌ای یافت نشد."; }, 13 | formatInputTooShort: function (input, min) { var n = min - input.length; return "لطفاً " + n + " نویسه بیشتر وارد نمایید"; }, 14 | formatInputTooLong: function (input, max) { var n = input.length - max; return "لطفاً " + n + " نویسه را حذف کنید."; }, 15 | formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; }, 16 | formatLoadMore: function (pageNumber) { return "در حال بارگیری موارد بیشتر…"; }, 17 | formatSearching: function () { return "در حال جستجو…"; } 18 | }); 19 | })(jQuery); 20 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_fr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 French translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | 7 | $.extend($.fn.select2.defaults, { 8 | formatMatches: function (matches) { return matches + " résultats sont disponibles, utilisez les flèches haut et bas pour naviguer."; }, 9 | formatNoMatches: function () { return "Aucun résultat trouvé"; }, 10 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Merci de saisir " + n + " caractère" + (n == 1 ? "" : "s") + " de plus"; }, 11 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Merci de supprimer " + n + " caractère" + (n == 1 ? "" : "s"); }, 12 | formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); }, 13 | formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires…"; }, 14 | formatSearching: function () { return "Recherche en cours…"; } 15 | }); 16 | })(jQuery); 17 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_rs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Serbian translation. 3 | * 4 | * @author Limon Monte 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Ništa nije pronađeno"; }, 11 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Ukucajte bar još " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Obrišite " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); }, 13 | formatSelectionTooBig: function (limit) { return "Možete izabrati samo " + limit + " stavk" + (limit % 10 == 1 && limit % 100 != 11 ? "u" : (limit % 10 >= 2 && limit % 10 <= 4 && (limit % 100 < 12 || limit % 100 > 14)? "e" : "i")); }, 14 | formatLoadMore: function (pageNumber) { return "Preuzimanje još rezultata…"; }, 15 | formatSearching: function () { return "Pretraga…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ru.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Russian translation. 3 | * 4 | * @author Uriy Efremochkin 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { return "Совпадений не найдено"; }, 11 | formatInputTooShort: function (input, min) { return "Пожалуйста, введите еще" + character(min - input.length); }, 12 | formatInputTooLong: function (input, max) { return "Пожалуйста, введите на" + character(input.length - max) + " меньше"; }, 13 | formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); }, 14 | formatLoadMore: function (pageNumber) { return "Загрузка данных…"; }, 15 | formatSearching: function () { return "Поиск…"; } 16 | }); 17 | 18 | function character (n) { 19 | return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов"); 20 | } 21 | })(jQuery); 22 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_pl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Polish translation. 3 | * 4 | * @author Jan Kondratowicz 5 | * @author Uriy Efremochkin 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | 10 | $.extend($.fn.select2.defaults, { 11 | formatNoMatches: function () { return "Brak wyników"; }, 12 | formatInputTooShort: function (input, min) { return "Wpisz jeszcze" + character(min - input.length, "znak", "i"); }, 13 | formatInputTooLong: function (input, max) { return "Wpisana fraza jest za długa o" + character(input.length - max, "znak", "i"); }, 14 | formatSelectionTooBig: function (limit) { return "Możesz zaznaczyć najwyżej" + character(limit, "element", "y"); }, 15 | formatLoadMore: function (pageNumber) { return "Ładowanie wyników…"; }, 16 | formatSearching: function () { return "Szukanie…"; } 17 | }); 18 | 19 | function character (n, word, pluralSuffix) { 20 | return " " + n + " " + word + (n == 1 ? "" : n%10 < 5 && n%10 > 1 && (n%100 < 5 || n%100 > 20) ? pluralSuffix : "ów"); 21 | } 22 | })(jQuery); 23 | -------------------------------------------------------------------------------- /package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "A Blaze UI select2 component that supports reactive search." 3 | }); 4 | 5 | Package.on_use(function (api, where) { 6 | api.use([ 7 | 'coffeescript', 8 | 'underscore' 9 | ],[ 'client', 'server' ]); 10 | 11 | api.use([ 12 | 'jquery', 13 | 'ui', 14 | 'templating', 15 | 'spacebars' 16 | ], [ 'client' ]); 17 | 18 | /* Select2Component Vendor Assets */ 19 | api.add_files([ 20 | 'vendor/select2/select2.js' 21 | ], [ 'client' ]); 22 | 23 | /* Select2Component */ 24 | api.add_files([ 25 | 'lib/select2.html' 26 | ], [ 'client' ]); 27 | 28 | api.add_files([ 29 | 'lib/select2.component.coffee' 30 | ], [ 'client' ]); 31 | /* END Select2Component */ 32 | }); 33 | 34 | Package.on_test(function (api) { 35 | api.use([ 36 | 'coffeescript', 37 | 'jquery-select2', 38 | 'tinytest', 39 | 'test-helpers' 40 | ], ['client', 'server']); 41 | 42 | /* Select2Component Tests */ 43 | api.add_files([ 44 | 'tests/select2.tests.coffee' 45 | /* ADD Select2Component Tests here */ 46 | ], [ 'client', 'server' ]); 47 | }); 48 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_ar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Arabic translation. 3 | * 4 | * Author: Adel KEDJOUR 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; if (n == 1){ return "الرجاء إدخال حرف واحد على الأكثر"; } return n == 2 ? "الرجاء إدخال حرفين على الأكثر" : "الرجاء إدخال " + n + " على الأكثر"; }, 12 | formatInputTooLong: function (input, max) { var n = input.length - max; if (n == 1){ return "الرجاء إدخال حرف واحد على الأقل"; } return n == 2 ? "الرجاء إدخال حرفين على الأقل" : "الرجاء إدخال " + n + " على الأقل "; }, 13 | formatSelectionTooBig: function (limit) { if (n == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return n == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + n + " إختيارات فقط"; }, 14 | formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; }, 15 | formatSearching: function () { return "البحث…"; } 16 | }); 17 | })(jQuery); 18 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | ### Copyright (c) 2014 [Austin Rivas](https://github.com/austinrivas) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /vendor/select2/select2_locale_lt.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Lithuanian translation. 3 | * 4 | * @author CRONUS Karmalakas 5 | * @author Uriy Efremochkin 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | 10 | $.extend($.fn.select2.defaults, { 11 | formatNoMatches: function () { return "Atitikmenų nerasta"; }, 12 | formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); }, 13 | formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); }, 14 | formatSelectionTooBig: function (limit) { 15 | return "Jūs galite pasirinkti tik " + limit + " element" + ((limit%100 > 9 && limit%100 < 21) || limit%10 == 0 ? "ų" : limit%10 > 1 ? "us" : "ą"); 16 | }, 17 | formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; }, 18 | formatSearching: function () { return "Ieškoma…"; } 19 | }); 20 | 21 | function character (n) { 22 | return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į"); 23 | } 24 | })(jQuery); 25 | -------------------------------------------------------------------------------- /vendor/select2/select2.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "select2", 3 | "title": "Select2", 4 | "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.", 5 | "keywords": [ 6 | "select", 7 | "autocomplete", 8 | "typeahead", 9 | "dropdown", 10 | "multiselect", 11 | "tag", 12 | "tagging" 13 | ], 14 | "version": "3.4.8", 15 | "author": { 16 | "name": "Igor Vaynberg", 17 | "url": "https://github.com/ivaynberg" 18 | }, 19 | "licenses": [ 20 | { 21 | "type": "Apache", 22 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 23 | }, 24 | { 25 | "type": "GPL v2", 26 | "url": "http://www.gnu.org/licenses/gpl-2.0.html" 27 | } 28 | ], 29 | "bugs": "https://github.com/ivaynberg/select2/issues", 30 | "homepage": "http://ivaynberg.github.com/select2", 31 | "docs": "http://ivaynberg.github.com/select2/", 32 | "download": "https://github.com/ivaynberg/select2/tags", 33 | "dependencies": { 34 | "jquery": ">=1.7.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /example/client/views/select2ExamplesPanel/select2DataSources/select2DataSources.coffee: -------------------------------------------------------------------------------- 1 | # # select2DataSourcesView 2 | 3 | # ##### select2DataSourcesView.created() 4 | Template.select2DataSourcesView.created = -> return 5 | 6 | # ##### select2DataSourcesView.rendered() 7 | Template.select2DataSourcesView.rendered = -> return 8 | 9 | # ##### select2DataSourcesView.destroyed() 10 | Template.select2DataSourcesView.destroyed = -> return 11 | 12 | # ##### select2DataSourcesView.helpers() 13 | Template.select2DataSourcesView.helpers 14 | ArraySource: -> return { 15 | placeholder: "Select an Option..." 16 | tabindex: 3 17 | options: 18 | data: 19 | results: [{ 20 | id: 0 21 | tag: "enhancement" 22 | }, { 23 | id: 1 24 | tag: "bug" 25 | }, { 26 | id: 2 27 | tag: "duplicate" 28 | }, { 29 | id: 3 30 | tag: "invalid" 31 | }, { 32 | id: 4 33 | tag: "wontfix" 34 | }] 35 | text: ( item ) -> item.tag 36 | formatSelection: ( item ) -> item.tag 37 | formatResult: ( item ) -> item.tag 38 | } 39 | 40 | # ##### select2DataSourcesView.events() 41 | Template .select2DataSourcesView.events {} 42 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_uk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Ukrainian translation. 3 | * 4 | * @author bigmihail 5 | * @author Uriy Efremochkin 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | 10 | $.extend($.fn.select2.defaults, { 11 | formatMatches: function (matches) { return character(matches, "результат") + " знайдено, використовуйте клавіші зі стрілками вверх та вниз для навігації."; }, 12 | formatNoMatches: function () { return "Нічого не знайдено"; }, 13 | formatInputTooShort: function (input, min) { return "Введіть буль ласка ще " + character(min - input.length, "символ"); }, 14 | formatInputTooLong: function (input, max) { return "Введіть буль ласка на " + character(input.length - max, "символ") + " менше"; }, 15 | formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише " + character(limit, "елемент"); }, 16 | formatLoadMore: function (pageNumber) { return "Завантаження даних…"; }, 17 | formatSearching: function () { return "Пошук…"; } 18 | }); 19 | 20 | function character (n, word) { 21 | return n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів"); 22 | } 23 | })(jQuery); 24 | -------------------------------------------------------------------------------- /example/client/views/select2ExamplesPanel/select2ExamplesPanel.coffee: -------------------------------------------------------------------------------- 1 | # # select2ExamplesPanelView 2 | 3 | panelBodySelectorId = "select2-examples-panel-selector" 4 | 5 | # ##### select2ExamplesPanelView.created() 6 | Template.select2ExamplesPanelView.created = -> 7 | Session.setDefault panelBodySelectorId, "select2ConfigurationsView" 8 | 9 | # ##### select2ExamplesPanelView.rendered() 10 | Template.select2ExamplesPanelView.rendered = -> return 11 | 12 | # ##### select2ExamplesPanelView.destroyed() 13 | Template.select2ExamplesPanelView.destroyed = -> return 14 | 15 | # ##### select2ExamplesPanelView.helpers() 16 | Template.select2ExamplesPanelView.helpers 17 | panelBodySelector: -> return { 18 | id: panelBodySelectorId 19 | selected : Session.get panelBodySelectorId 20 | options: 21 | width: "off" 22 | tabindex: 1 23 | } 24 | 25 | selectedView: -> return Template[ Session.get panelBodySelectorId ] 26 | 27 | options: -> return [{ 28 | value: "select2ConfigurationsView" 29 | label: "Configurations" 30 | }, { 31 | value: "select2DataSourcesView" 32 | label: "Data Sources" 33 | }] 34 | 35 | events = {} 36 | events[ "change ##{ panelBodySelectorId }" ] = ( event, template ) -> 37 | Session.set event.target.id, event.val 38 | 39 | # ##### select2ExamplesPanelView.events() 40 | Template.select2ExamplesPanelView.events events 41 | -------------------------------------------------------------------------------- /example/server/lib/settings.coffee: -------------------------------------------------------------------------------- 1 | environment = process.env.METEOR_ENV or "development" 2 | 3 | defaults = 4 | public: 5 | package: 6 | name: "jquery-select2" 7 | description: "A Blaze UI select2 component that supports reactive search." 8 | owner: "LumaPictures" 9 | repo: "meteor-jquery-select2" 10 | absoluteUrl: Meteor.absoluteUrl() 11 | private: {} 12 | 13 | settings = 14 | development: 15 | public: _.defaults {}, defaults.public 16 | private:_.defaults {}, defaults.private 17 | 18 | staging: 19 | public: _.defaults {}, defaults.public 20 | private: _.defaults {}, defaults.private 21 | 22 | production: 23 | public: _.defaults {}, defaults.public 24 | private: _.defaults {}, defaults.private 25 | 26 | unless process.env.METEOR_SETTINGS 27 | console.log "No METEOR_SETTINGS passed in, using locally defined settings." 28 | if environment is "production" 29 | Meteor.settings = settings.production 30 | else if environment is "staging" 31 | Meteor.settings = settings.staging 32 | else 33 | Meteor.settings = settings.development 34 | 35 | # Push a subset of settings to the client. 36 | __meteor_runtime_config__.PUBLIC_SETTINGS = Meteor.settings.public if Meteor.settings and Meteor.settings.public 37 | console.log "Using [ #{ environment } ] Meteor.settings" 38 | console.log Meteor.settings -------------------------------------------------------------------------------- /example/client/main.less: -------------------------------------------------------------------------------- 1 | /* Bootstrap */ 2 | @import "../packages/luma-ui/less/bootstrap.import.less"; 3 | 4 | /* Variables */ 5 | @import "../packages/luma-ui/less/variables.import.less"; 6 | 7 | /* Components */ 8 | @import "../packages/luma-ui/less/components.import.less"; 9 | 10 | /* Icons */ 11 | @import "../packages/luma-ui/less/icons.import.less"; 12 | 13 | /* Fonts */ 14 | @import "../packages/luma-ui/less/fonts.import.less"; 15 | 16 | .select2-examples-panel { 17 | .panel-heading { 18 | h6 { 19 | font-size: 24px; 20 | font-weight: bold; 21 | i { 22 | font-size: 32px; 23 | } 24 | } 25 | .pull-left { 26 | .select2-container { 27 | margin-top: 15px; 28 | .select2-choice { 29 | background-color: transparent; 30 | .select2-arrow { 31 | b { 32 | background: none; 33 | width: 0; 34 | height: 0; 35 | border-left: 6px solid transparent; 36 | border-right: 6px solid transparent; 37 | border-top: 6px solid #FFFFFF; 38 | } 39 | } 40 | } 41 | .select2-chosen { 42 | font-size: 13px; 43 | font-weight: bold; 44 | text-align: left; 45 | } 46 | } 47 | } 48 | } 49 | } 50 | 51 | .select2-hidden-accessible { 52 | display: none; 53 | } -------------------------------------------------------------------------------- /vendor/select2/select2_locale_eu.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Basque translation. 3 | * 4 | * Author: Julen Ruiz Aizpuru 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { 11 | return "Ez da bat datorrenik aurkitu"; 12 | }, 13 | formatInputTooShort: function (input, min) { 14 | var n = min - input.length; 15 | if (n === 1) { 16 | return "Idatzi karaktere bat gehiago"; 17 | } else { 18 | return "Idatzi " + n + " karaktere gehiago"; 19 | } 20 | }, 21 | formatInputTooLong: function (input, max) { 22 | var n = input.length - max; 23 | if (n === 1) { 24 | return "Idatzi karaktere bat gutxiago"; 25 | } else { 26 | return "Idatzi " + n + " karaktere gutxiago"; 27 | } 28 | }, 29 | formatSelectionTooBig: function (limit) { 30 | if (limit === 1 ) { 31 | return "Elementu bakarra hauta dezakezu"; 32 | } else { 33 | return limit + " elementu hauta ditzakezu soilik"; 34 | } 35 | }, 36 | formatLoadMore: function (pageNumber) { 37 | return "Emaitza gehiago kargatzen…"; 38 | }, 39 | formatSearching: function () { 40 | return "Bilatzen…"; 41 | } 42 | }); 43 | })(jQuery); 44 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_gl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Galician translation 3 | * 4 | * Author: Leandro Regueiro 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatNoMatches: function () { 11 | return "Non se atoparon resultados"; 12 | }, 13 | formatInputTooShort: function (input, min) { 14 | var n = min - input.length; 15 | if (n === 1) { 16 | return "Engada un carácter"; 17 | } else { 18 | return "Engada " + n + " caracteres"; 19 | } 20 | }, 21 | formatInputTooLong: function (input, max) { 22 | var n = input.length - max; 23 | if (n === 1) { 24 | return "Elimine un carácter"; 25 | } else { 26 | return "Elimine " + n + " caracteres"; 27 | } 28 | }, 29 | formatSelectionTooBig: function (limit) { 30 | if (limit === 1 ) { 31 | return "Só pode seleccionar un elemento"; 32 | } else { 33 | return "Só pode seleccionar " + limit + " elementos"; 34 | } 35 | }, 36 | formatLoadMore: function (pageNumber) { 37 | return "Cargando máis resultados…"; 38 | }, 39 | formatSearching: function () { 40 | return "Buscando…"; 41 | } 42 | }); 43 | })(jQuery); 44 | -------------------------------------------------------------------------------- /example/routes.coffee: -------------------------------------------------------------------------------- 1 | Router.addRoutes [{ 2 | route: 'home' 3 | path: '/' 4 | controller: "ExampleController" 5 | page: 6 | title: "jquery-select2" 7 | subtitle: "A Blaze UI select2 component that supports reactive search." 8 | },{ 9 | route: "officialDocs" 10 | path: "http://ivaynberg.github.io/select2/" 11 | external: true 12 | page: 13 | title: "Official Docs" 14 | subtitle: "Select2 Pro" 15 | nav: 16 | priority: 999 17 | icon: "icon-book" 18 | },{ 19 | route: 'gitHub' 20 | path: "https://github.com/LumaPictures/meteor-jquery-select2" 21 | external: true 22 | page: 23 | title: "GitHub" 24 | subtitle: "Open Source Repo" 25 | nav: 26 | priority: 1000 27 | icon: 'icon-github' 28 | },{ 29 | route: 'reportBugs' 30 | path: "https://github.com/LumaPictures/meteor-jquery-select2/issues/new" 31 | external: true 32 | page: 33 | title: "Report Bugs" 34 | subtitle: "GitHub Issues" 35 | },{ 36 | route: 'source' 37 | path: "http://LumaPictures.github.io/meteor-jquery-select2/" 38 | external: true 39 | page: 40 | title: "Annotated Source" 41 | subtitle: "GitHub pages generated by Groc" 42 | nav: 43 | priority: 1001 44 | icon: 'icon-code' 45 | },{ 46 | route: 'build' 47 | path: "https://travis-ci.org/LumaPictures/meteor-jquery-select2" 48 | external: true 49 | page: 50 | title: "Build Status" 51 | subtitle: "Continuous Integration by Travis CI" 52 | nav: 53 | priority: 1002 54 | icon: 'icon-cogs' 55 | }] 56 | 57 | Router.initialize() 58 | -------------------------------------------------------------------------------- /example/client/views/select2ExamplesPanel/select2Configurations/select2Configurations.coffee: -------------------------------------------------------------------------------- 1 | # # select2ConfigurationsView 2 | 3 | # ##### select2ConfigurationsView.created() 4 | Template.select2ConfigurationsView.created = -> 5 | Session.set "reactive-select", "AK" 6 | 7 | # ##### select2ConfigurationsView.rendered() 8 | Template.select2ConfigurationsView.rendered = -> return 9 | 10 | # ##### select2ConfigurationsView.destroyed() 11 | Template.select2ConfigurationsView.destroyed = -> return 12 | 13 | # ##### select2ConfigurationsView.helpers() 14 | Template.select2ConfigurationsView.helpers 15 | countryPlaceholder: -> return "Choose a Country..." 16 | teamsPlaceholder: -> return "Your Favorite Football Team" 17 | statePlaceholder: -> return "Choose a State..." 18 | fixedSelect: -> return { 19 | minimumResultsForSearch: "-1" 20 | } 21 | liquidSelect: -> return { 22 | minimumResultsForSearch: "-1" 23 | width: "off" 24 | } 25 | disabledSelect: -> return { 26 | disabled: true 27 | } 28 | clearResults: -> return { 29 | allowClear: true 30 | } 31 | minimumSelect: -> return { 32 | minimumInputLength: 2 33 | } 34 | minimumMultipleSelect: -> return { 35 | minimumInputLength: 2 36 | width: "100%" 37 | } 38 | maximumMultipleSelect: -> return { 39 | maximumSelectionSize: 2 40 | width: "100%" 41 | } 42 | reactiveSelection: -> return Session.get "reactive-select" 43 | 44 | # ##### select2ConfigurationsView.events() 45 | Template .select2ConfigurationsView.events 46 | "click .reactive-select": ( event, template ) -> 47 | event.preventDefault() 48 | Session.set "reactive-select", $( event.target ).data "button" 49 | 50 | "change #reactive-select": ( event, template ) -> 51 | Session.set "reactive-select", event.val 52 | -------------------------------------------------------------------------------- /example/smart.lock: -------------------------------------------------------------------------------- 1 | { 2 | "meteor": {}, 3 | "dependencies": { 4 | "basePackages": { 5 | "jquery-select2": { 6 | "path": ".." 7 | }, 8 | "luma-ui": {}, 9 | "githubReadme": {} 10 | }, 11 | "packages": { 12 | "jquery-select2": { 13 | "path": ".." 14 | }, 15 | "luma-ui": { 16 | "git": "https://github.com/lumapictures/meteor-luma-ui.git", 17 | "tag": "v0.1.20", 18 | "commit": "e36c4634eaaf0cb9b0ed51da4715e75cf4075979" 19 | }, 20 | "githubReadme": { 21 | "git": "https://github.com/austinrivas/meteor-githubReadme.git", 22 | "tag": "v1.3.3", 23 | "commit": "bad1919563d230c97338afa7f6d70c9a6397d911" 24 | }, 25 | "luma-component": { 26 | "git": "https://github.com/LumaPictures/meteor-luma-component", 27 | "tag": "v1.0.4", 28 | "commit": "a511d82741bc40dfc10247af8524fa9ea0eacfde" 29 | }, 30 | "blaze-layout": { 31 | "git": "https://github.com/EventedMind/blaze-layout.git", 32 | "tag": "v0.2.5", 33 | "commit": "273e3ab7d005d91a1a59c71bd224533b4dae2fbd" 34 | }, 35 | "iron-router": { 36 | "git": "https://github.com/EventedMind/iron-router.git", 37 | "tag": "v0.7.1", 38 | "commit": "d1ffb3f06ea4c112132b030f2eb1a70b81675ecb" 39 | }, 40 | "iron-router-progress": { 41 | "git": "https://github.com/Multiply/iron-router-progress.git", 42 | "tag": "v0.3.1", 43 | "commit": "3f7900feb4bb70a1289b39a1fdcd1f438c0335b3" 44 | }, 45 | "jquery-ui": { 46 | "git": "https://github.com/TimHeckel/meteor-jquery-ui.git", 47 | "tag": "v1.9.2", 48 | "commit": "c437d45edcf1367df8d5ffa8bad2867758030bd2" 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /vendor/select2/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | echo -n "Enter the version for this release: " 5 | 6 | read ver 7 | 8 | if [ ! $ver ]; then 9 | echo "Invalid version." 10 | exit 11 | fi 12 | 13 | name="select2" 14 | js="$name.js" 15 | mini="$name.min.js" 16 | css="$name.css" 17 | release="$name-$ver" 18 | tag="$ver" 19 | branch="build-$ver" 20 | curbranch=`git branch | grep "*" | sed "s/* //"` 21 | timestamp=$(date) 22 | tokens="s/@@ver@@/$ver/g;s/\@@timestamp@@/$timestamp/g" 23 | remote="github" 24 | 25 | echo "Pulling from origin" 26 | 27 | git pull 28 | 29 | echo "Updating Version Identifiers" 30 | 31 | sed -E -e "s/\"version\": \"([0-9\.]+)\",/\"version\": \"$ver\",/g" -i -- bower.json select2.jquery.json component.json composer.json package.json 32 | 33 | git add bower.json 34 | git add select2.jquery.json 35 | git add component.json 36 | git add composer.json 37 | git add package.json 38 | 39 | git commit -m "modified version identifiers in descriptors for release $ver" 40 | git push 41 | 42 | git branch "$branch" 43 | git checkout "$branch" 44 | 45 | echo "Tokenizing..." 46 | 47 | find . -name "$js" | xargs -I{} sed -e "$tokens" -i -- {} 48 | find . -name "$css" | xargs -I{} sed -e "$tokens" -i -- {} 49 | 50 | sed -e "s/latest/$ver/g" -i -- bower.json 51 | 52 | git add "$js" 53 | git add "$css" 54 | 55 | echo "Minifying..." 56 | 57 | echo "/*" > "$mini" 58 | cat LICENSE | sed "$tokens" >> "$mini" 59 | echo "*/" >> "$mini" 60 | 61 | curl -s \ 62 | --data-urlencode "js_code@$js" \ 63 | http://marijnhaverbeke.nl/uglifyjs \ 64 | >> "$mini" 65 | 66 | git add "$mini" 67 | 68 | git commit -m "release $ver" 69 | 70 | echo "Tagging..." 71 | git tag -a "$tag" -m "tagged version $ver" 72 | git push "$remote" --tags 73 | 74 | echo "Cleaning Up..." 75 | 76 | git checkout "$curbranch" 77 | git branch -D "$branch" 78 | 79 | echo "Done" 80 | -------------------------------------------------------------------------------- /vendor/select2/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "select2", 3 | "repo": "ivaynberg/select2", 4 | "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.", 5 | "version": "3.4.8", 6 | "demo": "http://ivaynberg.github.io/select2/", 7 | "keywords": [ 8 | "jquery" 9 | ], 10 | "main": "select2.js", 11 | "styles": [ 12 | "select2.css", 13 | "select2-bootstrap.css" 14 | ], 15 | "scripts": [ 16 | "select2.js", 17 | "select2_locale_ar.js", 18 | "select2_locale_bg.js", 19 | "select2_locale_ca.js", 20 | "select2_locale_cs.js", 21 | "select2_locale_da.js", 22 | "select2_locale_de.js", 23 | "select2_locale_el.js", 24 | "select2_locale_es.js", 25 | "select2_locale_et.js", 26 | "select2_locale_eu.js", 27 | "select2_locale_fa.js", 28 | "select2_locale_fi.js", 29 | "select2_locale_fr.js", 30 | "select2_locale_gl.js", 31 | "select2_locale_he.js", 32 | "select2_locale_hr.js", 33 | "select2_locale_hu.js", 34 | "select2_locale_id.js", 35 | "select2_locale_is.js", 36 | "select2_locale_it.js", 37 | "select2_locale_ja.js", 38 | "select2_locale_ka.js", 39 | "select2_locale_ko.js", 40 | "select2_locale_lt.js", 41 | "select2_locale_lv.js", 42 | "select2_locale_mk.js", 43 | "select2_locale_ms.js", 44 | "select2_locale_nl.js", 45 | "select2_locale_no.js", 46 | "select2_locale_pl.js", 47 | "select2_locale_pt-BR.js", 48 | "select2_locale_pt-PT.js", 49 | "select2_locale_ro.js", 50 | "select2_locale_ru.js", 51 | "select2_locale_sk.js", 52 | "select2_locale_sv.js", 53 | "select2_locale_th.js", 54 | "select2_locale_tr.js", 55 | "select2_locale_uk.js", 56 | "select2_locale_vi.js", 57 | "select2_locale_zh-CN.js", 58 | "select2_locale_zh-TW.js" 59 | ], 60 | "images": [ 61 | "select2-spinner.gif", 62 | "select2.png", 63 | "select2x2.png" 64 | ], 65 | "license": "MIT" 66 | } 67 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_sk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Slovak translation. 3 | * 4 | * Author: David Vallner 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | // use text for the numbers 2 through 4 9 | var smallNumbers = { 10 | 2: function(masc) { return (masc ? "dva" : "dve"); }, 11 | 3: function() { return "tri"; }, 12 | 4: function() { return "štyri"; } 13 | } 14 | $.extend($.fn.select2.defaults, { 15 | formatNoMatches: function () { return "Nenašli sa žiadne položky"; }, 16 | formatInputTooShort: function (input, min) { 17 | var n = min - input.length; 18 | if (n == 1) { 19 | return "Prosím zadajte ešte jeden znak"; 20 | } else if (n <= 4) { 21 | return "Prosím zadajte ešte ďalšie "+smallNumbers[n](true)+" znaky"; 22 | } else { 23 | return "Prosím zadajte ešte ďalších "+n+" znakov"; 24 | } 25 | }, 26 | formatInputTooLong: function (input, max) { 27 | var n = input.length - max; 28 | if (n == 1) { 29 | return "Prosím zadajte o jeden znak menej"; 30 | } else if (n <= 4) { 31 | return "Prosím zadajte o "+smallNumbers[n](true)+" znaky menej"; 32 | } else { 33 | return "Prosím zadajte o "+n+" znakov menej"; 34 | } 35 | }, 36 | formatSelectionTooBig: function (limit) { 37 | if (limit == 1) { 38 | return "Môžete zvoliť len jednu položku"; 39 | } else if (limit <= 4) { 40 | return "Môžete zvoliť najviac "+smallNumbers[limit](false)+" položky"; 41 | } else { 42 | return "Môžete zvoliť najviac "+limit+" položiek"; 43 | } 44 | }, 45 | formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky…"; }, 46 | formatSearching: function () { return "Vyhľadávanie…"; } 47 | }); 48 | })(jQuery); 49 | -------------------------------------------------------------------------------- /vendor/select2/select2_locale_cs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Czech translation. 3 | * 4 | * Author: Michal Marek 5 | * Author - sklonovani: David Vallner 6 | */ 7 | (function ($) { 8 | "use strict"; 9 | // use text for the numbers 2 through 4 10 | var smallNumbers = { 11 | 2: function(masc) { return (masc ? "dva" : "dvě"); }, 12 | 3: function() { return "tři"; }, 13 | 4: function() { return "čtyři"; } 14 | } 15 | $.extend($.fn.select2.defaults, { 16 | formatNoMatches: function () { return "Nenalezeny žádné položky"; }, 17 | formatInputTooShort: function (input, min) { 18 | var n = min - input.length; 19 | if (n == 1) { 20 | return "Prosím zadejte ještě jeden znak"; 21 | } else if (n <= 4) { 22 | return "Prosím zadejte ještě další "+smallNumbers[n](true)+" znaky"; 23 | } else { 24 | return "Prosím zadejte ještě dalších "+n+" znaků"; 25 | } 26 | }, 27 | formatInputTooLong: function (input, max) { 28 | var n = input.length - max; 29 | if (n == 1) { 30 | return "Prosím zadejte o jeden znak méně"; 31 | } else if (n <= 4) { 32 | return "Prosím zadejte o "+smallNumbers[n](true)+" znaky méně"; 33 | } else { 34 | return "Prosím zadejte o "+n+" znaků méně"; 35 | } 36 | }, 37 | formatSelectionTooBig: function (limit) { 38 | if (limit == 1) { 39 | return "Můžete zvolit jen jednu položku"; 40 | } else if (limit <= 4) { 41 | return "Můžete zvolit maximálně "+smallNumbers[limit](false)+" položky"; 42 | } else { 43 | return "Můžete zvolit maximálně "+limit+" položek"; 44 | } 45 | }, 46 | formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; }, 47 | formatSearching: function () { return "Vyhledávání…"; } 48 | }); 49 | })(jQuery); 50 | -------------------------------------------------------------------------------- /vendor/select2/select2-bootstrap.css: -------------------------------------------------------------------------------- 1 | .form-control .select2-choice { 2 | border: 0; 3 | border-radius: 2px; 4 | } 5 | 6 | .form-control .select2-choice .select2-arrow { 7 | border-radius: 0 2px 2px 0; 8 | } 9 | 10 | .form-control.select2-container { 11 | height: auto !important; 12 | padding: 0; 13 | } 14 | 15 | .form-control.select2-container.select2-dropdown-open { 16 | border-color: #5897FB; 17 | border-radius: 3px 3px 0 0; 18 | } 19 | 20 | .form-control .select2-container.select2-dropdown-open .select2-choices { 21 | border-radius: 3px 3px 0 0; 22 | } 23 | 24 | .form-control.select2-container .select2-choices { 25 | border: 0 !important; 26 | border-radius: 3px; 27 | } 28 | 29 | .control-group.warning .select2-container .select2-choice, 30 | .control-group.warning .select2-container .select2-choices, 31 | .control-group.warning .select2-container-active .select2-choice, 32 | .control-group.warning .select2-container-active .select2-choices, 33 | .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice, 34 | .control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices, 35 | .control-group.warning .select2-container-multi.select2-container-active .select2-choices { 36 | border: 1px solid #C09853 !important; 37 | } 38 | 39 | .control-group.warning .select2-container .select2-choice div { 40 | border-left: 1px solid #C09853 !important; 41 | background: #FCF8E3 !important; 42 | } 43 | 44 | .control-group.error .select2-container .select2-choice, 45 | .control-group.error .select2-container .select2-choices, 46 | .control-group.error .select2-container-active .select2-choice, 47 | .control-group.error .select2-container-active .select2-choices, 48 | .control-group.error .select2-dropdown-open.select2-drop-above .select2-choice, 49 | .control-group.error .select2-dropdown-open.select2-drop-above .select2-choices, 50 | .control-group.error .select2-container-multi.select2-container-active .select2-choices { 51 | border: 1px solid #B94A48 !important; 52 | } 53 | 54 | .control-group.error .select2-container .select2-choice div { 55 | border-left: 1px solid #B94A48 !important; 56 | background: #F2DEDE !important; 57 | } 58 | 59 | .control-group.info .select2-container .select2-choice, 60 | .control-group.info .select2-container .select2-choices, 61 | .control-group.info .select2-container-active .select2-choice, 62 | .control-group.info .select2-container-active .select2-choices, 63 | .control-group.info .select2-dropdown-open.select2-drop-above .select2-choice, 64 | .control-group.info .select2-dropdown-open.select2-drop-above .select2-choices, 65 | .control-group.info .select2-container-multi.select2-container-active .select2-choices { 66 | border: 1px solid #3A87AD !important; 67 | } 68 | 69 | .control-group.info .select2-container .select2-choice div { 70 | border-left: 1px solid #3A87AD !important; 71 | background: #D9EDF7 !important; 72 | } 73 | 74 | .control-group.success .select2-container .select2-choice, 75 | .control-group.success .select2-container .select2-choices, 76 | .control-group.success .select2-container-active .select2-choice, 77 | .control-group.success .select2-container-active .select2-choices, 78 | .control-group.success .select2-dropdown-open.select2-drop-above .select2-choice, 79 | .control-group.success .select2-dropdown-open.select2-drop-above .select2-choices, 80 | .control-group.success .select2-container-multi.select2-container-active .select2-choices { 81 | border: 1px solid #468847 !important; 82 | } 83 | 84 | .control-group.success .select2-container .select2-choice div { 85 | border-left: 1px solid #468847 !important; 86 | background: #DFF0D8 !important; 87 | } 88 | -------------------------------------------------------------------------------- /vendor/select2/README.md: -------------------------------------------------------------------------------- 1 | Select2 2 | ======= 3 | 4 | Select2 is a jQuery-based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results. 5 | 6 | To get started, checkout examples and documentation at http://ivaynberg.github.com/select2 7 | 8 | Use cases 9 | --------- 10 | 11 | * Enhancing native selects with search. 12 | * Enhancing native selects with a better multi-select interface. 13 | * Loading data from JavaScript: easily load items via ajax and have them searchable. 14 | * Nesting optgroups: native selects only support one level of nested. Select2 does not have this restriction. 15 | * Tagging: ability to add new items on the fly. 16 | * Working with large, remote datasets: ability to partially load a dataset based on the search term. 17 | * Paging of large datasets: easy support for loading more pages when the results are scrolled to the end. 18 | * Templating: support for custom rendering of results and selections. 19 | 20 | Browser compatibility 21 | --------------------- 22 | * IE 8+ 23 | * Chrome 8+ 24 | * Firefox 10+ 25 | * Safari 3+ 26 | * Opera 10.6+ 27 | 28 | Usage 29 | ----- 30 | You can source Select2 directly from a [CDN like JSDliver](http://www.jsdelivr.com/#!select2), [download it from this GitHub repo](https://github.com/ivaynberg/select2/tags), or use one of the integrations below. 31 | 32 | Integrations 33 | ------------ 34 | 35 | * [Wicket-Select2](https://github.com/ivaynberg/wicket-select2) (Java / [Apache Wicket](http://wicket.apache.org)) 36 | * [select2-rails](https://github.com/argerim/select2-rails) (Ruby on Rails) 37 | * [AngularUI](http://angular-ui.github.com/#directives-select2) ([AngularJS](angularjs.org)) 38 | * [Django](https://github.com/applegrew/django-select2) 39 | * [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin) 40 | * [Symfony2](https://github.com/avocode/FormExtensions) 41 | * [Bootstrap 2](https://github.com/t0m/select2-bootstrap-css) and [Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins) 42 | * [Meteor](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/)) 43 | * [Yii 2.x](http://demos.krajee.com/widgets#select2) 44 | * [Yii 1.x](https://github.com/tonybolzan/yii-select2) 45 | 46 | Internationalization (i18n) 47 | --------------------------- 48 | 49 | Select2 supports multiple languages by simply including the right 50 | language JS file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.). 51 | 52 | Missing a language? Just copy `select2_locale_en.js.template`, translate 53 | it, and make a pull request back to Select2 here on GitHub. 54 | 55 | Bug tracker 56 | ----------- 57 | 58 | Have a bug? Please create an issue here on GitHub! 59 | 60 | https://github.com/ivaynberg/select2/issues 61 | 62 | Mailing list 63 | ------------ 64 | 65 | Have a question? Ask on our mailing list! 66 | 67 | select2@googlegroups.com 68 | 69 | https://groups.google.com/d/forum/select2 70 | 71 | 72 | Copyright and license 73 | --------------------- 74 | 75 | Copyright 2012 Igor Vaynberg 76 | 77 | This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU 78 | General Public License version 2 (the "GPL License"). You may choose either license to govern your 79 | use of this software only upon the condition that you accept all of the terms of either the Apache 80 | License or the GPL License. 81 | 82 | You may obtain a copy of the Apache License and the GPL License in the LICENSE file, or at: 83 | 84 | http://www.apache.org/licenses/LICENSE-2.0 85 | http://www.gnu.org/licenses/gpl-2.0.html 86 | 87 | Unless required by applicable law or agreed to in writing, software distributed under the Apache License 88 | or the GPL License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 89 | either express or implied. See the Apache License and the GPL License for the specific language governing 90 | permissions and limitations under the Apache License and the GPL License. 91 | -------------------------------------------------------------------------------- /example/client/views/select2ExamplesPanel/select2Configurations/select2Configurations.html: -------------------------------------------------------------------------------- 1 | 183 | 184 | 216 | 217 | 242 | 243 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jquery-select2 [![Build Status](https://travis-ci.org/LumaPictures/meteor-jquery-select2.svg?branch=master)](https://travis-ci.org/LumaPictures/meteor-jquery-select2) 2 | ### A Blaze UI select2 component that supports reactive search. 3 | 4 | ## [Official Docs](http://ivaynberg.github.io/select2/) 5 | ## [Live Example](http://jquery-select2.meteor.com) 6 | 7 | ## Local Example 8 | ``` 9 | $ git clone https://github.com/LumaPictures/meteor-jquery-select2 10 | $ cd LumaPictures/meteor-jquery-select2 11 | $ mrt && meteor 12 | ``` 13 | 14 | ## Local Tests 15 | ``` 16 | $ git clone https://github.com/LumaPictures/meteor-jquery-select2 17 | $ cd LumaPictures/meteor-jquery-select2 18 | $ mrt && meteor test-packages jquery-select2 19 | ``` 20 | 21 | ## Usage 22 | 23 | ### Initialization 24 | 25 | Initializing a select2 component is easy, just include the following block helper in one of your templates. 26 | 27 | ```html 28 | {{#Select2 placeholder="Choose a Country" }} 29 | {{#each country }} 30 | 31 | {{/each}} 32 | {{/Select2}} 33 | ``` 34 | 35 | If you need opt groups everything still works the same. 36 | 37 | ```html 38 | {{#select2 placeholder="Choose a State" }} 39 | {{#each timezone }} 40 | 41 | {{#each states}} 42 | 43 | {{/each}} 44 | 45 | {{/each}} 46 | {{/select2}} 47 | ``` 48 | 49 | Generally I prefer to setup my initialization parameters in a template helper and pass in a complete initialization object. 50 | 51 | ```coffeescript 52 | Template.taskForm.helpers 53 | formSelectorDefaultOptions: -> return { 54 | width: "100%" 55 | } 56 | taskTypeSelector: -> return { 57 | placeholder: "Select a task type" 58 | tabindex: 1 59 | options: Template.taskForm.formSelectorDefaultOptions() 60 | } 61 | ``` 62 | 63 | Example form using the selector defined above 64 | 65 | ```html 66 | 108 | ``` 109 | 110 | ### Data Sources 111 | 112 | #### DOM 113 | 114 | The easiest and least flexible way. Just place your options in the `select2` block helper and go. 115 | 116 | If you are not using a placeholder be sure to specify which option is selected by default or the `select2` component will be empty. 117 | 118 | ```html 119 | {{#Select2}} 120 | 121 | 122 | {{/Select2}} 123 | ``` 124 | 125 | #### Array 126 | 127 | This method will cover most of your use cases, is quite flexible, and pretty freakin simple. 128 | 129 | In order to use an array data source to populate the select2 component you must specify the `data` property of the select2 `options` object. 130 | 131 | ```coffeescript 132 | Template..helpers 133 | ArraySource: -> return { 134 | 135 | # Placeholder 136 | placeholder: "Select an Option..." 137 | 138 | # Tab Index 139 | tabindex: 3 140 | 141 | # Select2 Options 142 | options: 143 | data: 144 | # The results used to populate the Select2 Component 145 | results: [{ 146 | id: 0 147 | tag: "enhancement" 148 | }, { 149 | id: 1 150 | tag: "bug" 151 | }, { 152 | id: 2 153 | tag: "duplicate" 154 | }, { 155 | id: 3 156 | tag: "invalid" 157 | }, { 158 | id: 4 159 | tag: "wontfix" 160 | }] 161 | # The display text for each option 162 | text: ( item ) -> item.tag 163 | # Preformat the selection 164 | formatSelection: ( item ) -> item.tag 165 | # Preformat result 166 | formatResult: ( item ) -> item.tag 167 | } 168 | ``` 169 | 170 | ```html 171 | {{> Select2 ArraySource }} 172 | ``` 173 | 174 | #### Subscription ( [milestone v0.3](https://github.com/LumaPictures/meteor-jquery-select2/issues?milestone=2&state=open) ) 175 | 176 | The most complex and powerful option of the three, very useful when you have a large set of options that is stored in a collection. 177 | 178 | This package automatically pages and searches extremely large collections by performing all searches on the server and providing 179 | its own publication. This works in a very similar fashion to my [ jquery-datatables package ](https://atmospherejs.com/package/jquery-datatables). 180 | 181 | ```html 182 | {{> select2 subscription="all_countries" }} 183 | ``` 184 | 185 | On the server you will have to publish a `Select2Component` publication or provide your own searchable publication. 186 | 187 | ```coffeescript 188 | Select2Component.publish "all_countries", Countries, {} 189 | ``` 190 | 191 | ### Events 192 | 193 | There are several ways you can bind events to a select2 component. 194 | 195 | ###### Provide a selector and use `Template.yourView.events` 196 | 197 | Assuming you have a template view like this : 198 | 199 | ```html 200 | 207 | ``` 208 | 209 | ```coffeescript 210 | Template .select2ExamplesPanelView.events 211 | "change #country-selector": ( event, template ) -> 212 | console.log "change", { 213 | val:event.val 214 | added:event.added 215 | removed:event.removed 216 | } 217 | "select2-opening #country-selector": ( event, template ) -> 218 | console.log "opening" 219 | "select2-open #country-selector": ( event, template ) -> 220 | console.log "open" 221 | "select2-close #country-selector": ( event, template ) -> 222 | console.log "close" 223 | "select2-highlight #country-selector": ( event, template )-> 224 | console.log "highlighted", { 225 | val: event.val 226 | choice: event.choice 227 | } 228 | "select2-selecting #country-selector": ( event, template ) -> 229 | console.log "selecting", { 230 | val: event.val 231 | choice: event.choice 232 | } 233 | "select2-removing #country-selector": ( event, template ) -> 234 | console.log "removing", { 235 | val: event.val 236 | choice: event.choice 237 | } 238 | "select2-removed #country-selector": ( event, template ) -> 239 | console.log "removed", { 240 | val: event.val 241 | choice: event.choice 242 | } 243 | "select2-loaded #country-selector": ( event, template ) -> 244 | console.log "loaded (data property omitted for brevity)" 245 | "select2-focus #country-selector": ( event, template ) -> 246 | console.log "focus" 247 | "select2-blur #country-selector": ( event, template ) -> 248 | console.log "blur" 249 | ``` 250 | 251 | A non trivial usage, and what is currently being used in the example app. 252 | 253 | ```html 254 | 270 | ``` 271 | 272 | ```coffeescript 273 | Template.select2ExamplesPanelView.helpers 274 | id: -> return "select2-examples-panel-selector" 275 | selectedView: -> 276 | return Template[ Session.get Template.select2ExamplesPanelView.selector() ] 277 | options: -> return [{ 278 | value: "select2ConfigurationsView" 279 | label: "Configurations" 280 | }, { 281 | value: "select2DataSourcesView" 282 | label: "Data Sources" 283 | }] 284 | 285 | Template.select2ExamplesPanelView.events 286 | "change #select2-examples-panel-selector": ( event, template ) -> 287 | Session.set event.target.id, event.val 288 | ``` 289 | 290 | ###### Provide a selector and use jQuery 291 | * This technique is useful when a selector needs to respond to external changes 292 | * NOTE : All selectors must be unique in the page scope 293 | 294 | ```html 295 | 296 | {{#select2 placeholder="Choose a Country" selector="the-world" }} 297 | {{> countries }} 298 | {{/select2}} 299 | ``` 300 | 301 | ```coffeescript 302 | $("#destroy-the-world").click -> $("#the-world").select2 "destroy" 303 | ``` 304 | 305 | ###### Pass in your own event map through the component ( [ milestone v0.4 ](https://github.com/LumaPictures/meteor-jquery-select2/issues?milestone=3&state=open) ) 306 | * This technique is useful when you need to perform custom actions on selection events 307 | * Does not require a selector to be defined 308 | 309 | ```html 310 | {{#select2 placeholder="Choose a Country" selector="the-world" events=logAllEvents }} 311 | {{> countries }} 312 | {{/select2}} 313 | ``` 314 | 315 | ```coffeescript 316 | logAllEvents = 317 | "change": ( event ) -> console.log "change "+JSON.stringify({val:event.val, added:event.added, removed:event.removed}) 318 | "select2-opening": -> console.log "opening" 319 | "select2-open": -> console.log "open" 320 | "select2-close": -> console.log "close" 321 | "select2-highlight": ( event ) -> console.log "highlighted val="+ event.val+" choice="+ JSON.stringify(event.choice) 322 | "select2-selecting": ( event ) -> console.log "selecting val="+ event.val+" choice="+ JSON.stringify(event.choice) 323 | "select2-removing": ( event ) -> console.log "removing val="+ event.val+" choice="+ JSON.stringify(event.choice) 324 | "select2-removed": ( event ) -> console.log "removed val="+ event.val+" choice="+ JSON.stringify(event.choice) 325 | "select2-loaded": ( event ) -> console.log "loaded (data property omitted for brevity)" 326 | "select2-focus": ( event ) -> console.log "focus" 327 | "select2-blur": ( event ) -> console.log "blur" 328 | ``` 329 | 330 | Note: This method is identical to specifying a selector and saying 331 | 332 | ```javascript 333 | $("#your-selector") 334 | .on("change", function(e) { console.log("change "+JSON.stringify({val:e.val, added:e.added, removed:e.removed})); }) 335 | .on("select2-opening", function() { console.log("opening"); }) 336 | .on("select2-open", function() { console.log("open"); }) 337 | .on("select2-close", function() { console.log("close"); }) 338 | .on("select2-highlight", function(e) { console.log("highlighted val="+ e.val+" choice="+ JSON.stringify(e.choice));}) 339 | .on("select2-selecting", function(e) { console.log("selecting val="+ e.val+" choice="+ JSON.stringify(e.choice));}) 340 | .on("select2-removing", function(e) { console.log("removing val="+ e.val+" choice="+ JSON.stringify(e.choice));}) 341 | .on("select2-removed", function(e) { console.log("removed val="+ e.val+" choice="+ JSON.stringify(e.choice));}) 342 | .on("select2-loaded", function(e) { console.log("loaded (data property omitted for brevity)");}) 343 | .on("select2-focus", function(e) { console.log("focus");}) 344 | .on("select2-blur", function(e) { console.log("blur");}); 345 | ``` 346 | 347 | ## Styling 348 | 349 | This package provides no styles or assets to your app intentionally. 350 | 351 | All of the default select2 styles and assets are included in the `vendor` directory and can be loaded into your application via the following methods: 352 | 353 | ###### Load files by path 354 | * Assumes your less / css files are one dir up from your app root 355 | 356 | `@import "../packages/jquery-select2/vendor/select2/select2.css";` 357 | 358 | ###### Symlink the whole library dir 359 | 360 | ```shell 361 | $ cd public && ln -s ../packages/jquery-select2/vendor/select2 ./ 362 | ``` 363 | 364 | ## Contributing 365 | 366 | * [Report Bugs](https://github.com/LumaPictures/meteor-jquery-select2/issues/new) 367 | * [select2 Wiki](https://github.com/ivaynberg/select2/wiki) 368 | * [select2 forum Announcement](https://groups.google.com/forum/#!topic/select2/C1yc2X7eaGo) 369 | * [Meteor-Talk Announcement](https://groups.google.com/forum/#!topic/meteor-talk/e6whzTDiRE0) -------------------------------------------------------------------------------- /vendor/select2/select2.css: -------------------------------------------------------------------------------- 1 | /* 2 | Version: @@ver@@ Timestamp: @@timestamp@@ 3 | */ 4 | .select2-container { 5 | margin: 0; 6 | position: relative; 7 | display: inline-block; 8 | /* inline-block for ie7 */ 9 | zoom: 1; 10 | *display: inline; 11 | vertical-align: middle; 12 | } 13 | 14 | .select2-container, 15 | .select2-drop, 16 | .select2-search, 17 | .select2-search input { 18 | /* 19 | Force border-box so that % widths fit the parent 20 | container without overlap because of margin/padding. 21 | More Info : http://www.quirksmode.org/css/box.html 22 | */ 23 | -webkit-box-sizing: border-box; /* webkit */ 24 | -moz-box-sizing: border-box; /* firefox */ 25 | box-sizing: border-box; /* css3 */ 26 | } 27 | 28 | .select2-container .select2-choice { 29 | display: block; 30 | height: 26px; 31 | padding: 0 0 0 8px; 32 | overflow: hidden; 33 | position: relative; 34 | 35 | border: 1px solid #aaa; 36 | white-space: nowrap; 37 | line-height: 26px; 38 | color: #444; 39 | text-decoration: none; 40 | 41 | border-radius: 4px; 42 | 43 | background-clip: padding-box; 44 | 45 | -webkit-touch-callout: none; 46 | -webkit-user-select: none; 47 | -moz-user-select: none; 48 | -ms-user-select: none; 49 | user-select: none; 50 | 51 | background-color: #fff; 52 | background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.5, #fff)); 53 | background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 50%); 54 | background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 50%); 55 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0); 56 | background-image: linear-gradient(to top, #eee 0%, #fff 50%); 57 | } 58 | 59 | .select2-container.select2-drop-above .select2-choice { 60 | border-bottom-color: #aaa; 61 | 62 | border-radius: 0 0 4px 4px; 63 | 64 | background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(0.9, #fff)); 65 | background-image: -webkit-linear-gradient(center bottom, #eee 0%, #fff 90%); 66 | background-image: -moz-linear-gradient(center bottom, #eee 0%, #fff 90%); 67 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0); 68 | background-image: linear-gradient(to bottom, #eee 0%, #fff 90%); 69 | } 70 | 71 | .select2-container.select2-allowclear .select2-choice .select2-chosen { 72 | margin-right: 42px; 73 | } 74 | 75 | .select2-container .select2-choice > .select2-chosen { 76 | margin-right: 26px; 77 | display: block; 78 | overflow: hidden; 79 | 80 | white-space: nowrap; 81 | 82 | text-overflow: ellipsis; 83 | float: none; 84 | width: auto; 85 | } 86 | 87 | .select2-container .select2-choice abbr { 88 | display: none; 89 | width: 12px; 90 | height: 12px; 91 | position: absolute; 92 | right: 24px; 93 | top: 8px; 94 | 95 | font-size: 1px; 96 | text-decoration: none; 97 | 98 | border: 0; 99 | background: url('select2.png') right top no-repeat; 100 | cursor: pointer; 101 | outline: 0; 102 | } 103 | 104 | .select2-container.select2-allowclear .select2-choice abbr { 105 | display: inline-block; 106 | } 107 | 108 | .select2-container .select2-choice abbr:hover { 109 | background-position: right -11px; 110 | cursor: pointer; 111 | } 112 | 113 | .select2-drop-mask { 114 | border: 0; 115 | margin: 0; 116 | padding: 0; 117 | position: fixed; 118 | left: 0; 119 | top: 0; 120 | min-height: 100%; 121 | min-width: 100%; 122 | height: auto; 123 | width: auto; 124 | opacity: 0; 125 | z-index: 9998; 126 | /* styles required for IE to work */ 127 | background-color: #fff; 128 | filter: alpha(opacity=0); 129 | } 130 | 131 | .select2-drop { 132 | width: 100%; 133 | margin-top: -1px; 134 | position: absolute; 135 | z-index: 9999; 136 | top: 100%; 137 | 138 | background: #fff; 139 | color: #000; 140 | border: 1px solid #aaa; 141 | border-top: 0; 142 | 143 | border-radius: 0 0 4px 4px; 144 | 145 | -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15); 146 | box-shadow: 0 4px 5px rgba(0, 0, 0, .15); 147 | } 148 | 149 | .select2-drop.select2-drop-above { 150 | margin-top: 1px; 151 | border-top: 1px solid #aaa; 152 | border-bottom: 0; 153 | 154 | border-radius: 4px 4px 0 0; 155 | 156 | -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); 157 | box-shadow: 0 -4px 5px rgba(0, 0, 0, .15); 158 | } 159 | 160 | .select2-drop-active { 161 | border: 1px solid #5897fb; 162 | border-top: none; 163 | } 164 | 165 | .select2-drop.select2-drop-above.select2-drop-active { 166 | border-top: 1px solid #5897fb; 167 | } 168 | 169 | .select2-drop-auto-width { 170 | border-top: 1px solid #aaa; 171 | width: auto; 172 | } 173 | 174 | .select2-drop-auto-width .select2-search { 175 | padding-top: 4px; 176 | } 177 | 178 | .select2-container .select2-choice .select2-arrow { 179 | display: inline-block; 180 | width: 18px; 181 | height: 100%; 182 | position: absolute; 183 | right: 0; 184 | top: 0; 185 | 186 | border-left: 1px solid #aaa; 187 | border-radius: 0 4px 4px 0; 188 | 189 | background-clip: padding-box; 190 | 191 | background: #ccc; 192 | background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee)); 193 | background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%); 194 | background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%); 195 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0); 196 | background-image: linear-gradient(to top, #ccc 0%, #eee 60%); 197 | } 198 | 199 | .select2-container .select2-choice .select2-arrow b { 200 | display: block; 201 | width: 100%; 202 | height: 100%; 203 | background: url('select2.png') no-repeat 0 1px; 204 | } 205 | 206 | .select2-search { 207 | display: inline-block; 208 | width: 100%; 209 | min-height: 26px; 210 | margin: 0; 211 | padding-left: 4px; 212 | padding-right: 4px; 213 | 214 | position: relative; 215 | z-index: 10000; 216 | 217 | white-space: nowrap; 218 | } 219 | 220 | .select2-search input { 221 | width: 100%; 222 | height: auto !important; 223 | min-height: 26px; 224 | padding: 4px 20px 4px 5px; 225 | margin: 0; 226 | 227 | outline: 0; 228 | font-family: sans-serif; 229 | font-size: 1em; 230 | 231 | border: 1px solid #aaa; 232 | border-radius: 0; 233 | 234 | -webkit-box-shadow: none; 235 | box-shadow: none; 236 | 237 | background: #fff url('select2.png') no-repeat 100% -22px; 238 | background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); 239 | background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); 240 | background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); 241 | background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; 242 | } 243 | 244 | .select2-drop.select2-drop-above .select2-search input { 245 | margin-top: 4px; 246 | } 247 | 248 | .select2-search input.select2-active { 249 | background: #fff url('select2-spinner.gif') no-repeat 100%; 250 | background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee)); 251 | background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%); 252 | background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%); 253 | background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; 254 | } 255 | 256 | .select2-container-active .select2-choice, 257 | .select2-container-active .select2-choices { 258 | border: 1px solid #5897fb; 259 | outline: none; 260 | 261 | -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); 262 | box-shadow: 0 0 5px rgba(0, 0, 0, .3); 263 | } 264 | 265 | .select2-dropdown-open .select2-choice { 266 | border-bottom-color: transparent; 267 | -webkit-box-shadow: 0 1px 0 #fff inset; 268 | box-shadow: 0 1px 0 #fff inset; 269 | 270 | border-bottom-left-radius: 0; 271 | border-bottom-right-radius: 0; 272 | 273 | background-color: #eee; 274 | background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(0.5, #eee)); 275 | background-image: -webkit-linear-gradient(center bottom, #fff 0%, #eee 50%); 276 | background-image: -moz-linear-gradient(center bottom, #fff 0%, #eee 50%); 277 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); 278 | background-image: linear-gradient(to top, #fff 0%, #eee 50%); 279 | } 280 | 281 | .select2-dropdown-open.select2-drop-above .select2-choice, 282 | .select2-dropdown-open.select2-drop-above .select2-choices { 283 | border: 1px solid #5897fb; 284 | border-top-color: transparent; 285 | 286 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #eee)); 287 | background-image: -webkit-linear-gradient(center top, #fff 0%, #eee 50%); 288 | background-image: -moz-linear-gradient(center top, #fff 0%, #eee 50%); 289 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0); 290 | background-image: linear-gradient(to bottom, #fff 0%, #eee 50%); 291 | } 292 | 293 | .select2-dropdown-open .select2-choice .select2-arrow { 294 | background: transparent; 295 | border-left: none; 296 | filter: none; 297 | } 298 | .select2-dropdown-open .select2-choice .select2-arrow b { 299 | background-position: -18px 1px; 300 | } 301 | 302 | .select2-hidden-accessible { 303 | border: 0; 304 | clip: rect(0 0 0 0); 305 | height: 1px; 306 | margin: -1px; 307 | overflow: hidden; 308 | padding: 0; 309 | position: absolute; 310 | width: 1px; 311 | } 312 | 313 | /* results */ 314 | .select2-results { 315 | max-height: 200px; 316 | padding: 0 0 0 4px; 317 | margin: 4px 4px 4px 0; 318 | position: relative; 319 | overflow-x: hidden; 320 | overflow-y: auto; 321 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 322 | } 323 | 324 | .select2-results ul.select2-result-sub { 325 | margin: 0; 326 | padding-left: 0; 327 | } 328 | 329 | .select2-results li { 330 | list-style: none; 331 | display: list-item; 332 | background-image: none; 333 | } 334 | 335 | .select2-results li.select2-result-with-children > .select2-result-label { 336 | font-weight: bold; 337 | } 338 | 339 | .select2-results .select2-result-label { 340 | padding: 3px 7px 4px; 341 | margin: 0; 342 | cursor: pointer; 343 | 344 | min-height: 1em; 345 | 346 | -webkit-touch-callout: none; 347 | -webkit-user-select: none; 348 | -moz-user-select: none; 349 | -ms-user-select: none; 350 | user-select: none; 351 | } 352 | 353 | .select2-results-dept-1 .select2-result-label { padding-left: 20px } 354 | .select2-results-dept-2 .select2-result-label { padding-left: 40px } 355 | .select2-results-dept-3 .select2-result-label { padding-left: 60px } 356 | .select2-results-dept-4 .select2-result-label { padding-left: 80px } 357 | .select2-results-dept-5 .select2-result-label { padding-left: 100px } 358 | .select2-results-dept-6 .select2-result-label { padding-left: 110px } 359 | .select2-results-dept-7 .select2-result-label { padding-left: 120px } 360 | 361 | .select2-results .select2-highlighted { 362 | background: #3875d7; 363 | color: #fff; 364 | } 365 | 366 | .select2-results li em { 367 | background: #feffde; 368 | font-style: normal; 369 | } 370 | 371 | .select2-results .select2-highlighted em { 372 | background: transparent; 373 | } 374 | 375 | .select2-results .select2-highlighted ul { 376 | background: #fff; 377 | color: #000; 378 | } 379 | 380 | 381 | .select2-results .select2-no-results, 382 | .select2-results .select2-searching, 383 | .select2-results .select2-selection-limit { 384 | background: #f4f4f4; 385 | display: list-item; 386 | padding-left: 5px; 387 | } 388 | 389 | /* 390 | disabled look for disabled choices in the results dropdown 391 | */ 392 | .select2-results .select2-disabled.select2-highlighted { 393 | color: #666; 394 | background: #f4f4f4; 395 | display: list-item; 396 | cursor: default; 397 | } 398 | .select2-results .select2-disabled { 399 | background: #f4f4f4; 400 | display: list-item; 401 | cursor: default; 402 | } 403 | 404 | .select2-results .select2-selected { 405 | display: none; 406 | } 407 | 408 | .select2-more-results.select2-active { 409 | background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%; 410 | } 411 | 412 | .select2-more-results { 413 | background: #f4f4f4; 414 | display: list-item; 415 | } 416 | 417 | /* disabled styles */ 418 | 419 | .select2-container.select2-container-disabled .select2-choice { 420 | background-color: #f4f4f4; 421 | background-image: none; 422 | border: 1px solid #ddd; 423 | cursor: default; 424 | } 425 | 426 | .select2-container.select2-container-disabled .select2-choice .select2-arrow { 427 | background-color: #f4f4f4; 428 | background-image: none; 429 | border-left: 0; 430 | } 431 | 432 | .select2-container.select2-container-disabled .select2-choice abbr { 433 | display: none; 434 | } 435 | 436 | 437 | /* multiselect */ 438 | 439 | .select2-container-multi .select2-choices { 440 | height: auto !important; 441 | height: 1%; 442 | margin: 0; 443 | padding: 0; 444 | position: relative; 445 | 446 | border: 1px solid #aaa; 447 | cursor: text; 448 | overflow: hidden; 449 | 450 | background-color: #fff; 451 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff)); 452 | background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%); 453 | background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%); 454 | background-image: linear-gradient(to bottom, #eee 1%, #fff 15%); 455 | } 456 | 457 | .select2-locked { 458 | padding: 3px 5px 3px 5px !important; 459 | } 460 | 461 | .select2-container-multi .select2-choices { 462 | min-height: 26px; 463 | } 464 | 465 | .select2-container-multi.select2-container-active .select2-choices { 466 | border: 1px solid #5897fb; 467 | outline: none; 468 | 469 | -webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .3); 470 | box-shadow: 0 0 5px rgba(0, 0, 0, .3); 471 | } 472 | .select2-container-multi .select2-choices li { 473 | float: left; 474 | list-style: none; 475 | } 476 | html[dir="rtl"] .select2-container-multi .select2-choices li 477 | { 478 | float: right; 479 | } 480 | .select2-container-multi .select2-choices .select2-search-field { 481 | margin: 0; 482 | padding: 0; 483 | white-space: nowrap; 484 | } 485 | 486 | .select2-container-multi .select2-choices .select2-search-field input { 487 | padding: 5px; 488 | margin: 1px 0; 489 | 490 | font-family: sans-serif; 491 | font-size: 100%; 492 | color: #666; 493 | outline: 0; 494 | border: 0; 495 | -webkit-box-shadow: none; 496 | box-shadow: none; 497 | background: transparent !important; 498 | } 499 | 500 | .select2-container-multi .select2-choices .select2-search-field input.select2-active { 501 | background: #fff url('select2-spinner.gif') no-repeat 100% !important; 502 | } 503 | 504 | .select2-default { 505 | color: #999 !important; 506 | } 507 | 508 | .select2-container-multi .select2-choices .select2-search-choice { 509 | padding: 3px 5px 3px 18px; 510 | margin: 3px 0 3px 5px; 511 | position: relative; 512 | 513 | line-height: 13px; 514 | color: #333; 515 | cursor: default; 516 | border: 1px solid #aaaaaa; 517 | 518 | border-radius: 3px; 519 | 520 | -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); 521 | box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); 522 | 523 | background-clip: padding-box; 524 | 525 | -webkit-touch-callout: none; 526 | -webkit-user-select: none; 527 | -moz-user-select: none; 528 | -ms-user-select: none; 529 | user-select: none; 530 | 531 | background-color: #e4e4e4; 532 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); 533 | 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)); 534 | background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); 535 | background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); 536 | background-image: linear-gradient(to top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); 537 | } 538 | html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice 539 | { 540 | margin-left: 0; 541 | margin-right: 5px; 542 | } 543 | .select2-container-multi .select2-choices .select2-search-choice .select2-chosen { 544 | cursor: default; 545 | } 546 | .select2-container-multi .select2-choices .select2-search-choice-focus { 547 | background: #d4d4d4; 548 | } 549 | 550 | .select2-search-choice-close { 551 | display: block; 552 | width: 12px; 553 | height: 13px; 554 | position: absolute; 555 | right: 3px; 556 | top: 4px; 557 | 558 | font-size: 1px; 559 | outline: none; 560 | background: url('select2.png') right top no-repeat; 561 | } 562 | html[dir="rtl"] .select2-search-choice-close { 563 | right: auto; 564 | left: 3px; 565 | } 566 | 567 | .select2-container-multi .select2-search-choice-close { 568 | left: 3px; 569 | } 570 | 571 | .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover { 572 | background-position: right -11px; 573 | } 574 | .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close { 575 | background-position: right -11px; 576 | } 577 | 578 | /* disabled styles */ 579 | .select2-container-multi.select2-container-disabled .select2-choices { 580 | background-color: #f4f4f4; 581 | background-image: none; 582 | border: 1px solid #ddd; 583 | cursor: default; 584 | } 585 | 586 | .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice { 587 | padding: 3px 5px 3px 5px; 588 | border: 1px solid #ddd; 589 | background-image: none; 590 | background-color: #f4f4f4; 591 | } 592 | 593 | .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close { display: none; 594 | background: none; 595 | } 596 | /* end multiselect */ 597 | 598 | 599 | .select2-result-selectable .select2-match, 600 | .select2-result-unselectable .select2-match { 601 | text-decoration: underline; 602 | } 603 | 604 | .select2-offscreen, .select2-offscreen:focus { 605 | clip: rect(0 0 0 0) !important; 606 | width: 1px !important; 607 | height: 1px !important; 608 | border: 0 !important; 609 | margin: 0 !important; 610 | padding: 0 !important; 611 | overflow: hidden !important; 612 | position: absolute !important; 613 | outline: 0 !important; 614 | left: 0px !important; 615 | top: 0px !important; 616 | } 617 | 618 | .select2-display-none { 619 | display: none; 620 | } 621 | 622 | .select2-measure-scrollbar { 623 | position: absolute; 624 | top: -10000px; 625 | left: -10000px; 626 | width: 100px; 627 | height: 100px; 628 | overflow: scroll; 629 | } 630 | 631 | /* Retina-ize icons */ 632 | 633 | @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx) { 634 | .select2-search input, 635 | .select2-search-choice-close, 636 | .select2-container .select2-choice abbr, 637 | .select2-container .select2-choice .select2-arrow b { 638 | background-image: url('select2x2.png') !important; 639 | background-repeat: no-repeat !important; 640 | background-size: 60px 40px !important; 641 | } 642 | 643 | .select2-search input { 644 | background-position: 100% -21px !important; 645 | } 646 | } 647 | --------------------------------------------------------------------------------