diff --git a/_config/config.yml b/_config/config.yml
index 1689705..853ed32 100644
--- a/_config/config.yml
+++ b/_config/config.yml
@@ -4,6 +4,7 @@ BootstrapForm:
bootstrap_included: false
jquery_included: false
bootstrap_form_included: false
+ bootstrap_select_included: false
inline_fields:
- CheckboxField
- FormAction
diff --git a/code/BootstrapDropdownField.php b/code/BootstrapDropdownField.php
index 2e25a00..60e4ee4 100644
--- a/code/BootstrapDropdownField.php
+++ b/code/BootstrapDropdownField.php
@@ -1,39 +1,28 @@
optionsList = $options;
- return $this;
- }
-
- public function setOptions($opts) {
- $this->optionsList = $opts;
-
- return $this;
- }
- public function getOptions() {
- $options = ArrayList::create();
- $selectedValue = $this->Value();
- foreach ($this->optionsList as $val => $label) {
- $isSelected = $selectedValue == (string) $val;
- $options->push(ArrayData::create(array(
- 'Label' => $label,
- 'Value' => $val,
- 'Selected' => $isSelected
- )));
+ /**
+ * Builds the form field, sets default attributes, and includes JS
+ *
+ * @param array $attributes The attributes to include on the formfield
+ * @return SSViewer
+ */
+ public function FieldHolder($attributes = array ()) {
+ if(!Config::inst()->get('BootstrapForm', 'bootstrap_select_included')) {
+ $current_locale = (class_exists('Translatable')) ? Translatable::get_current_locale() : i18n::get_locale();
+ Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap-select/js/bootstrap-select.min.js");
+ Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap-select/js/i18n/defaults-{$current_locale}.js");
+ Requirements::css(BOOTSTRAP_FORMS_DIR."/javascript/bootstrap-select/css/bootstrap-select.min.css");
}
-
- return $options;
- }
-
- public function Field($attributes = array()) {
- Requirements::javascript(BOOTSTRAP_FORMS_DIR . "/javascript/bootstrap_forms.js");
-
- return $this->renderWith('BootstrapDropdownField');
+ $this->addExtraClass('selectpicker');
+ return parent::FieldHolder($attributes);
}
}
\ No newline at end of file
diff --git a/code/ChosenDropdownField.php b/code/ChosenDropdownField.php
index 2374fce..a2f7aea 100755
--- a/code/ChosenDropdownField.php
+++ b/code/ChosenDropdownField.php
@@ -38,12 +38,20 @@ public function setSearchThreshold($num) {
* @return SSViewer
*/
public function FieldHolder($attributes = array ()) {
- Requirements::javascript(FRAMEWORK_DIR."/admin/thirdparty/chosen/chosen/chosen.jquery.js");
- Requirements::css(FRAMEWORK_DIR."/admin/thirdparty/chosen/chosen/chosen.css");
+
+ if(!Config::inst()->get('BootstrapForm', 'jquery_included')) {
+ Requirements::javascript(THIRDPARTY_DIR."/jquery/jquery.js");
+ Requirements::javascript(FRAMEWORK_DIR."/admin/thirdparty/chosen/chosen/chosen.jquery.js");
+ Requirements::css(FRAMEWORK_DIR."/admin/thirdparty/chosen/chosen/chosen.css");
+ } else {
+ Requirements::javascript(BOOTSTRAP_FORMS_DIR."/javascript/chosen/chosen.jquery.js");
+ Requirements::css(BOOTSTRAP_FORMS_DIR."/javascript/chosen/chosen.css");
+ }
+
$this->addExtraClass('chosen');
if(!$this->getAttribute('data-search-threshold')) {
$this->setSearchThreshold(self::$default_search_threshold);
}
return parent::FieldHolder($attributes);
}
-}
\ No newline at end of file
+}
diff --git a/javascript/bootstrap-select/css/bootstrap-select.css b/javascript/bootstrap-select/css/bootstrap-select.css
new file mode 100755
index 0000000..2190f3b
--- /dev/null
+++ b/javascript/bootstrap-select/css/bootstrap-select.css
@@ -0,0 +1,293 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+select.bs-select-hidden,
+select.selectpicker {
+ display: none !important;
+}
+.bootstrap-select {
+ width: 220px \0;
+ /*IE9 and below*/
+}
+.bootstrap-select > .dropdown-toggle {
+ width: 100%;
+ padding-right: 25px;
+ z-index: 1;
+}
+.bootstrap-select > .dropdown-toggle.bs-placeholder,
+.bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
+.bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
+.bootstrap-select > .dropdown-toggle.bs-placeholder:active {
+ color: #999;
+}
+.bootstrap-select > select {
+ position: absolute !important;
+ bottom: 0;
+ left: 50%;
+ display: block !important;
+ width: 0.5px !important;
+ height: 100% !important;
+ padding: 0 !important;
+ opacity: 0 !important;
+ border: none;
+}
+.bootstrap-select > select.mobile-device {
+ top: 0;
+ left: 0;
+ display: block !important;
+ width: 100% !important;
+ z-index: 2;
+}
+.has-error .bootstrap-select .dropdown-toggle,
+.error .bootstrap-select .dropdown-toggle {
+ border-color: #b94a48;
+}
+.bootstrap-select.fit-width {
+ width: auto !important;
+}
+.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
+ width: 220px;
+}
+.bootstrap-select .dropdown-toggle:focus {
+ outline: thin dotted #333333 !important;
+ outline: 5px auto -webkit-focus-ring-color !important;
+ outline-offset: -2px;
+}
+.bootstrap-select.form-control {
+ margin-bottom: 0;
+ padding: 0;
+ border: none;
+}
+.bootstrap-select.form-control:not([class*="col-"]) {
+ width: 100%;
+}
+.bootstrap-select.form-control.input-group-btn {
+ z-index: auto;
+}
+.bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.bootstrap-select.btn-group:not(.input-group-btn),
+.bootstrap-select.btn-group[class*="col-"] {
+ float: none;
+ display: inline-block;
+ margin-left: 0;
+}
+.bootstrap-select.btn-group.dropdown-menu-right,
+.bootstrap-select.btn-group[class*="col-"].dropdown-menu-right,
+.row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
+ float: right;
+}
+.form-inline .bootstrap-select.btn-group,
+.form-horizontal .bootstrap-select.btn-group,
+.form-group .bootstrap-select.btn-group {
+ margin-bottom: 0;
+}
+.form-group-lg .bootstrap-select.btn-group.form-control,
+.form-group-sm .bootstrap-select.btn-group.form-control {
+ padding: 0;
+}
+.form-inline .bootstrap-select.btn-group .form-control {
+ width: 100%;
+}
+.bootstrap-select.btn-group.disabled,
+.bootstrap-select.btn-group > .disabled {
+ cursor: not-allowed;
+}
+.bootstrap-select.btn-group.disabled:focus,
+.bootstrap-select.btn-group > .disabled:focus {
+ outline: none !important;
+}
+.bootstrap-select.btn-group.bs-container {
+ position: absolute;
+ height: 0 !important;
+ padding: 0 !important;
+}
+.bootstrap-select.btn-group.bs-container .dropdown-menu {
+ z-index: 1060;
+}
+.bootstrap-select.btn-group .dropdown-toggle .filter-option {
+ display: inline-block;
+ overflow: hidden;
+ width: 100%;
+ text-align: left;
+}
+.bootstrap-select.btn-group .dropdown-toggle .caret {
+ position: absolute;
+ top: 50%;
+ right: 12px;
+ margin-top: -2px;
+ vertical-align: middle;
+}
+.bootstrap-select.btn-group[class*="col-"] .dropdown-toggle {
+ width: 100%;
+}
+.bootstrap-select.btn-group .dropdown-menu {
+ min-width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bootstrap-select.btn-group .dropdown-menu.inner {
+ position: static;
+ float: none;
+ border: 0;
+ padding: 0;
+ margin: 0;
+ border-radius: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.bootstrap-select.btn-group .dropdown-menu li {
+ position: relative;
+}
+.bootstrap-select.btn-group .dropdown-menu li.active small {
+ color: #fff;
+}
+.bootstrap-select.btn-group .dropdown-menu li.disabled a {
+ cursor: not-allowed;
+}
+.bootstrap-select.btn-group .dropdown-menu li a {
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+.bootstrap-select.btn-group .dropdown-menu li a.opt {
+ position: relative;
+ padding-left: 2.25em;
+}
+.bootstrap-select.btn-group .dropdown-menu li a span.check-mark {
+ display: none;
+}
+.bootstrap-select.btn-group .dropdown-menu li a span.text {
+ display: inline-block;
+}
+.bootstrap-select.btn-group .dropdown-menu li small {
+ padding-left: 0.5em;
+}
+.bootstrap-select.btn-group .dropdown-menu .notify {
+ position: absolute;
+ bottom: 5px;
+ width: 96%;
+ margin: 0 2%;
+ min-height: 26px;
+ padding: 3px 5px;
+ background: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ pointer-events: none;
+ opacity: 0.9;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bootstrap-select.btn-group .no-results {
+ padding: 3px;
+ background: #f5f5f5;
+ margin: 0 5px;
+ white-space: nowrap;
+}
+.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {
+ position: static;
+}
+.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {
+ position: static;
+ top: auto;
+ margin-top: -1px;
+}
+.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark {
+ position: absolute;
+ display: inline-block;
+ right: 15px;
+ margin-top: 5px;
+}
+.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
+ margin-right: 34px;
+}
+.bootstrap-select.show-menu-arrow.open > .dropdown-toggle {
+ z-index: 1061;
+}
+.bootstrap-select.show-menu-arrow .dropdown-toggle:before {
+ content: '';
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid rgba(204, 204, 204, 0.2);
+ position: absolute;
+ bottom: -4px;
+ left: 9px;
+ display: none;
+}
+.bootstrap-select.show-menu-arrow .dropdown-toggle:after {
+ content: '';
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid white;
+ position: absolute;
+ bottom: -4px;
+ left: 10px;
+ display: none;
+}
+.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
+ bottom: auto;
+ top: -3px;
+ border-top: 7px solid rgba(204, 204, 204, 0.2);
+ border-bottom: 0;
+}
+.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
+ bottom: auto;
+ top: -3px;
+ border-top: 6px solid white;
+ border-bottom: 0;
+}
+.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {
+ right: 12px;
+ left: auto;
+}
+.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {
+ right: 13px;
+ left: auto;
+}
+.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before,
+.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {
+ display: block;
+}
+.bs-searchbox,
+.bs-actionsbox,
+.bs-donebutton {
+ padding: 4px 8px;
+}
+.bs-actionsbox {
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bs-actionsbox .btn-group button {
+ width: 50%;
+}
+.bs-donebutton {
+ float: left;
+ width: 100%;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.bs-donebutton .btn-group button {
+ width: 100%;
+}
+.bs-searchbox + .bs-actionsbox {
+ padding: 0 8px 4px;
+}
+.bs-searchbox .form-control {
+ margin-bottom: 0;
+ width: 100%;
+ float: none;
+}
+/*# sourceMappingURL=bootstrap-select.css.map */
\ No newline at end of file
diff --git a/javascript/bootstrap-select/css/bootstrap-select.css.map b/javascript/bootstrap-select/css/bootstrap-select.css.map
new file mode 100755
index 0000000..dcd254d
--- /dev/null
+++ b/javascript/bootstrap-select/css/bootstrap-select.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["less/bootstrap-select.less","bootstrap-select.css"],"names":[],"mappings":"AAQA;;EAEE,0BAAA;ECPD;ADUD;EACE,iBAAA;ECRA,kBAAiB;EAClB;ADMD;EAKI,aAAA;EACA,qBAAA;EACA,YAAA;ECRH;ADUG;;;;EAG0B,aAAA;ECP7B;ADLD;EAgBI,+BAAA;EACA,WAAA;EACA,WAAA;EACA,2BAAA;EACA,yBAAA;EACA,yBAAA;EACA,uBAAA;EACA,uBAAA;EACA,cAAA;ECRH;ADUG;EACE,QAAA;EACA,SAAA;EACA,2BAAA;EACA,wBAAA;EACA,YAAA;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AAA;EACA,kBAAA;EACA,qBAAA;EACA,2BAAA;EACA,yDAAA;UAAA,iDAAA;EACA,sBAAA;EACA,cAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;ECrDL;ADtFD;EAgJI,cAAA;EACA,qBAAA;EACA,eAAA;EACA,qBAAA;ECvDH;AD0DC;EAEI,kBAAA;ECzDL;ADuDC;EAMI,kBAAA;EACA,WAAA;EACA,kBAAA;EC1DL;AD+DG;EACE,oBAAA;EACA,uBAAA;EACA,aAAA;EACA,iBAAA;EC7DL;ADwDC;EASI,oBAAA;EC9DL;ADoEC;EACE,eAAA;EClEH;ADsEG;EACE,aAAA;EACA,oCAAA;EACA,qCAAA;EACA,mDAAA;EACA,oBAAA;EACA,cAAA;EACA,WAAA;EACA,eAAA;ECpEL;ADuEG;EACE,aAAA;EACA,oCAAA;EACA,qCAAA;EACA,gCAAA;EACA,oBAAA;EACA,cAAA;EACA,YAAA;EACA,eAAA;ECrEL;AD0EG;EACE,cAAA;EACA,WAAA;EACA,gDAAA;EACA,kBAAA;ECxEL;AD2EG;EACE,cAAA;EACA,WAAA;EACA,6BAAA;EACA,kBAAA;ECzEL;AD8EG;EACE,aAAA;EACA,YAAA;EC5EL;AD+EG;EACE,aAAA;EACA,YAAA;EC7EL;ADkFG;;EAEE,gBAAA;EChFL;ADqFD;;;EAGE,kBAAA;ECnFD;ADsFD;EACE,aAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;ECpFD;ADsFC;EACE,YAAA;ECpFH;ADwFD;EACE,aAAA;EACA,aAAA;EACA,gCAAA;KAAA,6BAAA;UAAA,wBAAA;ECtFD;ADwFC;EACE,aAAA;ECtFH;AD2FC;EACE,oBAAA;ECzFH;AD4FC;EACE,kBAAA;EACA,aAAA;EACA,aAAA;EC1FH","file":"bootstrap-select.css","sourcesContent":["@import \"variables\";\n\n// Mixins\n.cursor-disabled() {\n cursor: not-allowed;\n}\n\n// Rules\nselect.bs-select-hidden,\nselect.selectpicker {\n display: none !important;\n}\n\n.bootstrap-select {\n width: 220px \\0; /*IE9 and below*/\n\n // The selectpicker button\n > .dropdown-toggle {\n width: 100%;\n padding-right: 25px;\n z-index: 1;\n\n &.bs-placeholder,\n &.bs-placeholder:hover,\n &.bs-placeholder:focus,\n &.bs-placeholder:active { color: @input-color-placeholder; }\n }\n\n > select {\n position: absolute !important;\n bottom: 0;\n left: 50%;\n display: block !important;\n width: 0.5px !important;\n height: 100% !important;\n padding: 0 !important;\n opacity: 0 !important;\n border: none;\n\n &.mobile-device {\n top: 0;\n left: 0;\n display: block !important;\n width: 100% !important;\n z-index: 2;\n }\n }\n\n // Error display\n .has-error & .dropdown-toggle,\n .error & .dropdown-toggle {\n border-color: @color-red-error;\n }\n\n &.fit-width {\n width: auto !important;\n }\n\n &:not([class*=\"col-\"]):not([class*=\"form-control\"]):not(.input-group-btn) {\n width: @width-default;\n }\n\n .dropdown-toggle:focus {\n outline: thin dotted #333333 !important;\n outline: 5px auto -webkit-focus-ring-color !important;\n outline-offset: -2px;\n }\n}\n\n.bootstrap-select.form-control {\n margin-bottom: 0;\n padding: 0;\n border: none;\n\n &:not([class*=\"col-\"]) {\n width: 100%;\n }\n\n &.input-group-btn {\n z-index: auto;\n\n &:not(:first-child):not(:last-child) {\n > .btn {\n border-radius: 0;\n }\n }\n }\n}\n\n// The selectpicker components\n.bootstrap-select.btn-group {\n &:not(.input-group-btn),\n &[class*=\"col-\"] {\n float: none;\n display: inline-block;\n margin-left: 0;\n }\n\n // Forces the pull to the right, if necessary\n &,\n &[class*=\"col-\"],\n .row &[class*=\"col-\"] {\n &.dropdown-menu-right {\n float: right;\n }\n }\n\n .form-inline &,\n .form-horizontal &,\n .form-group & {\n margin-bottom: 0;\n }\n\n .form-group-lg &.form-control,\n .form-group-sm &.form-control {\n padding: 0;\n }\n\n // Set the width of the live search (and any other form control within an inline form)\n // see https://github.com/silviomoreto/bootstrap-select/issues/685\n .form-inline & .form-control {\n width: 100%;\n }\n\n &.disabled,\n > .disabled {\n .cursor-disabled();\n\n &:focus {\n outline: none !important;\n }\n }\n\n &.bs-container {\n position: absolute;\n height: 0 !important;\n padding: 0 !important;\n \n .dropdown-menu {\n z-index: @zindex-select-dropdown;\n }\n }\n\n // The selectpicker button\n .dropdown-toggle {\n .filter-option {\n display: inline-block;\n overflow: hidden;\n width: 100%;\n text-align: left;\n }\n\n .caret {\n position: absolute;\n top: 50%;\n right: 12px;\n margin-top: -2px;\n vertical-align: middle;\n }\n }\n\n &[class*=\"col-\"] .dropdown-toggle {\n width: 100%;\n }\n\n // The selectpicker dropdown\n .dropdown-menu {\n min-width: 100%;\n box-sizing: border-box;\n\n &.inner {\n position: static;\n float: none;\n border: 0;\n padding: 0;\n margin: 0;\n border-radius: 0;\n box-shadow: none;\n }\n\n li {\n position: relative;\n\n &.active small {\n color: #fff;\n }\n\n &.disabled a {\n .cursor-disabled();\n }\n\n a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n &.opt {\n position: relative;\n padding-left: 2.25em;\n }\n\n span.check-mark {\n display: none;\n }\n\n span.text {\n display: inline-block;\n }\n }\n\n small {\n padding-left: 0.5em;\n }\n }\n\n .notify {\n position: absolute;\n bottom: 5px;\n width: 96%;\n margin: 0 2%;\n min-height: 26px;\n padding: 3px 5px;\n background: rgb(245, 245, 245);\n border: 1px solid rgb(227, 227, 227);\n box-shadow: inset 0 1px 1px fade(rgb(0, 0, 0), 5%);\n pointer-events: none;\n opacity: 0.9;\n box-sizing: border-box;\n }\n }\n\n .no-results {\n padding: 3px;\n background: #f5f5f5;\n margin: 0 5px;\n white-space: nowrap;\n }\n\n &.fit-width .dropdown-toggle {\n .filter-option {\n position: static;\n }\n\n .caret {\n position: static;\n top: auto;\n margin-top: -1px;\n }\n }\n\n &.show-tick .dropdown-menu li {\n &.selected a span.check-mark {\n position: absolute;\n display: inline-block;\n right: 15px;\n margin-top: 5px;\n }\n\n a span.text {\n margin-right: 34px;\n }\n }\n}\n\n.bootstrap-select.show-menu-arrow {\n &.open > .dropdown-toggle {\n z-index: (@zindex-select-dropdown + 1);\n }\n\n .dropdown-toggle {\n &:before {\n content: '';\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid @color-grey-arrow;\n position: absolute;\n bottom: -4px;\n left: 9px;\n display: none;\n }\n\n &:after {\n content: '';\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid white;\n position: absolute;\n bottom: -4px;\n left: 10px;\n display: none;\n }\n }\n\n &.dropup .dropdown-toggle {\n &:before {\n bottom: auto;\n top: -3px;\n border-top: 7px solid @color-grey-arrow;\n border-bottom: 0;\n }\n\n &:after {\n bottom: auto;\n top: -3px;\n border-top: 6px solid white;\n border-bottom: 0;\n }\n }\n\n &.pull-right .dropdown-toggle {\n &:before {\n right: 12px;\n left: auto;\n }\n\n &:after {\n right: 13px;\n left: auto;\n }\n }\n\n &.open > .dropdown-toggle {\n &:before,\n &:after {\n display: block;\n }\n }\n}\n\n.bs-searchbox,\n.bs-actionsbox,\n.bs-donebutton {\n padding: 4px 8px;\n}\n\n.bs-actionsbox {\n width: 100%;\n box-sizing: border-box;\n\n & .btn-group button {\n width: 50%;\n }\n}\n\n.bs-donebutton {\n float: left;\n width: 100%;\n box-sizing: border-box;\n\n & .btn-group button {\n width: 100%;\n }\n}\n\n.bs-searchbox {\n & + .bs-actionsbox {\n padding: 0 8px 4px;\n }\n\n & .form-control {\n margin-bottom: 0;\n width: 100%;\n float: none;\n }\n}\n","select.bs-select-hidden,\nselect.selectpicker {\n display: none !important;\n}\n.bootstrap-select {\n width: 220px \\0;\n /*IE9 and below*/\n}\n.bootstrap-select > .dropdown-toggle {\n width: 100%;\n padding-right: 25px;\n z-index: 1;\n}\n.bootstrap-select > .dropdown-toggle.bs-placeholder,\n.bootstrap-select > .dropdown-toggle.bs-placeholder:hover,\n.bootstrap-select > .dropdown-toggle.bs-placeholder:focus,\n.bootstrap-select > .dropdown-toggle.bs-placeholder:active {\n color: #999;\n}\n.bootstrap-select > select {\n position: absolute !important;\n bottom: 0;\n left: 50%;\n display: block !important;\n width: 0.5px !important;\n height: 100% !important;\n padding: 0 !important;\n opacity: 0 !important;\n border: none;\n}\n.bootstrap-select > select.mobile-device {\n top: 0;\n left: 0;\n display: block !important;\n width: 100% !important;\n z-index: 2;\n}\n.has-error .bootstrap-select .dropdown-toggle,\n.error .bootstrap-select .dropdown-toggle {\n border-color: #b94a48;\n}\n.bootstrap-select.fit-width {\n width: auto !important;\n}\n.bootstrap-select:not([class*=\"col-\"]):not([class*=\"form-control\"]):not(.input-group-btn) {\n width: 220px;\n}\n.bootstrap-select .dropdown-toggle:focus {\n outline: thin dotted #333333 !important;\n outline: 5px auto -webkit-focus-ring-color !important;\n outline-offset: -2px;\n}\n.bootstrap-select.form-control {\n margin-bottom: 0;\n padding: 0;\n border: none;\n}\n.bootstrap-select.form-control:not([class*=\"col-\"]) {\n width: 100%;\n}\n.bootstrap-select.form-control.input-group-btn {\n z-index: auto;\n}\n.bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.bootstrap-select.btn-group:not(.input-group-btn),\n.bootstrap-select.btn-group[class*=\"col-\"] {\n float: none;\n display: inline-block;\n margin-left: 0;\n}\n.bootstrap-select.btn-group.dropdown-menu-right,\n.bootstrap-select.btn-group[class*=\"col-\"].dropdown-menu-right,\n.row .bootstrap-select.btn-group[class*=\"col-\"].dropdown-menu-right {\n float: right;\n}\n.form-inline .bootstrap-select.btn-group,\n.form-horizontal .bootstrap-select.btn-group,\n.form-group .bootstrap-select.btn-group {\n margin-bottom: 0;\n}\n.form-group-lg .bootstrap-select.btn-group.form-control,\n.form-group-sm .bootstrap-select.btn-group.form-control {\n padding: 0;\n}\n.form-inline .bootstrap-select.btn-group .form-control {\n width: 100%;\n}\n.bootstrap-select.btn-group.disabled,\n.bootstrap-select.btn-group > .disabled {\n cursor: not-allowed;\n}\n.bootstrap-select.btn-group.disabled:focus,\n.bootstrap-select.btn-group > .disabled:focus {\n outline: none !important;\n}\n.bootstrap-select.btn-group.bs-container {\n position: absolute;\n height: 0 !important;\n padding: 0 !important;\n}\n.bootstrap-select.btn-group.bs-container .dropdown-menu {\n z-index: 1060;\n}\n.bootstrap-select.btn-group .dropdown-toggle .filter-option {\n display: inline-block;\n overflow: hidden;\n width: 100%;\n text-align: left;\n}\n.bootstrap-select.btn-group .dropdown-toggle .caret {\n position: absolute;\n top: 50%;\n right: 12px;\n margin-top: -2px;\n vertical-align: middle;\n}\n.bootstrap-select.btn-group[class*=\"col-\"] .dropdown-toggle {\n width: 100%;\n}\n.bootstrap-select.btn-group .dropdown-menu {\n min-width: 100%;\n box-sizing: border-box;\n}\n.bootstrap-select.btn-group .dropdown-menu.inner {\n position: static;\n float: none;\n border: 0;\n padding: 0;\n margin: 0;\n border-radius: 0;\n box-shadow: none;\n}\n.bootstrap-select.btn-group .dropdown-menu li {\n position: relative;\n}\n.bootstrap-select.btn-group .dropdown-menu li.active small {\n color: #fff;\n}\n.bootstrap-select.btn-group .dropdown-menu li.disabled a {\n cursor: not-allowed;\n}\n.bootstrap-select.btn-group .dropdown-menu li a {\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.bootstrap-select.btn-group .dropdown-menu li a.opt {\n position: relative;\n padding-left: 2.25em;\n}\n.bootstrap-select.btn-group .dropdown-menu li a span.check-mark {\n display: none;\n}\n.bootstrap-select.btn-group .dropdown-menu li a span.text {\n display: inline-block;\n}\n.bootstrap-select.btn-group .dropdown-menu li small {\n padding-left: 0.5em;\n}\n.bootstrap-select.btn-group .dropdown-menu .notify {\n position: absolute;\n bottom: 5px;\n width: 96%;\n margin: 0 2%;\n min-height: 26px;\n padding: 3px 5px;\n background: #f5f5f5;\n border: 1px solid #e3e3e3;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n pointer-events: none;\n opacity: 0.9;\n box-sizing: border-box;\n}\n.bootstrap-select.btn-group .no-results {\n padding: 3px;\n background: #f5f5f5;\n margin: 0 5px;\n white-space: nowrap;\n}\n.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {\n position: static;\n}\n.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {\n position: static;\n top: auto;\n margin-top: -1px;\n}\n.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark {\n position: absolute;\n display: inline-block;\n right: 15px;\n margin-top: 5px;\n}\n.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {\n margin-right: 34px;\n}\n.bootstrap-select.show-menu-arrow.open > .dropdown-toggle {\n z-index: 1061;\n}\n.bootstrap-select.show-menu-arrow .dropdown-toggle:before {\n content: '';\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid rgba(204, 204, 204, 0.2);\n position: absolute;\n bottom: -4px;\n left: 9px;\n display: none;\n}\n.bootstrap-select.show-menu-arrow .dropdown-toggle:after {\n content: '';\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid white;\n position: absolute;\n bottom: -4px;\n left: 10px;\n display: none;\n}\n.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {\n bottom: auto;\n top: -3px;\n border-top: 7px solid rgba(204, 204, 204, 0.2);\n border-bottom: 0;\n}\n.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {\n bottom: auto;\n top: -3px;\n border-top: 6px solid white;\n border-bottom: 0;\n}\n.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {\n right: 12px;\n left: auto;\n}\n.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {\n right: 13px;\n left: auto;\n}\n.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before,\n.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {\n display: block;\n}\n.bs-searchbox,\n.bs-actionsbox,\n.bs-donebutton {\n padding: 4px 8px;\n}\n.bs-actionsbox {\n width: 100%;\n box-sizing: border-box;\n}\n.bs-actionsbox .btn-group button {\n width: 50%;\n}\n.bs-donebutton {\n float: left;\n width: 100%;\n box-sizing: border-box;\n}\n.bs-donebutton .btn-group button {\n width: 100%;\n}\n.bs-searchbox + .bs-actionsbox {\n padding: 0 8px 4px;\n}\n.bs-searchbox .form-control {\n margin-bottom: 0;\n width: 100%;\n float: none;\n}\n/*# sourceMappingURL=bootstrap-select.css.map */"]}
\ No newline at end of file
diff --git a/javascript/bootstrap-select/css/bootstrap-select.min.css b/javascript/bootstrap-select/css/bootstrap-select.min.css
new file mode 100755
index 0000000..6cdc93b
--- /dev/null
+++ b/javascript/bootstrap-select/css/bootstrap-select.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */select.bs-select-hidden,select.selectpicker{display:none!important}.bootstrap-select{width:220px\9}.bootstrap-select>.dropdown-toggle{width:100%;padding-right:25px;z-index:1}.bootstrap-select>.dropdown-toggle.bs-placeholder,.bootstrap-select>.dropdown-toggle.bs-placeholder:active,.bootstrap-select>.dropdown-toggle.bs-placeholder:focus,.bootstrap-select>.dropdown-toggle.bs-placeholder:hover{color:#999}.bootstrap-select>select{position:absolute!important;bottom:0;left:50%;display:block!important;width:.5px!important;height:100%!important;padding:0!important;opacity:0!important;border:none}.bootstrap-select>select.mobile-device{top:0;left:0;display:block!important;width:100%!important;z-index:2}.error .bootstrap-select .dropdown-toggle,.has-error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select .dropdown-toggle:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.form-control:not([class*=col-]){width:100%}.bootstrap-select.form-control.input-group-btn{z-index:auto}.bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child)>.btn{border-radius:0}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=col-]{float:none;display:inline-block;margin-left:0}.bootstrap-select.btn-group.dropdown-menu-right,.bootstrap-select.btn-group[class*=col-].dropdown-menu-right,.row .bootstrap-select.btn-group[class*=col-].dropdown-menu-right{float:right}.form-group .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group{margin-bottom:0}.form-group-lg .bootstrap-select.btn-group.form-control,.form-group-sm .bootstrap-select.btn-group.form-control{padding:0}.form-inline .bootstrap-select.btn-group .form-control{width:100%}.bootstrap-select.btn-group.disabled,.bootstrap-select.btn-group>.disabled{cursor:not-allowed}.bootstrap-select.btn-group.disabled:focus,.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group.bs-container{position:absolute;height:0!important;padding:0!important}.bootstrap-select.btn-group.bs-container .dropdown-menu{z-index:1060}.bootstrap-select.btn-group .dropdown-toggle .filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group .dropdown-toggle .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group[class*=col-] .dropdown-toggle{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;float:none;border:0;padding:0;margin:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li.active small{color:#fff}.bootstrap-select.btn-group .dropdown-menu li.disabled a{cursor:not-allowed}.bootstrap-select.btn-group .dropdown-menu li a{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bootstrap-select.btn-group .dropdown-menu li a.opt{position:relative;padding-left:2.25em}.bootstrap-select.btn-group .dropdown-menu li a span.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a span.text{display:inline-block}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px;white-space:nowrap}.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option{position:static}.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret{position:static;top:auto;margin-top:-1px}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark{position:absolute;display:inline-block;right:15px;margin-top:5px}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle{z-index:1061}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid rgba(204,204,204,.2);border-bottom:0}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before{display:block}.bs-actionsbox,.bs-donebutton,.bs-searchbox{padding:4px 8px}.bs-actionsbox{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-actionsbox .btn-group button{width:50%}.bs-donebutton{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bs-donebutton .btn-group button{width:100%}.bs-searchbox+.bs-actionsbox{padding:0 8px 4px}.bs-searchbox .form-control{margin-bottom:0;width:100%;float:none}
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/bootstrap-select.js b/javascript/bootstrap-select/js/bootstrap-select.js
new file mode 100755
index 0000000..a7c3a87
--- /dev/null
+++ b/javascript/bootstrap-select/js/bootstrap-select.js
@@ -0,0 +1,1888 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ 'use strict';
+
+ //
+ if (!String.prototype.includes) {
+ (function () {
+ 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
+ var toString = {}.toString;
+ var defineProperty = (function () {
+ // IE 8 only supports `Object.defineProperty` on DOM elements
+ try {
+ var object = {};
+ var $defineProperty = Object.defineProperty;
+ var result = $defineProperty(object, object, object) && $defineProperty;
+ } catch (error) {
+ }
+ return result;
+ }());
+ var indexOf = ''.indexOf;
+ var includes = function (search) {
+ if (this == null) {
+ throw new TypeError();
+ }
+ var string = String(this);
+ if (search && toString.call(search) == '[object RegExp]') {
+ throw new TypeError();
+ }
+ var stringLength = string.length;
+ var searchString = String(search);
+ var searchLength = searchString.length;
+ var position = arguments.length > 1 ? arguments[1] : undefined;
+ // `ToInteger`
+ var pos = position ? Number(position) : 0;
+ if (pos != pos) { // better `isNaN`
+ pos = 0;
+ }
+ var start = Math.min(Math.max(pos, 0), stringLength);
+ // Avoid the `indexOf` call if no match is possible
+ if (searchLength + start > stringLength) {
+ return false;
+ }
+ return indexOf.call(string, searchString, pos) != -1;
+ };
+ if (defineProperty) {
+ defineProperty(String.prototype, 'includes', {
+ 'value': includes,
+ 'configurable': true,
+ 'writable': true
+ });
+ } else {
+ String.prototype.includes = includes;
+ }
+ }());
+ }
+
+ if (!String.prototype.startsWith) {
+ (function () {
+ 'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
+ var defineProperty = (function () {
+ // IE 8 only supports `Object.defineProperty` on DOM elements
+ try {
+ var object = {};
+ var $defineProperty = Object.defineProperty;
+ var result = $defineProperty(object, object, object) && $defineProperty;
+ } catch (error) {
+ }
+ return result;
+ }());
+ var toString = {}.toString;
+ var startsWith = function (search) {
+ if (this == null) {
+ throw new TypeError();
+ }
+ var string = String(this);
+ if (search && toString.call(search) == '[object RegExp]') {
+ throw new TypeError();
+ }
+ var stringLength = string.length;
+ var searchString = String(search);
+ var searchLength = searchString.length;
+ var position = arguments.length > 1 ? arguments[1] : undefined;
+ // `ToInteger`
+ var pos = position ? Number(position) : 0;
+ if (pos != pos) { // better `isNaN`
+ pos = 0;
+ }
+ var start = Math.min(Math.max(pos, 0), stringLength);
+ // Avoid the `indexOf` call if no match is possible
+ if (searchLength + start > stringLength) {
+ return false;
+ }
+ var index = -1;
+ while (++index < searchLength) {
+ if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
+ return false;
+ }
+ }
+ return true;
+ };
+ if (defineProperty) {
+ defineProperty(String.prototype, 'startsWith', {
+ 'value': startsWith,
+ 'configurable': true,
+ 'writable': true
+ });
+ } else {
+ String.prototype.startsWith = startsWith;
+ }
+ }());
+ }
+
+ if (!Object.keys) {
+ Object.keys = function (
+ o, // object
+ k, // key
+ r // result array
+ ){
+ // initialize object and result
+ r=[];
+ // iterate over object keys
+ for (k in o)
+ // fill result array with non-prototypical keys
+ r.hasOwnProperty.call(o, k) && r.push(k);
+ // return result
+ return r;
+ };
+ }
+
+ // set data-selected on select element if the value has been programmatically selected
+ // prior to initialization of bootstrap-select
+ // * consider removing or replacing an alternative method *
+ var valHooks = {
+ useDefault: false,
+ _set: $.valHooks.select.set
+ };
+
+ $.valHooks.select.set = function(elem, value) {
+ if (value && !valHooks.useDefault) $(elem).data('selected', true);
+
+ return valHooks._set.apply(this, arguments);
+ };
+
+ var changed_arguments = null;
+ $.fn.triggerNative = function (eventName) {
+ var el = this[0],
+ event;
+
+ if (el.dispatchEvent) { // for modern browsers & IE9+
+ if (typeof Event === 'function') {
+ // For modern browsers
+ event = new Event(eventName, {
+ bubbles: true
+ });
+ } else {
+ // For IE since it doesn't support Event constructor
+ event = document.createEvent('Event');
+ event.initEvent(eventName, true, false);
+ }
+
+ el.dispatchEvent(event);
+ } else if (el.fireEvent) { // for IE8
+ event = document.createEventObject();
+ event.eventType = eventName;
+ el.fireEvent('on' + eventName, event);
+ } else {
+ // fall back to jQuery.trigger
+ this.trigger(eventName);
+ }
+ };
+ //
+
+ // Case insensitive contains search
+ $.expr.pseudos.icontains = function (obj, index, meta) {
+ var $obj = $(obj);
+ var haystack = ($obj.data('tokens') || $obj.text()).toString().toUpperCase();
+ return haystack.includes(meta[3].toUpperCase());
+ };
+
+ // Case insensitive begins search
+ $.expr.pseudos.ibegins = function (obj, index, meta) {
+ var $obj = $(obj);
+ var haystack = ($obj.data('tokens') || $obj.text()).toString().toUpperCase();
+ return haystack.startsWith(meta[3].toUpperCase());
+ };
+
+ // Case and accent insensitive contains search
+ $.expr.pseudos.aicontains = function (obj, index, meta) {
+ var $obj = $(obj);
+ var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toString().toUpperCase();
+ return haystack.includes(meta[3].toUpperCase());
+ };
+
+ // Case and accent insensitive begins search
+ $.expr.pseudos.aibegins = function (obj, index, meta) {
+ var $obj = $(obj);
+ var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toString().toUpperCase();
+ return haystack.startsWith(meta[3].toUpperCase());
+ };
+
+ /**
+ * Remove all diatrics from the given text.
+ * @access private
+ * @param {String} text
+ * @returns {String}
+ */
+ function normalizeToBase(text) {
+ var rExps = [
+ {re: /[\xC0-\xC6]/g, ch: "A"},
+ {re: /[\xE0-\xE6]/g, ch: "a"},
+ {re: /[\xC8-\xCB]/g, ch: "E"},
+ {re: /[\xE8-\xEB]/g, ch: "e"},
+ {re: /[\xCC-\xCF]/g, ch: "I"},
+ {re: /[\xEC-\xEF]/g, ch: "i"},
+ {re: /[\xD2-\xD6]/g, ch: "O"},
+ {re: /[\xF2-\xF6]/g, ch: "o"},
+ {re: /[\xD9-\xDC]/g, ch: "U"},
+ {re: /[\xF9-\xFC]/g, ch: "u"},
+ {re: /[\xC7-\xE7]/g, ch: "c"},
+ {re: /[\xD1]/g, ch: "N"},
+ {re: /[\xF1]/g, ch: "n"}
+ ];
+ $.each(rExps, function () {
+ text = text.replace(this.re, this.ch);
+ });
+ return text;
+ }
+
+
+ function htmlEscape(html) {
+ var escapeMap = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"',
+ "'": ''',
+ '`': '`'
+ };
+ var source = '(?:' + Object.keys(escapeMap).join('|') + ')',
+ testRegexp = new RegExp(source),
+ replaceRegexp = new RegExp(source, 'g'),
+ string = html == null ? '' : '' + html;
+ return testRegexp.test(string) ? string.replace(replaceRegexp, function (match) {
+ return escapeMap[match];
+ }) : string;
+ }
+
+ var Selectpicker = function (element, options, e) {
+ // bootstrap-select has been initialized - revert valHooks.select.set back to its original function
+ if (!valHooks.useDefault) {
+ $.valHooks.select.set = valHooks._set;
+ valHooks.useDefault = true;
+ }
+
+ if (e) {
+ e.stopPropagation();
+ e.preventDefault();
+ }
+
+ this.$element = $(element);
+ this.$newElement = null;
+ this.$button = null;
+ this.$menu = null;
+ this.$lis = null;
+ this.options = options;
+
+ // If we have no title yet, try to pull it from the html title attribute (jQuery doesnt' pick it up as it's not a
+ // data-attribute)
+ if (this.options.title === null) {
+ this.options.title = this.$element.attr('title');
+ }
+
+ //Expose public methods
+ this.val = Selectpicker.prototype.val;
+ this.render = Selectpicker.prototype.render;
+ this.refresh = Selectpicker.prototype.refresh;
+ this.setStyle = Selectpicker.prototype.setStyle;
+ this.selectAll = Selectpicker.prototype.selectAll;
+ this.deselectAll = Selectpicker.prototype.deselectAll;
+ this.destroy = Selectpicker.prototype.destroy;
+ this.remove = Selectpicker.prototype.remove;
+ this.show = Selectpicker.prototype.show;
+ this.hide = Selectpicker.prototype.hide;
+
+ this.init();
+ };
+
+ Selectpicker.VERSION = '1.11.2';
+
+ // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
+ Selectpicker.DEFAULTS = {
+ noneSelectedText: 'Nothing selected',
+ noneResultsText: 'No results matched {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
+ (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
+ ];
+ },
+ selectAllText: 'Select All',
+ deselectAllText: 'Deselect All',
+ doneButton: false,
+ doneButtonText: 'Close',
+ multipleSeparator: ', ',
+ styleBase: 'btn',
+ style: 'btn-default',
+ size: 'auto',
+ title: null,
+ selectedTextFormat: 'values',
+ width: false,
+ container: false,
+ hideDisabled: false,
+ showSubtext: false,
+ showIcon: true,
+ showContent: true,
+ dropupAuto: true,
+ header: false,
+ liveSearch: false,
+ liveSearchPlaceholder: null,
+ liveSearchNormalize: false,
+ liveSearchStyle: 'contains',
+ actionsBox: false,
+ iconBase: 'glyphicon',
+ tickIcon: 'glyphicon-ok',
+ showTick: false,
+ template: {
+ caret: ''
+ },
+ maxOptions: false,
+ mobile: false,
+ selectOnTab: false,
+ dropdownAlignRight: false
+ };
+
+ Selectpicker.prototype = {
+
+ constructor: Selectpicker,
+
+ init: function () {
+ var that = this,
+ id = this.$element.attr('id');
+
+ this.$element.addClass('bs-select-hidden');
+
+ // store originalIndex (key) and newIndex (value) in this.liObj for fast accessibility
+ // allows us to do this.$lis.eq(that.liObj[index]) instead of this.$lis.filter('[data-original-index="' + index + '"]')
+ this.liObj = {};
+ this.multiple = this.$element.prop('multiple');
+ this.autofocus = this.$element.prop('autofocus');
+ this.$newElement = this.createView();
+ this.$element
+ .after(this.$newElement)
+ .appendTo(this.$newElement);
+ this.$button = this.$newElement.children('button');
+ this.$menu = this.$newElement.children('.dropdown-menu');
+ this.$menuInner = this.$menu.children('.inner');
+ this.$searchbox = this.$menu.find('input');
+
+ this.$element.removeClass('bs-select-hidden');
+
+ if (this.options.dropdownAlignRight === true) this.$menu.addClass('dropdown-menu-right');
+
+ if (typeof id !== 'undefined') {
+ this.$button.attr('data-id', id);
+ $('label[for="' + id + '"]').click(function (e) {
+ e.preventDefault();
+ that.$button.focus();
+ });
+ }
+
+ this.checkDisabled();
+ this.clickListener();
+ if (this.options.liveSearch) this.liveSearchListener();
+ this.render();
+ this.setStyle();
+ this.setWidth();
+ if (this.options.container) this.selectPosition();
+ this.$menu.data('this', this);
+ this.$newElement.data('this', this);
+ if (this.options.mobile) this.mobile();
+
+ this.$newElement.on({
+ 'hide.bs.dropdown': function (e) {
+ that.$menuInner.attr('aria-expanded', false);
+ that.$element.trigger('hide.bs.select', e);
+ },
+ 'hidden.bs.dropdown': function (e) {
+ that.$element.trigger('hidden.bs.select', e);
+ },
+ 'show.bs.dropdown': function (e) {
+ that.$menuInner.attr('aria-expanded', true);
+ that.$element.trigger('show.bs.select', e);
+ },
+ 'shown.bs.dropdown': function (e) {
+ that.$element.trigger('shown.bs.select', e);
+ }
+ });
+
+ if (that.$element[0].hasAttribute('required')) {
+ this.$element.on('invalid', function () {
+ that.$button
+ .addClass('bs-invalid')
+ .focus();
+
+ that.$element.on({
+ 'focus.bs.select': function () {
+ that.$button.focus();
+ that.$element.off('focus.bs.select');
+ },
+ 'shown.bs.select': function () {
+ that.$element
+ .val(that.$element.val()) // set the value to hide the validation message in Chrome when menu is opened
+ .off('shown.bs.select');
+ },
+ 'rendered.bs.select': function () {
+ // if select is no longer invalid, remove the bs-invalid class
+ if (this.validity.valid) that.$button.removeClass('bs-invalid');
+ that.$element.off('rendered.bs.select');
+ }
+ });
+ });
+ }
+
+ setTimeout(function () {
+ that.$element.trigger('loaded.bs.select');
+ });
+ },
+
+ createDropdown: function () {
+ // Options
+ // If we are multiple or showTick option is set, then add the show-tick class
+ var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
+ inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',
+ autofocus = this.autofocus ? ' autofocus' : '';
+ // Elements
+ var header = this.options.header ? '
' + this.options.header + '
' : '';
+ var searchbox = this.options.liveSearch ?
+ '' +
+ '' +
+ '
'
+ : '';
+ var actionsbox = this.multiple && this.options.actionsBox ?
+ '' +
+ '
' +
+ '' +
+ '' +
+ '
' +
+ '
'
+ : '';
+ var donebutton = this.multiple && this.options.doneButton ?
+ ''
+ : '';
+ var drop =
+ '' +
+ '' +
+ '' +
+ '
';
+
+ return $(drop);
+ },
+
+ createView: function () {
+ var $drop = this.createDropdown(),
+ li = this.createLi();
+
+ $drop.find('ul')[0].innerHTML = li;
+ return $drop;
+ },
+
+ reloadLi: function () {
+ //Remove all children.
+ this.destroyLi();
+ //Re build
+ var li = this.createLi();
+ this.$menuInner[0].innerHTML = li;
+ },
+
+ destroyLi: function () {
+ this.$menu.find('li').remove();
+ },
+
+ createLi: function () {
+ var that = this,
+ _li = [],
+ optID = 0,
+ titleOption = document.createElement('option'),
+ liIndex = -1; // increment liIndex whenever a new element is created to ensure liObj is correct
+
+ // Helper functions
+ /**
+ * @param content
+ * @param [index]
+ * @param [classes]
+ * @param [optgroup]
+ * @returns {string}
+ */
+ var generateLI = function (content, index, classes, optgroup) {
+ return '' + content + '';
+ };
+
+ /**
+ * @param text
+ * @param [classes]
+ * @param [inline]
+ * @param [tokens]
+ * @returns {string}
+ */
+ var generateA = function (text, classes, inline, tokens) {
+ return '' + text +
+ '' +
+ '';
+ };
+
+ if (this.options.title && !this.multiple) {
+ // this option doesn't create a new element, but does add a new option, so liIndex is decreased
+ // since liObj is recalculated on every refresh, liIndex needs to be decreased even if the titleOption is already appended
+ liIndex--;
+
+ if (!this.$element.find('.bs-title-option').length) {
+ // Use native JS to prepend option (faster)
+ var element = this.$element[0];
+ titleOption.className = 'bs-title-option';
+ titleOption.appendChild(document.createTextNode(this.options.title));
+ titleOption.value = '';
+ element.insertBefore(titleOption, element.firstChild);
+ // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option.
+ // the selected item may have been changed by user or programmatically before the bootstrap select plugin runs,
+ // if so, the select will have the data-selected attribute
+ var $opt = $(element.options[element.selectedIndex]);
+ if ($opt.attr('selected') === undefined && this.$element.data('selected') === undefined) {
+ titleOption.selected = true;
+ }
+ }
+ }
+
+ this.$element.find('option').each(function (index) {
+ var $this = $(this);
+
+ liIndex++;
+
+ if ($this.hasClass('bs-title-option')) return;
+
+ // Get the class and text for the option
+ var optionClass = this.className || '',
+ inline = this.style.cssText,
+ text = $this.data('content') ? $this.data('content') : $this.html(),
+ tokens = $this.data('tokens') ? $this.data('tokens') : null,
+ subtext = typeof $this.data('subtext') !== 'undefined' ? '' + $this.data('subtext') + '' : '',
+ icon = typeof $this.data('icon') !== 'undefined' ? ' ' : '',
+ $parent = $this.parent(),
+ isOptgroup = $parent[0].tagName === 'OPTGROUP',
+ isOptgroupDisabled = isOptgroup && $parent[0].disabled,
+ isDisabled = this.disabled || isOptgroupDisabled;
+
+ if (icon !== '' && isDisabled) {
+ icon = '' + icon + '';
+ }
+
+ if (that.options.hideDisabled && (isDisabled && !isOptgroup || isOptgroupDisabled)) {
+ liIndex--;
+ return;
+ }
+
+ if (!$this.data('content')) {
+ // Prepend any icon and append any subtext to the main text.
+ text = icon + '' + text + subtext + '';
+ }
+
+ if (isOptgroup && $this.data('divider') !== true) {
+ if (that.options.hideDisabled && isDisabled) {
+ if ($parent.data('allOptionsDisabled') === undefined) {
+ var $options = $parent.children();
+ $parent.data('allOptionsDisabled', $options.filter(':disabled').length === $options.length);
+ }
+
+ if ($parent.data('allOptionsDisabled')) {
+ liIndex--;
+ return;
+ }
+ }
+
+ var optGroupClass = ' ' + $parent[0].className || '';
+
+ if ($this.index() === 0) { // Is it the first option of the optgroup?
+ optID += 1;
+
+ // Get the opt group label
+ var label = $parent[0].label,
+ labelSubtext = typeof $parent.data('subtext') !== 'undefined' ? '' + $parent.data('subtext') + '' : '',
+ labelIcon = $parent.data('icon') ? ' ' : '';
+
+ label = labelIcon + '' + label + labelSubtext + '';
+
+ if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?
+ liIndex++;
+ _li.push(generateLI('', null, 'divider', optID + 'div'));
+ }
+ liIndex++;
+ _li.push(generateLI(label, null, 'dropdown-header' + optGroupClass, optID));
+ }
+
+ if (that.options.hideDisabled && isDisabled) {
+ liIndex--;
+ return;
+ }
+
+ _li.push(generateLI(generateA(text, 'opt ' + optionClass + optGroupClass, inline, tokens), index, '', optID));
+ } else if ($this.data('divider') === true) {
+ _li.push(generateLI('', index, 'divider'));
+ } else if ($this.data('hidden') === true) {
+ _li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));
+ } else {
+ var showDivider = this.previousElementSibling && this.previousElementSibling.tagName === 'OPTGROUP';
+
+ // if previous element is not an optgroup and hideDisabled is true
+ if (!showDivider && that.options.hideDisabled) {
+ // get previous elements
+ var $prev = $(this).prevAll();
+
+ for (var i = 0; i < $prev.length; i++) {
+ // find the first element in the previous elements that is an optgroup
+ if ($prev[i].tagName === 'OPTGROUP') {
+ var optGroupDistance = 0;
+
+ // loop through the options in between the current option and the optgroup
+ // and check if they are hidden or disabled
+ for (var d = 0; d < i; d++) {
+ var prevOption = $prev[d];
+ if (prevOption.disabled || $(prevOption).data('hidden') === true) optGroupDistance++;
+ }
+
+ // if all of the options between the current option and the optgroup are hidden or disabled, show the divider
+ if (optGroupDistance === i) showDivider = true;
+
+ break;
+ }
+ }
+ }
+
+ if (showDivider) {
+ liIndex++;
+ _li.push(generateLI('', null, 'divider', optID + 'div'));
+ }
+ _li.push(generateLI(generateA(text, optionClass, inline, tokens), index));
+ }
+
+ that.liObj[index] = liIndex;
+ });
+
+ //If we are not multiple, we don't have a selected item, and we don't have a title, select the first element so something is set in the button
+ if (!this.multiple && this.$element.find('option:selected').length === 0 && !this.options.title) {
+ this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected');
+ }
+
+ return _li.join('');
+ },
+
+ findLis: function () {
+ if (this.$lis == null) this.$lis = this.$menu.find('li');
+ return this.$lis;
+ },
+
+ /**
+ * @param [updateLi] defaults to true
+ */
+ render: function (updateLi) {
+ var that = this,
+ notDisabled;
+
+ //Update the LI to match the SELECT
+ if (updateLi !== false) {
+ this.$element.find('option').each(function (index) {
+ var $lis = that.findLis().eq(that.liObj[index]);
+
+ that.setDisabled(index, this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled, $lis);
+ that.setSelected(index, this.selected, $lis);
+ });
+ }
+
+ this.togglePlaceholder();
+
+ this.tabIndex();
+
+ var selectedItems = this.$element.find('option').map(function () {
+ if (this.selected) {
+ if (that.options.hideDisabled && (this.disabled || this.parentNode.tagName === 'OPTGROUP' && this.parentNode.disabled)) return;
+
+ var $this = $(this),
+ icon = $this.data('icon') && that.options.showIcon ? ' ' : '',
+ subtext;
+
+ if (that.options.showSubtext && $this.data('subtext') && !that.multiple) {
+ subtext = ' ' + $this.data('subtext') + '';
+ } else {
+ subtext = '';
+ }
+ if (typeof $this.attr('title') !== 'undefined') {
+ return $this.attr('title');
+ } else if ($this.data('content') && that.options.showContent) {
+ return $this.data('content');
+ } else {
+ return icon + $this.html() + subtext;
+ }
+ }
+ }).toArray();
+
+ //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled
+ //Convert all the values into a comma delimited string
+ var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator);
+
+ //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc..
+ if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) {
+ var max = this.options.selectedTextFormat.split('>');
+ if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) {
+ notDisabled = this.options.hideDisabled ? ', [disabled]' : '';
+ var totalCount = this.$element.find('option').not('[data-divider="true"], [data-hidden="true"]' + notDisabled).length,
+ tr8nText = (typeof this.options.countSelectedText === 'function') ? this.options.countSelectedText(selectedItems.length, totalCount) : this.options.countSelectedText;
+ title = tr8nText.replace('{0}', selectedItems.length.toString()).replace('{1}', totalCount.toString());
+ }
+ }
+
+ if (this.options.title == undefined) {
+ this.options.title = this.$element.attr('title');
+ }
+
+ if (this.options.selectedTextFormat == 'static') {
+ title = this.options.title;
+ }
+
+ //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text
+ if (!title) {
+ title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
+ }
+
+ //strip all html-tags and trim the result
+ this.$button.attr('title', $.trim(title.replace(/<[^>]*>?/g, '')));
+ this.$button.children('.filter-option').html(title);
+
+ this.$element.trigger('rendered.bs.select');
+ },
+
+ /**
+ * @param [style]
+ * @param [status]
+ */
+ setStyle: function (style, status) {
+ if (this.$element.attr('class')) {
+ this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi, ''));
+ }
+
+ var buttonClass = style ? style : this.options.style;
+
+ if (status == 'add') {
+ this.$button.addClass(buttonClass);
+ } else if (status == 'remove') {
+ this.$button.removeClass(buttonClass);
+ } else {
+ this.$button.removeClass(this.options.style);
+ this.$button.addClass(buttonClass);
+ }
+ },
+
+ liHeight: function (refresh) {
+ if (!refresh && (this.options.size === false || this.sizeInfo)) return;
+
+ var newElement = document.createElement('div'),
+ menu = document.createElement('div'),
+ menuInner = document.createElement('ul'),
+ divider = document.createElement('li'),
+ li = document.createElement('li'),
+ a = document.createElement('a'),
+ text = document.createElement('span'),
+ header = this.options.header && this.$menu.find('.popover-title').length > 0 ? this.$menu.find('.popover-title')[0].cloneNode(true) : null,
+ search = this.options.liveSearch ? document.createElement('div') : null,
+ actions = this.options.actionsBox && this.multiple && this.$menu.find('.bs-actionsbox').length > 0 ? this.$menu.find('.bs-actionsbox')[0].cloneNode(true) : null,
+ doneButton = this.options.doneButton && this.multiple && this.$menu.find('.bs-donebutton').length > 0 ? this.$menu.find('.bs-donebutton')[0].cloneNode(true) : null;
+
+ text.className = 'text';
+ newElement.className = this.$menu[0].parentNode.className + ' open';
+ menu.className = 'dropdown-menu open';
+ menuInner.className = 'dropdown-menu inner';
+ divider.className = 'divider';
+
+ text.appendChild(document.createTextNode('Inner text'));
+ a.appendChild(text);
+ li.appendChild(a);
+ menuInner.appendChild(li);
+ menuInner.appendChild(divider);
+ if (header) menu.appendChild(header);
+ if (search) {
+ // create a span instead of input as creating an input element is slower
+ var input = document.createElement('span');
+ search.className = 'bs-searchbox';
+ input.className = 'form-control';
+ search.appendChild(input);
+ menu.appendChild(search);
+ }
+ if (actions) menu.appendChild(actions);
+ menu.appendChild(menuInner);
+ if (doneButton) menu.appendChild(doneButton);
+ newElement.appendChild(menu);
+
+ document.body.appendChild(newElement);
+
+ var liHeight = a.offsetHeight,
+ headerHeight = header ? header.offsetHeight : 0,
+ searchHeight = search ? search.offsetHeight : 0,
+ actionsHeight = actions ? actions.offsetHeight : 0,
+ doneButtonHeight = doneButton ? doneButton.offsetHeight : 0,
+ dividerHeight = $(divider).outerHeight(true),
+ // fall back to jQuery if getComputedStyle is not supported
+ menuStyle = typeof getComputedStyle === 'function' ? getComputedStyle(menu) : false,
+ $menu = menuStyle ? null : $(menu),
+ menuPadding = {
+ vert: parseInt(menuStyle ? menuStyle.paddingTop : $menu.css('paddingTop')) +
+ parseInt(menuStyle ? menuStyle.paddingBottom : $menu.css('paddingBottom')) +
+ parseInt(menuStyle ? menuStyle.borderTopWidth : $menu.css('borderTopWidth')) +
+ parseInt(menuStyle ? menuStyle.borderBottomWidth : $menu.css('borderBottomWidth')),
+ horiz: parseInt(menuStyle ? menuStyle.paddingLeft : $menu.css('paddingLeft')) +
+ parseInt(menuStyle ? menuStyle.paddingRight : $menu.css('paddingRight')) +
+ parseInt(menuStyle ? menuStyle.borderLeftWidth : $menu.css('borderLeftWidth')) +
+ parseInt(menuStyle ? menuStyle.borderRightWidth : $menu.css('borderRightWidth'))
+ },
+ menuExtras = {
+ vert: menuPadding.vert +
+ parseInt(menuStyle ? menuStyle.marginTop : $menu.css('marginTop')) +
+ parseInt(menuStyle ? menuStyle.marginBottom : $menu.css('marginBottom')) + 2,
+ horiz: menuPadding.horiz +
+ parseInt(menuStyle ? menuStyle.marginLeft : $menu.css('marginLeft')) +
+ parseInt(menuStyle ? menuStyle.marginRight : $menu.css('marginRight')) + 2
+ }
+
+ document.body.removeChild(newElement);
+
+ this.sizeInfo = {
+ liHeight: liHeight,
+ headerHeight: headerHeight,
+ searchHeight: searchHeight,
+ actionsHeight: actionsHeight,
+ doneButtonHeight: doneButtonHeight,
+ dividerHeight: dividerHeight,
+ menuPadding: menuPadding,
+ menuExtras: menuExtras
+ };
+ },
+
+ setSize: function () {
+ this.findLis();
+ this.liHeight();
+
+ if (this.options.header) this.$menu.css('padding-top', 0);
+ if (this.options.size === false) return;
+
+ var that = this,
+ $menu = this.$menu,
+ $menuInner = this.$menuInner,
+ $window = $(window),
+ selectHeight = this.$newElement[0].offsetHeight,
+ selectWidth = this.$newElement[0].offsetWidth,
+ liHeight = this.sizeInfo['liHeight'],
+ headerHeight = this.sizeInfo['headerHeight'],
+ searchHeight = this.sizeInfo['searchHeight'],
+ actionsHeight = this.sizeInfo['actionsHeight'],
+ doneButtonHeight = this.sizeInfo['doneButtonHeight'],
+ divHeight = this.sizeInfo['dividerHeight'],
+ menuPadding = this.sizeInfo['menuPadding'],
+ menuExtras = this.sizeInfo['menuExtras'],
+ notDisabled = this.options.hideDisabled ? '.disabled' : '',
+ menuHeight,
+ menuWidth,
+ getHeight,
+ getWidth,
+ selectOffsetTop,
+ selectOffsetBot,
+ selectOffsetLeft,
+ selectOffsetRight,
+ getPos = function() {
+ var pos = that.$newElement.offset(),
+ $container = $(that.options.container),
+ containerPos;
+
+ if (that.options.container && !$container.is('body')) {
+ containerPos = $container.offset();
+ containerPos.top += parseInt($container.css('borderTopWidth'));
+ containerPos.left += parseInt($container.css('borderLeftWidth'));
+ } else {
+ containerPos = { top: 0, left: 0 };
+ }
+
+ selectOffsetTop = pos.top - containerPos.top - $window.scrollTop();
+ selectOffsetBot = $window.height() - selectOffsetTop - selectHeight - containerPos.top;
+ selectOffsetLeft = pos.left - containerPos.left - $window.scrollLeft();
+ selectOffsetRight = $window.width() - selectOffsetLeft - selectWidth - containerPos.left;
+ };
+
+ getPos();
+
+ if (this.options.size === 'auto') {
+ var getSize = function () {
+ var minHeight,
+ hasClass = function (className, include) {
+ return function (element) {
+ if (include) {
+ return (element.classList ? element.classList.contains(className) : $(element).hasClass(className));
+ } else {
+ return !(element.classList ? element.classList.contains(className) : $(element).hasClass(className));
+ }
+ };
+ },
+ lis = that.$menuInner[0].getElementsByTagName('li'),
+ lisVisible = Array.prototype.filter ? Array.prototype.filter.call(lis, hasClass('hidden', false)) : that.$lis.not('.hidden'),
+ optGroup = Array.prototype.filter ? Array.prototype.filter.call(lisVisible, hasClass('dropdown-header', true)) : lisVisible.filter('.dropdown-header');
+
+ getPos();
+ menuHeight = selectOffsetBot - menuExtras.vert;
+ menuWidth = selectOffsetRight - menuExtras.horiz;
+
+ if (that.options.container) {
+ if (!$menu.data('height')) $menu.data('height', $menu.height());
+ getHeight = $menu.data('height');
+
+ if (!$menu.data('width')) $menu.data('width', $menu.width());
+ getWidth = $menu.data('width');
+ } else {
+ getHeight = $menu.height();
+ getWidth = $menu.width();
+ }
+
+ if (that.options.dropupAuto) {
+ that.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras.vert) < getHeight);
+ }
+
+ if (that.$newElement.hasClass('dropup')) {
+ menuHeight = selectOffsetTop - menuExtras.vert;
+ }
+
+ if (that.options.dropdownAlignRight === 'auto') {
+ $menu.toggleClass('dropdown-menu-right', selectOffsetLeft > selectOffsetRight && (menuWidth - menuExtras.horiz) < (getWidth - selectWidth));
+ }
+
+ if ((lisVisible.length + optGroup.length) > 3) {
+ minHeight = liHeight * 3 + menuExtras.vert - 2;
+ } else {
+ minHeight = 0;
+ }
+
+ $menu.css({
+ 'max-height': menuHeight + 'px',
+ 'overflow': 'hidden',
+ 'min-height': minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px'
+ });
+ $menuInner.css({
+ 'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding.vert + 'px',
+ 'overflow-y': 'auto',
+ 'min-height': Math.max(minHeight - menuPadding.vert, 0) + 'px'
+ });
+ };
+ getSize();
+ this.$searchbox.off('input.getSize propertychange.getSize').on('input.getSize propertychange.getSize', getSize);
+ $window.off('resize.getSize scroll.getSize').on('resize.getSize scroll.getSize', getSize);
+ } else if (this.options.size && this.options.size != 'auto' && this.$lis.not(notDisabled).length > this.options.size) {
+ var optIndex = this.$lis.not('.divider').not(notDisabled).children().slice(0, this.options.size).last().parent().index(),
+ divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;
+ menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding.vert;
+
+ if (that.options.container) {
+ if (!$menu.data('height')) $menu.data('height', $menu.height());
+ getHeight = $menu.data('height');
+ } else {
+ getHeight = $menu.height();
+ }
+
+ if (that.options.dropupAuto) {
+ //noinspection JSUnusedAssignment
+ this.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras.vert) < getHeight);
+ }
+ $menu.css({
+ 'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px',
+ 'overflow': 'hidden',
+ 'min-height': ''
+ });
+ $menuInner.css({
+ 'max-height': menuHeight - menuPadding.vert + 'px',
+ 'overflow-y': 'auto',
+ 'min-height': ''
+ });
+ }
+ },
+
+ setWidth: function () {
+ if (this.options.width === 'auto') {
+ this.$menu.css('min-width', '0');
+
+ // Get correct width if element is hidden
+ var $selectClone = this.$menu.parent().clone().appendTo('body'),
+ $selectClone2 = this.options.container ? this.$newElement.clone().appendTo('body') : $selectClone,
+ ulWidth = $selectClone.children('.dropdown-menu').outerWidth(),
+ btnWidth = $selectClone2.css('width', 'auto').children('button').outerWidth();
+
+ $selectClone.remove();
+ $selectClone2.remove();
+
+ // Set width to whatever's larger, button title or longest option
+ this.$newElement.css('width', Math.max(ulWidth, btnWidth) + 'px');
+ } else if (this.options.width === 'fit') {
+ // Remove inline min-width so width can be changed from 'auto'
+ this.$menu.css('min-width', '');
+ this.$newElement.css('width', '').addClass('fit-width');
+ } else if (this.options.width) {
+ // Remove inline min-width so width can be changed from 'auto'
+ this.$menu.css('min-width', '');
+ this.$newElement.css('width', this.options.width);
+ } else {
+ // Remove inline min-width/width so width can be changed
+ this.$menu.css('min-width', '');
+ this.$newElement.css('width', '');
+ }
+ // Remove fit-width class if width is changed programmatically
+ if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') {
+ this.$newElement.removeClass('fit-width');
+ }
+ },
+
+ selectPosition: function () {
+ this.$bsContainer = $('');
+
+ var that = this,
+ $container = $(this.options.container),
+ pos,
+ containerPos,
+ actualHeight,
+ getPlacement = function ($element) {
+ that.$bsContainer.addClass($element.attr('class').replace(/form-control|fit-width/gi, '')).toggleClass('dropup', $element.hasClass('dropup'));
+ pos = $element.offset();
+
+ if (!$container.is('body')) {
+ containerPos = $container.offset();
+ containerPos.top += parseInt($container.css('borderTopWidth')) - $container.scrollTop();
+ containerPos.left += parseInt($container.css('borderLeftWidth')) - $container.scrollLeft();
+ } else {
+ containerPos = { top: 0, left: 0 };
+ }
+
+ actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight;
+
+ that.$bsContainer.css({
+ 'top': pos.top - containerPos.top + actualHeight,
+ 'left': pos.left - containerPos.left,
+ 'width': $element[0].offsetWidth
+ });
+ };
+
+ this.$button.on('click', function () {
+ var $this = $(this);
+
+ if (that.isDisabled()) {
+ return;
+ }
+
+ getPlacement(that.$newElement);
+
+ that.$bsContainer
+ .appendTo(that.options.container)
+ .toggleClass('open', !$this.hasClass('open'))
+ .append(that.$menu);
+ });
+
+ $(window).on('resize scroll', function () {
+ getPlacement(that.$newElement);
+ });
+
+ this.$element.on('hide.bs.select', function () {
+ that.$menu.data('height', that.$menu.height());
+ that.$bsContainer.detach();
+ });
+ },
+
+ /**
+ * @param {number} index - the index of the option that is being changed
+ * @param {boolean} selected - true if the option is being selected, false if being deselected
+ * @param {JQuery} $lis - the 'li' element that is being modified
+ */
+ setSelected: function (index, selected, $lis) {
+ if (!$lis) {
+ this.togglePlaceholder(); // check if setSelected is being called by changing the value of the select
+ $lis = this.findLis().eq(this.liObj[index]);
+ }
+
+ $lis.toggleClass('selected', selected).find('a').attr('aria-selected', selected);
+ },
+
+ /**
+ * @param {number} index - the index of the option that is being disabled
+ * @param {boolean} disabled - true if the option is being disabled, false if being enabled
+ * @param {JQuery} $lis - the 'li' element that is being modified
+ */
+ setDisabled: function (index, disabled, $lis) {
+ if (!$lis) {
+ $lis = this.findLis().eq(this.liObj[index]);
+ }
+
+ if (disabled) {
+ $lis.addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1).attr('aria-disabled', true);
+ } else {
+ $lis.removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0).attr('aria-disabled', false);
+ }
+ },
+
+ isDisabled: function () {
+ return this.$element[0].disabled;
+ },
+
+ checkDisabled: function () {
+ var that = this;
+
+ if (this.isDisabled()) {
+ this.$newElement.addClass('disabled');
+ this.$button.addClass('disabled').attr('tabindex', -1);
+ } else {
+ if (this.$button.hasClass('disabled')) {
+ this.$newElement.removeClass('disabled');
+ this.$button.removeClass('disabled');
+ }
+
+ if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {
+ this.$button.removeAttr('tabindex');
+ }
+ }
+
+ this.$button.click(function () {
+ return !that.isDisabled();
+ });
+ },
+
+ togglePlaceholder: function () {
+ var value = this.$element.val();
+ this.$button.toggleClass('bs-placeholder', value === null || value === '');
+ },
+
+ tabIndex: function () {
+ if (this.$element.data('tabindex') !== this.$element.attr('tabindex') &&
+ (this.$element.attr('tabindex') !== -98 && this.$element.attr('tabindex') !== '-98')) {
+ this.$element.data('tabindex', this.$element.attr('tabindex'));
+ this.$button.attr('tabindex', this.$element.data('tabindex'));
+ }
+
+ this.$element.attr('tabindex', -98);
+ },
+
+ clickListener: function () {
+ var that = this,
+ $document = $(document);
+
+ this.$newElement.on('touchstart.dropdown', '.dropdown-menu', function (e) {
+ e.stopPropagation();
+ });
+
+ $document.data('spaceSelect', false);
+
+ this.$button.on('keyup', function (e) {
+ if (/(32)/.test(e.keyCode.toString(10)) && $document.data('spaceSelect')) {
+ e.preventDefault();
+ $document.data('spaceSelect', false);
+ }
+ });
+
+ this.$button.on('click', function () {
+ that.setSize();
+ });
+
+ this.$element.on('shown.bs.select', function () {
+ if (!that.options.liveSearch && !that.multiple) {
+ that.$menuInner.find('.selected a').focus();
+ } else if (!that.multiple) {
+ var selectedIndex = that.liObj[that.$element[0].selectedIndex];
+
+ if (typeof selectedIndex !== 'number' || that.options.size === false) return;
+
+ // scroll to selected option
+ var offset = that.$lis.eq(selectedIndex)[0].offsetTop - that.$menuInner[0].offsetTop;
+ offset = offset - that.$menuInner[0].offsetHeight/2 + that.sizeInfo.liHeight/2;
+ that.$menuInner[0].scrollTop = offset;
+ }
+ });
+
+ this.$menuInner.on('click', 'li a', function (e) {
+ var $this = $(this),
+ clickedIndex = $this.parent().data('originalIndex'),
+ prevValue = that.$element.val(),
+ prevIndex = that.$element.prop('selectedIndex'),
+ triggerChange = true;
+
+ // Don't close on multi choice menu
+ if (that.multiple && that.options.maxOptions !== 1) {
+ e.stopPropagation();
+ }
+
+ e.preventDefault();
+
+ //Don't run if we have been disabled
+ if (!that.isDisabled() && !$this.parent().hasClass('disabled')) {
+ var $options = that.$element.find('option'),
+ $option = $options.eq(clickedIndex),
+ state = $option.prop('selected'),
+ $optgroup = $option.parent('optgroup'),
+ maxOptions = that.options.maxOptions,
+ maxOptionsGrp = $optgroup.data('maxOptions') || false;
+
+ if (!that.multiple) { // Deselect all others if not multi select box
+ $options.prop('selected', false);
+ $option.prop('selected', true);
+ that.$menuInner.find('.selected').removeClass('selected').find('a').attr('aria-selected', false);
+ that.setSelected(clickedIndex, true);
+ } else { // Toggle the one we have chosen if we are multi select.
+ $option.prop('selected', !state);
+ that.setSelected(clickedIndex, !state);
+ $this.blur();
+
+ if (maxOptions !== false || maxOptionsGrp !== false) {
+ var maxReached = maxOptions < $options.filter(':selected').length,
+ maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
+
+ if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) {
+ if (maxOptions && maxOptions == 1) {
+ $options.prop('selected', false);
+ $option.prop('selected', true);
+ that.$menuInner.find('.selected').removeClass('selected');
+ that.setSelected(clickedIndex, true);
+ } else if (maxOptionsGrp && maxOptionsGrp == 1) {
+ $optgroup.find('option:selected').prop('selected', false);
+ $option.prop('selected', true);
+ var optgroupID = $this.parent().data('optgroup');
+ that.$menuInner.find('[data-optgroup="' + optgroupID + '"]').removeClass('selected');
+ that.setSelected(clickedIndex, true);
+ } else {
+ var maxOptionsText = typeof that.options.maxOptionsText === 'string' ? [that.options.maxOptionsText, that.options.maxOptionsText] : that.options.maxOptionsText,
+ maxOptionsArr = typeof maxOptionsText === 'function' ? maxOptionsText(maxOptions, maxOptionsGrp) : maxOptionsText,
+ maxTxt = maxOptionsArr[0].replace('{n}', maxOptions),
+ maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp),
+ $notify = $('');
+ // If {var} is set in array, replace it
+ /** @deprecated */
+ if (maxOptionsArr[2]) {
+ maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]);
+ maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]);
+ }
+
+ $option.prop('selected', false);
+
+ that.$menu.append($notify);
+
+ if (maxOptions && maxReached) {
+ $notify.append($('' + maxTxt + '
'));
+ triggerChange = false;
+ that.$element.trigger('maxReached.bs.select');
+ }
+
+ if (maxOptionsGrp && maxReachedGrp) {
+ $notify.append($('' + maxTxtGrp + '
'));
+ triggerChange = false;
+ that.$element.trigger('maxReachedGrp.bs.select');
+ }
+
+ setTimeout(function () {
+ that.setSelected(clickedIndex, false);
+ }, 10);
+
+ $notify.delay(750).fadeOut(300, function () {
+ $(this).remove();
+ });
+ }
+ }
+ }
+ }
+
+ if (!that.multiple || (that.multiple && that.options.maxOptions === 1)) {
+ that.$button.focus();
+ } else if (that.options.liveSearch) {
+ that.$searchbox.focus();
+ }
+
+ // Trigger select 'change'
+ if (triggerChange) {
+ if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) {
+ // $option.prop('selected') is current option state (selected/unselected). state is previous option state.
+ changed_arguments = [clickedIndex, $option.prop('selected'), state];
+ that.$element
+ .triggerNative('change');
+ }
+ }
+ }
+ });
+
+ this.$menu.on('click', 'li.disabled a, .popover-title, .popover-title :not(.close)', function (e) {
+ if (e.currentTarget == this) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (that.options.liveSearch && !$(e.target).hasClass('close')) {
+ that.$searchbox.focus();
+ } else {
+ that.$button.focus();
+ }
+ }
+ });
+
+ this.$menuInner.on('click', '.divider, .dropdown-header', function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ if (that.options.liveSearch) {
+ that.$searchbox.focus();
+ } else {
+ that.$button.focus();
+ }
+ });
+
+ this.$menu.on('click', '.popover-title .close', function () {
+ that.$button.click();
+ });
+
+ this.$searchbox.on('click', function (e) {
+ e.stopPropagation();
+ });
+
+ this.$menu.on('click', '.actions-btn', function (e) {
+ if (that.options.liveSearch) {
+ that.$searchbox.focus();
+ } else {
+ that.$button.focus();
+ }
+
+ e.preventDefault();
+ e.stopPropagation();
+
+ if ($(this).hasClass('bs-select-all')) {
+ that.selectAll();
+ } else {
+ that.deselectAll();
+ }
+ });
+
+ this.$element.change(function () {
+ that.render(false);
+ that.$element.trigger('changed.bs.select', changed_arguments);
+ changed_arguments = null;
+ });
+ },
+
+ liveSearchListener: function () {
+ var that = this,
+ $no_results = $('');
+
+ this.$button.on('click.dropdown.data-api touchstart.dropdown.data-api', function () {
+ that.$menuInner.find('.active').removeClass('active');
+ if (!!that.$searchbox.val()) {
+ that.$searchbox.val('');
+ that.$lis.not('.is-hidden').removeClass('hidden');
+ if (!!$no_results.parent().length) $no_results.remove();
+ }
+ if (!that.multiple) that.$menuInner.find('.selected').addClass('active');
+ setTimeout(function () {
+ that.$searchbox.focus();
+ }, 10);
+ });
+
+ this.$searchbox.on('click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api', function (e) {
+ e.stopPropagation();
+ });
+
+ this.$searchbox.on('input propertychange', function () {
+ if (that.$searchbox.val()) {
+ var $searchBase = that.$lis.not('.is-hidden').removeClass('hidden').children('a');
+ if (that.options.liveSearchNormalize) {
+ $searchBase = $searchBase.not(':a' + that._searchStyle() + '("' + normalizeToBase(that.$searchbox.val()) + '")');
+ } else {
+ $searchBase = $searchBase.not(':' + that._searchStyle() + '("' + that.$searchbox.val() + '")');
+ }
+ $searchBase.parent().addClass('hidden');
+
+ that.$lis.filter('.dropdown-header').each(function () {
+ var $this = $(this),
+ optgroup = $this.data('optgroup');
+
+ if (that.$lis.filter('[data-optgroup=' + optgroup + ']').not($this).not('.hidden').length === 0) {
+ $this.addClass('hidden');
+ that.$lis.filter('[data-optgroup=' + optgroup + 'div]').addClass('hidden');
+ }
+ });
+
+ var $lisVisible = that.$lis.not('.hidden');
+
+ // hide divider if first or last visible, or if followed by another divider
+ $lisVisible.each(function (index) {
+ var $this = $(this);
+
+ if ($this.hasClass('divider') && (
+ $this.index() === $lisVisible.first().index() ||
+ $this.index() === $lisVisible.last().index() ||
+ $lisVisible.eq(index + 1).hasClass('divider'))) {
+ $this.addClass('hidden');
+ }
+ });
+
+ if (!that.$lis.not('.hidden, .no-results').length) {
+ if (!!$no_results.parent().length) {
+ $no_results.remove();
+ }
+ $no_results.html(that.options.noneResultsText.replace('{0}', '"' + htmlEscape(that.$searchbox.val()) + '"')).show();
+ that.$menuInner.append($no_results);
+ } else if (!!$no_results.parent().length) {
+ $no_results.remove();
+ }
+ } else {
+ that.$lis.not('.is-hidden').removeClass('hidden');
+ if (!!$no_results.parent().length) {
+ $no_results.remove();
+ }
+ }
+
+ that.$lis.filter('.active').removeClass('active');
+ if (that.$searchbox.val()) that.$lis.not('.hidden, .divider, .dropdown-header').eq(0).addClass('active').children('a').focus();
+ $(this).focus();
+ });
+ },
+
+ _searchStyle: function () {
+ var styles = {
+ begins: 'ibegins',
+ startsWith: 'ibegins'
+ };
+
+ return styles[this.options.liveSearchStyle] || 'icontains';
+ },
+
+ val: function (value) {
+ if (typeof value !== 'undefined') {
+ this.$element.val(value);
+ this.render();
+
+ return this.$element;
+ } else {
+ return this.$element.val();
+ }
+ },
+
+ changeAll: function (status) {
+ if (!this.multiple) return;
+ if (typeof status === 'undefined') status = true;
+
+ this.findLis();
+
+ var $options = this.$element.find('option'),
+ $lisVisible = this.$lis.not('.divider, .dropdown-header, .disabled, .hidden'),
+ lisVisLen = $lisVisible.length,
+ selectedOptions = [];
+
+ if (status) {
+ if ($lisVisible.filter('.selected').length === $lisVisible.length) return;
+ } else {
+ if ($lisVisible.filter('.selected').length === 0) return;
+ }
+
+ $lisVisible.toggleClass('selected', status);
+
+ for (var i = 0; i < lisVisLen; i++) {
+ var origIndex = $lisVisible[i].getAttribute('data-original-index');
+ selectedOptions[selectedOptions.length] = $options.eq(origIndex)[0];
+ }
+
+ $(selectedOptions).prop('selected', status);
+
+ this.render(false);
+
+ this.togglePlaceholder();
+
+ this.$element
+ .triggerNative('change');
+ },
+
+ selectAll: function () {
+ return this.changeAll(true);
+ },
+
+ deselectAll: function () {
+ return this.changeAll(false);
+ },
+
+ toggle: function (e) {
+ e = e || window.event;
+
+ if (e) e.stopPropagation();
+
+ this.$button.trigger('click');
+ },
+
+ keydown: function (e) {
+ var $this = $(this),
+ $parent = $this.is('input') ? $this.parent().parent() : $this.parent(),
+ $items,
+ that = $parent.data('this'),
+ index,
+ next,
+ first,
+ last,
+ prev,
+ nextPrev,
+ prevIndex,
+ isActive,
+ selector = ':not(.disabled, .hidden, .dropdown-header, .divider)',
+ keyCodeMap = {
+ 32: ' ',
+ 48: '0',
+ 49: '1',
+ 50: '2',
+ 51: '3',
+ 52: '4',
+ 53: '5',
+ 54: '6',
+ 55: '7',
+ 56: '8',
+ 57: '9',
+ 59: ';',
+ 65: 'a',
+ 66: 'b',
+ 67: 'c',
+ 68: 'd',
+ 69: 'e',
+ 70: 'f',
+ 71: 'g',
+ 72: 'h',
+ 73: 'i',
+ 74: 'j',
+ 75: 'k',
+ 76: 'l',
+ 77: 'm',
+ 78: 'n',
+ 79: 'o',
+ 80: 'p',
+ 81: 'q',
+ 82: 'r',
+ 83: 's',
+ 84: 't',
+ 85: 'u',
+ 86: 'v',
+ 87: 'w',
+ 88: 'x',
+ 89: 'y',
+ 90: 'z',
+ 96: '0',
+ 97: '1',
+ 98: '2',
+ 99: '3',
+ 100: '4',
+ 101: '5',
+ 102: '6',
+ 103: '7',
+ 104: '8',
+ 105: '9'
+ };
+
+ if (that.options.liveSearch) $parent = $this.parent().parent();
+
+ if (that.options.container) $parent = that.$menu;
+
+ $items = $('[role="listbox"] li', $parent);
+
+ isActive = that.$newElement.hasClass('open');
+
+ if (!isActive && (e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode >= 96 && e.keyCode <= 105 || e.keyCode >= 65 && e.keyCode <= 90)) {
+ if (!that.options.container) {
+ that.setSize();
+ that.$menu.parent().addClass('open');
+ isActive = true;
+ } else {
+ that.$button.trigger('click');
+ }
+ that.$searchbox.focus();
+ return;
+ }
+
+ if (that.options.liveSearch) {
+ if (/(^9$|27)/.test(e.keyCode.toString(10)) && isActive) {
+ e.preventDefault();
+ e.stopPropagation();
+ that.$button.click().focus();
+ }
+ // $items contains li elements when liveSearch is enabled
+ $items = $('[role="listbox"] li' + selector, $parent);
+ if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) {
+ if ($items.filter('.active').length === 0) {
+ $items = that.$menuInner.find('li');
+ if (that.options.liveSearchNormalize) {
+ $items = $items.filter(':a' + that._searchStyle() + '(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
+ } else {
+ $items = $items.filter(':' + that._searchStyle() + '(' + keyCodeMap[e.keyCode] + ')');
+ }
+ }
+ }
+ }
+
+ if (!$items.length) return;
+
+ if (/(38|40)/.test(e.keyCode.toString(10))) {
+ index = $items.index($items.find('a').filter(':focus').parent());
+ first = $items.filter(selector).first().index();
+ last = $items.filter(selector).last().index();
+ next = $items.eq(index).nextAll(selector).eq(0).index();
+ prev = $items.eq(index).prevAll(selector).eq(0).index();
+ nextPrev = $items.eq(next).prevAll(selector).eq(0).index();
+
+ if (that.options.liveSearch) {
+ $items.each(function (i) {
+ if (!$(this).hasClass('disabled')) {
+ $(this).data('index', i);
+ }
+ });
+ index = $items.index($items.filter('.active'));
+ first = $items.first().data('index');
+ last = $items.last().data('index');
+ next = $items.eq(index).nextAll().eq(0).data('index');
+ prev = $items.eq(index).prevAll().eq(0).data('index');
+ nextPrev = $items.eq(next).prevAll().eq(0).data('index');
+ }
+
+ prevIndex = $this.data('prevIndex');
+
+ if (e.keyCode == 38) {
+ if (that.options.liveSearch) index--;
+ if (index != nextPrev && index > prev) index = prev;
+ if (index < first) index = first;
+ if (index == prevIndex) index = last;
+ } else if (e.keyCode == 40) {
+ if (that.options.liveSearch) index++;
+ if (index == -1) index = 0;
+ if (index != nextPrev && index < next) index = next;
+ if (index > last) index = last;
+ if (index == prevIndex) index = first;
+ }
+
+ $this.data('prevIndex', index);
+
+ if (!that.options.liveSearch) {
+ $items.eq(index).children('a').focus();
+ } else {
+ e.preventDefault();
+ if (!$this.hasClass('dropdown-toggle')) {
+ $items.removeClass('active').eq(index).addClass('active').children('a').focus();
+ $this.focus();
+ }
+ }
+
+ } else if (!$this.is('input')) {
+ var keyIndex = [],
+ count,
+ prevKey;
+
+ $items.each(function () {
+ if (!$(this).hasClass('disabled')) {
+ if ($.trim($(this).children('a').text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) {
+ keyIndex.push($(this).index());
+ }
+ }
+ });
+
+ count = $(document).data('keycount');
+ count++;
+ $(document).data('keycount', count);
+
+ prevKey = $.trim($(':focus').text().toLowerCase()).substring(0, 1);
+
+ if (prevKey != keyCodeMap[e.keyCode]) {
+ count = 1;
+ $(document).data('keycount', count);
+ } else if (count >= keyIndex.length) {
+ $(document).data('keycount', 0);
+ if (count > keyIndex.length) count = 1;
+ }
+
+ $items.eq(keyIndex[count - 1]).children('a').focus();
+ }
+
+ // Select focused option if "Enter", "Spacebar" or "Tab" (when selectOnTab is true) are pressed inside the menu.
+ if ((/(13|32)/.test(e.keyCode.toString(10)) || (/(^9$)/.test(e.keyCode.toString(10)) && that.options.selectOnTab)) && isActive) {
+ if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault();
+ if (!that.options.liveSearch) {
+ var elem = $(':focus');
+ elem.click();
+ // Bring back focus for multiselects
+ elem.focus();
+ // Prevent screen from scrolling if the user hit the spacebar
+ e.preventDefault();
+ // Fixes spacebar selection of dropdown items in FF & IE
+ $(document).data('spaceSelect', true);
+ } else if (!/(32)/.test(e.keyCode.toString(10))) {
+ that.$menuInner.find('.active a').click();
+ $this.focus();
+ }
+ $(document).data('keycount', 0);
+ }
+
+ if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) {
+ that.$menu.parent().removeClass('open');
+ if (that.options.container) that.$newElement.removeClass('open');
+ that.$button.focus();
+ }
+ },
+
+ mobile: function () {
+ this.$element.addClass('mobile-device');
+ },
+
+ refresh: function () {
+ this.$lis = null;
+ this.liObj = {};
+ this.reloadLi();
+ this.render();
+ this.checkDisabled();
+ this.liHeight(true);
+ this.setStyle();
+ this.setWidth();
+ if (this.$lis) this.$searchbox.trigger('propertychange');
+
+ this.$element.trigger('refreshed.bs.select');
+ },
+
+ hide: function () {
+ this.$newElement.hide();
+ },
+
+ show: function () {
+ this.$newElement.show();
+ },
+
+ remove: function () {
+ this.$newElement.remove();
+ this.$element.remove();
+ },
+
+ destroy: function () {
+ this.$newElement.before(this.$element).remove();
+
+ if (this.$bsContainer) {
+ this.$bsContainer.remove();
+ } else {
+ this.$menu.remove();
+ }
+
+ this.$element
+ .off('.bs.select')
+ .removeData('selectpicker')
+ .removeClass('bs-select-hidden selectpicker');
+ }
+ };
+
+ // SELECTPICKER PLUGIN DEFINITION
+ // ==============================
+ function Plugin(option, event) {
+ // get the args of the outer function..
+ var args = arguments;
+ // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
+ // to get lost/corrupted in android 2.3 and IE9 #715 #775
+ var _option = option,
+ _event = event;
+ [].shift.apply(args);
+
+ var value;
+ var chain = this.each(function () {
+ var $this = $(this);
+ if ($this.is('select')) {
+ var data = $this.data('selectpicker'),
+ options = typeof _option == 'object' && _option;
+
+ if (!data) {
+ var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options);
+ config.template = $.extend({}, Selectpicker.DEFAULTS.template, ($.fn.selectpicker.defaults ? $.fn.selectpicker.defaults.template : {}), $this.data().template, options.template);
+ $this.data('selectpicker', (data = new Selectpicker(this, config, _event)));
+ } else if (options) {
+ for (var i in options) {
+ if (options.hasOwnProperty(i)) {
+ data.options[i] = options[i];
+ }
+ }
+ }
+
+ if (typeof _option == 'string') {
+ if (data[_option] instanceof Function) {
+ value = data[_option].apply(data, args);
+ } else {
+ value = data.options[_option];
+ }
+ }
+ }
+ });
+
+ if (typeof value !== 'undefined') {
+ //noinspection JSUnusedAssignment
+ return value;
+ } else {
+ return chain;
+ }
+ }
+
+ var old = $.fn.selectpicker;
+ $.fn.selectpicker = Plugin;
+ $.fn.selectpicker.Constructor = Selectpicker;
+
+ // SELECTPICKER NO CONFLICT
+ // ========================
+ $.fn.selectpicker.noConflict = function () {
+ $.fn.selectpicker = old;
+ return this;
+ };
+
+ $(document)
+ .data('keycount', 0)
+ .on('keydown.bs.select', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input', Selectpicker.prototype.keydown)
+ .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input', function (e) {
+ e.stopPropagation();
+ });
+
+ // SELECTPICKER DATA-API
+ // =====================
+ $(window).on('load.bs.select.data-api', function () {
+ $('.selectpicker').each(function () {
+ var $selectpicker = $(this);
+ Plugin.call($selectpicker, $selectpicker.data());
+ })
+ });
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/bootstrap-select.js.map b/javascript/bootstrap-select/js/bootstrap-select.js.map
new file mode 100755
index 0000000..a513f51
--- /dev/null
+++ b/javascript/bootstrap-select/js/bootstrap-select.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["bootstrap-select.js"],"names":["root","factory","define","amd","a0","exports","module","require","jQuery","this","$","normalizeToBase","text","rExps","re","ch","each","replace","htmlEscape","html","escapeMap","&","<",">","\"","'","`","source","Object","keys","join","testRegexp","RegExp","replaceRegexp","string","test","match","Plugin","option","event","args","arguments","_option","_event","shift","apply","value","chain","$this","is","data","options","i","hasOwnProperty","config","extend","Selectpicker","DEFAULTS","fn","selectpicker","defaults","template","Function","String","prototype","includes","toString","defineProperty","object","$defineProperty","result","error","indexOf","search","TypeError","call","stringLength","length","searchString","searchLength","position","undefined","pos","Number","start","Math","min","max","configurable","writable","startsWith","index","charCodeAt","o","k","r","push","valHooks","useDefault","_set","select","set","elem","changed_arguments","triggerNative","eventName","el","dispatchEvent","Event","bubbles","document","createEvent","initEvent","fireEvent","createEventObject","eventType","trigger","expr","pseudos","icontains","obj","meta","$obj","haystack","toUpperCase","ibegins","aicontains","aibegins","element","e","stopPropagation","preventDefault","$element","$newElement","$button","$menu","$lis","title","attr","val","render","refresh","setStyle","selectAll","deselectAll","destroy","remove","show","hide","init","VERSION","noneSelectedText","noneResultsText","countSelectedText","numSelected","numTotal","maxOptionsText","numAll","numGroup","selectAllText","deselectAllText","doneButton","doneButtonText","multipleSeparator","styleBase","style","size","selectedTextFormat","width","container","hideDisabled","showSubtext","showIcon","showContent","dropupAuto","header","liveSearch","liveSearchPlaceholder","liveSearchNormalize","liveSearchStyle","actionsBox","iconBase","tickIcon","showTick","caret","maxOptions","mobile","selectOnTab","dropdownAlignRight","constructor","that","id","addClass","liObj","multiple","prop","autofocus","createView","after","appendTo","children","$menuInner","$searchbox","find","removeClass","click","focus","checkDisabled","clickListener","liveSearchListener","setWidth","selectPosition","on","hide.bs.dropdown","hidden.bs.dropdown","show.bs.dropdown","shown.bs.dropdown","hasAttribute","focus.bs.select","off","shown.bs.select","rendered.bs.select","validity","valid","setTimeout","createDropdown","inputGroup","parent","hasClass","searchbox","actionsbox","donebutton","drop","$drop","li","createLi","innerHTML","reloadLi","destroyLi","_li","optID","titleOption","createElement","liIndex","generateLI","content","classes","optgroup","generateA","inline","tokens","className","appendChild","createTextNode","insertBefore","firstChild","$opt","selectedIndex","selected","optionClass","cssText","subtext","icon","$parent","isOptgroup","tagName","isOptgroupDisabled","disabled","isDisabled","$options","filter","optGroupClass","label","labelSubtext","labelIcon","showDivider","previousElementSibling","$prev","prevAll","optGroupDistance","d","prevOption","eq","findLis","updateLi","notDisabled","setDisabled","parentNode","setSelected","togglePlaceholder","tabIndex","selectedItems","map","toArray","split","totalCount","not","tr8nText","trim","status","buttonClass","liHeight","sizeInfo","newElement","menu","menuInner","divider","a","cloneNode","actions","input","body","offsetHeight","headerHeight","searchHeight","actionsHeight","doneButtonHeight","dividerHeight","outerHeight","menuStyle","getComputedStyle","menuPadding","vert","parseInt","paddingTop","css","paddingBottom","borderTopWidth","borderBottomWidth","horiz","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","menuExtras","marginTop","marginBottom","marginLeft","marginRight","removeChild","setSize","menuHeight","menuWidth","getHeight","getWidth","selectOffsetTop","selectOffsetBot","selectOffsetLeft","selectOffsetRight","$window","window","selectHeight","selectWidth","offsetWidth","divHeight","getPos","containerPos","offset","$container","top","left","scrollTop","height","scrollLeft","getSize","minHeight","include","classList","contains","lis","getElementsByTagName","lisVisible","Array","optGroup","toggleClass","max-height","overflow","min-height","overflow-y","optIndex","slice","last","divLength","$selectClone","clone","$selectClone2","ulWidth","outerWidth","btnWidth","$bsContainer","actualHeight","getPlacement","append","detach","removeAttr","$document","keyCode","offsetTop","clickedIndex","prevValue","prevIndex","triggerChange","$option","state","$optgroup","maxOptionsGrp","blur","maxReached","maxReachedGrp","optgroupID","maxOptionsArr","maxTxt","maxTxtGrp","$notify","delay","fadeOut","currentTarget","target","change","$no_results","$searchBase","_searchStyle","$lisVisible","first","styles","begins","changeAll","lisVisLen","selectedOptions","origIndex","getAttribute","toggle","keydown","$items","next","prev","nextPrev","isActive","selector","keyCodeMap","32","48","49","50","51","52","53","54","55","56","57","59","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","96","97","98","99","100","101","102","103","104","105","nextAll","count","prevKey","keyIndex","toLowerCase","substring","before","removeData","old","Constructor","noConflict","$selectpicker"],"mappings":";;;;;;CAOC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,QAAQ,UAAW,SAAUE,GAC3B,MAAQH,GAAQG,KAEU,gBAAZC,SAIhBC,OAAOD,QAAUJ,EAAQM,QAAQ,WAEjCN,EAAQO,SAEVC,KAAM,SAAUD,IAElB,SAAWE,GACT,YA4MA,SAASC,GAAgBC,GACvB,GAAIC,KACDC,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,eAAgBC,GAAI,MACxBD,GAAI,UAAWC,GAAI,MACnBD,GAAI,UAAWC,GAAI,KAKtB,OAHAL,GAAEM,KAAKH,EAAO,WACZD,EAAOA,EAAKK,QAAQR,KAAKK,GAAIL,KAAKM,MAE7BH,EAIT,QAASM,GAAWC,GAClB,GAAIC,IACFC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAAS,MAAQC,OAAOC,KAAKT,GAAWU,KAAK,KAAO,IACpDC,EAAa,GAAIC,QAAOL,GACxBM,EAAgB,GAAID,QAAOL,EAAQ,KACnCO,EAAiB,MAARf,EAAe,GAAK,GAAKA,CACtC,OAAOY,GAAWI,KAAKD,GAAUA,EAAOjB,QAAQgB,EAAe,SAAUG,GACvE,MAAOhB,GAAUgB,KACdF,EA0gDP,QAASG,GAAOC,EAAQC,GAEtB,GA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1M,EAAE,iBAAiBM,KAAK,WACtB,GAAIme,GAAgBze,EAAED,KACtB4B,GAAOsC,KAAKwa,EAAeA,EAAcjc,aAG5C1C","file":"bootstrap-select.min.js"}
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/bootstrap-select.min.js b/javascript/bootstrap-select/js/bootstrap-select.min.js
new file mode 100755
index 0000000..6330b1d
--- /dev/null
+++ b/javascript/bootstrap-select/js/bootstrap-select.min.js
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){"use strict";function b(b){var c=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return a.each(c,function(){b=b.replace(this.re,this.ch)}),b}function c(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},c="(?:"+Object.keys(b).join("|")+")",d=new RegExp(c),e=new RegExp(c,"g"),f=null==a?"":""+a;return d.test(f)?f.replace(e,function(a){return b[a]}):f}function d(b,c){var d=arguments,e=b,f=c;[].shift.apply(d);var h,i=this.each(function(){var b=a(this);if(b.is("select")){var c=b.data("selectpicker"),i="object"==typeof e&&e;if(c){if(i)for(var j in i)i.hasOwnProperty(j)&&(c.options[j]=i[j])}else{var k=a.extend({},g.DEFAULTS,a.fn.selectpicker.defaults||{},b.data(),i);k.template=a.extend({},g.DEFAULTS.template,a.fn.selectpicker.defaults?a.fn.selectpicker.defaults.template:{},b.data().template,i.template),b.data("selectpicker",c=new g(this,k,f))}"string"==typeof e&&(h=c[e]instanceof Function?c[e].apply(c,d):c.options[e])}});return"undefined"!=typeof h?h:i}String.prototype.includes||!function(){var a={}.toString,b=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),c="".indexOf,d=function(b){if(null==this)throw new TypeError;var d=String(this);if(b&&"[object RegExp]"==a.call(b))throw new TypeError;var e=d.length,f=String(b),g=f.length,h=arguments.length>1?arguments[1]:void 0,i=h?Number(h):0;i!=i&&(i=0);var j=Math.min(Math.max(i,0),e);return g+j>e?!1:-1!=c.call(d,f,i)};b?b(String.prototype,"includes",{value:d,configurable:!0,writable:!0}):String.prototype.includes=d}(),String.prototype.startsWith||!function(){var a=function(){try{var a={},b=Object.defineProperty,c=b(a,a,a)&&b}catch(d){}return c}(),b={}.toString,c=function(a){if(null==this)throw new TypeError;var c=String(this);if(a&&"[object RegExp]"==b.call(a))throw new TypeError;var d=c.length,e=String(a),f=e.length,g=arguments.length>1?arguments[1]:void 0,h=g?Number(g):0;h!=h&&(h=0);var i=Math.min(Math.max(h,0),d);if(f+i>d)return!1;for(var j=-1;++j'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},g.prototype={constructor:g,init:function(){var b=this,c=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement).appendTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element.removeClass("bs-select-hidden"),this.options.dropdownAlignRight===!0&&this.$menu.addClass("dropdown-menu-right"),"undefined"!=typeof c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(a){b.$menuInner.attr("aria-expanded",!1),b.$element.trigger("hide.bs.select",a)},"hidden.bs.dropdown":function(a){b.$element.trigger("hidden.bs.select",a)},"show.bs.dropdown":function(a){b.$menuInner.attr("aria-expanded",!0),b.$element.trigger("show.bs.select",a)},"shown.bs.dropdown":function(a){b.$element.trigger("shown.bs.select",a)}}),b.$element[0].hasAttribute("required")&&this.$element.on("invalid",function(){b.$button.addClass("bs-invalid").focus(),b.$element.on({"focus.bs.select":function(){b.$button.focus(),b.$element.off("focus.bs.select")},"shown.bs.select":function(){b.$element.val(b.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){this.validity.valid&&b.$button.removeClass("bs-invalid"),b.$element.off("rendered.bs.select")}})}),setTimeout(function(){b.$element.trigger("loaded.bs.select")})},createDropdown:function(){var b=this.multiple||this.options.showTick?" show-tick":"",d=this.$element.parent().hasClass("input-group")?" input-group-btn":"",e=this.autofocus?" autofocus":"",f=this.options.header?''+this.options.header+"
":"",g=this.options.liveSearch?'':"",h=this.multiple&&this.options.actionsBox?' ":"",i=this.multiple&&this.options.doneButton?'":"",j='";return a(j)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find("ul")[0].innerHTML=b,a},reloadLi:function(){this.destroyLi();var a=this.createLi();this.$menuInner[0].innerHTML=a},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],f=0,g=document.createElement("option"),h=-1,i=function(a,b,c,d){return""+a+""},j=function(a,e,f,g){return''+a+''};if(this.options.title&&!this.multiple&&(h--,!this.$element.find(".bs-title-option").length)){var k=this.$element[0];g.className="bs-title-option",g.appendChild(document.createTextNode(this.options.title)),g.value="",k.insertBefore(g,k.firstChild);var l=a(k.options[k.selectedIndex]);void 0===l.attr("selected")&&void 0===this.$element.data("selected")&&(g.selected=!0)}return this.$element.find("option").each(function(b){var c=a(this);if(h++,!c.hasClass("bs-title-option")){var g=this.className||"",k=this.style.cssText,l=c.data("content")?c.data("content"):c.html(),m=c.data("tokens")?c.data("tokens"):null,n="undefined"!=typeof c.data("subtext")?''+c.data("subtext")+"":"",o="undefined"!=typeof c.data("icon")?' ':"",p=c.parent(),q="OPTGROUP"===p[0].tagName,r=q&&p[0].disabled,s=this.disabled||r;if(""!==o&&s&&(o=""+o+""),d.options.hideDisabled&&(s&&!q||r))return void h--;if(c.data("content")||(l=o+''+l+n+""),q&&c.data("divider")!==!0){if(d.options.hideDisabled&&s){if(void 0===p.data("allOptionsDisabled")){var t=p.children();p.data("allOptionsDisabled",t.filter(":disabled").length===t.length)}if(p.data("allOptionsDisabled"))return void h--}var u=" "+p[0].className||"";if(0===c.index()){f+=1;var v=p[0].label,w="undefined"!=typeof p.data("subtext")?''+p.data("subtext")+"":"",x=p.data("icon")?' ':"";v=x+''+v+w+"",0!==b&&e.length>0&&(h++,e.push(i("",null,"divider",f+"div"))),h++,e.push(i(v,null,"dropdown-header"+u,f))}if(d.options.hideDisabled&&s)return void h--;e.push(i(j(l,"opt "+g+u,k,m),b,"",f))}else if(c.data("divider")===!0)e.push(i("",b,"divider"));else if(c.data("hidden")===!0)e.push(i(j(l,g,k,m),b,"hidden is-hidden"));else{var y=this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName;if(!y&&d.options.hideDisabled)for(var z=a(this).prevAll(),A=0;AC;C++){var D=z[C];(D.disabled||a(D).data("hidden")===!0)&&B++}B===A&&(y=!0);break}y&&(h++,e.push(i("",null,"divider",f+"div"))),e.push(i(j(l,g,k,m),b))}d.liObj[b]=h}}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),e.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(b){var c,d=this;b!==!1&&this.$element.find("option").each(function(a){var b=d.findLis().eq(d.liObj[a]);d.setDisabled(a,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,b),d.setSelected(a,this.selected,b)}),this.togglePlaceholder(),this.tabIndex();var e=this.$element.find("option").map(function(){if(this.selected){if(d.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var b,c=a(this),e=c.data("icon")&&d.options.showIcon?' ':"";return b=d.options.showSubtext&&c.data("subtext")&&!d.multiple?' '+c.data("subtext")+"":"","undefined"!=typeof c.attr("title")?c.attr("title"):c.data("content")&&d.options.showContent?c.data("content"):e+c.html()+b}}).toArray(),f=this.multiple?e.join(this.options.multipleSeparator):e[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var g=this.options.selectedTextFormat.split(">");if(g.length>1&&e.length>g[1]||1==g.length&&e.length>=2){c=this.options.hideDisabled?", [disabled]":"";var h=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+c).length,i="function"==typeof this.options.countSelectedText?this.options.countSelectedText(e.length,h):this.options.countSelectedText;f=i.replace("{0}",e.length.toString()).replace("{1}",h.toString())}}void 0==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(f=this.options.title),f||(f="undefined"!=typeof this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(f.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(f),this.$element.trigger("rendered.bs.select")},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(b){if(b||this.options.size!==!1&&!this.sizeInfo){var c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("ul"),f=document.createElement("li"),g=document.createElement("li"),h=document.createElement("a"),i=document.createElement("span"),j=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(!0):null,k=this.options.liveSearch?document.createElement("div"):null,l=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(i.className="text",c.className=this.$menu[0].parentNode.className+" open",d.className="dropdown-menu open",e.className="dropdown-menu inner",f.className="divider",i.appendChild(document.createTextNode("Inner text")),h.appendChild(i),g.appendChild(h),e.appendChild(g),e.appendChild(f),j&&d.appendChild(j),k){var n=document.createElement("span");k.className="bs-searchbox",n.className="form-control",k.appendChild(n),d.appendChild(k)}l&&d.appendChild(l),d.appendChild(e),m&&d.appendChild(m),c.appendChild(d),document.body.appendChild(c);var o=h.offsetHeight,p=j?j.offsetHeight:0,q=k?k.offsetHeight:0,r=l?l.offsetHeight:0,s=m?m.offsetHeight:0,t=a(f).outerHeight(!0),u="function"==typeof getComputedStyle?getComputedStyle(d):!1,v=u?null:a(d),w={vert:parseInt(u?u.paddingTop:v.css("paddingTop"))+parseInt(u?u.paddingBottom:v.css("paddingBottom"))+parseInt(u?u.borderTopWidth:v.css("borderTopWidth"))+parseInt(u?u.borderBottomWidth:v.css("borderBottomWidth")),horiz:parseInt(u?u.paddingLeft:v.css("paddingLeft"))+parseInt(u?u.paddingRight:v.css("paddingRight"))+parseInt(u?u.borderLeftWidth:v.css("borderLeftWidth"))+parseInt(u?u.borderRightWidth:v.css("borderRightWidth"))},x={vert:w.vert+parseInt(u?u.marginTop:v.css("marginTop"))+parseInt(u?u.marginBottom:v.css("marginBottom"))+2,horiz:w.horiz+parseInt(u?u.marginLeft:v.css("marginLeft"))+parseInt(u?u.marginRight:v.css("marginRight"))+2};document.body.removeChild(c),this.sizeInfo={liHeight:o,headerHeight:p,searchHeight:q,actionsHeight:r,doneButtonHeight:s,dividerHeight:t,menuPadding:w,menuExtras:x}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),this.options.size!==!1){var b,c,d,e,f,g,h,i,j=this,k=this.$menu,l=this.$menuInner,m=a(window),n=this.$newElement[0].offsetHeight,o=this.$newElement[0].offsetWidth,p=this.sizeInfo.liHeight,q=this.sizeInfo.headerHeight,r=this.sizeInfo.searchHeight,s=this.sizeInfo.actionsHeight,t=this.sizeInfo.doneButtonHeight,u=this.sizeInfo.dividerHeight,v=this.sizeInfo.menuPadding,w=this.sizeInfo.menuExtras,x=this.options.hideDisabled?".disabled":"",y=function(){var b,c=j.$newElement.offset(),d=a(j.options.container);j.options.container&&!d.is("body")?(b=d.offset(),b.top+=parseInt(d.css("borderTopWidth")),b.left+=parseInt(d.css("borderLeftWidth"))):b={top:0,left:0},f=c.top-b.top-m.scrollTop(),g=m.height()-f-n-b.top,h=c.left-b.left-m.scrollLeft(),i=m.width()-h-o-b.left};if(y(),"auto"===this.options.size){var z=function(){var m,n=function(b,c){return function(d){return c?d.classList?d.classList.contains(b):a(d).hasClass(b):!(d.classList?d.classList.contains(b):a(d).hasClass(b))}},u=j.$menuInner[0].getElementsByTagName("li"),x=Array.prototype.filter?Array.prototype.filter.call(u,n("hidden",!1)):j.$lis.not(".hidden"),z=Array.prototype.filter?Array.prototype.filter.call(x,n("dropdown-header",!0)):x.filter(".dropdown-header");y(),b=g-w.vert,c=i-w.horiz,j.options.container?(k.data("height")||k.data("height",k.height()),d=k.data("height"),k.data("width")||k.data("width",k.width()),e=k.data("width")):(d=k.height(),e=k.width()),j.options.dropupAuto&&j.$newElement.toggleClass("dropup",f>g&&b-w.verti&&c-w.horiz3?3*p+w.vert-2:0,k.css({"max-height":b+"px",overflow:"hidden","min-height":m+q+r+s+t+"px"}),l.css({"max-height":b-q-r-s-t-v.vert+"px","overflow-y":"auto","min-height":Math.max(m-v.vert,0)+"px"})};z(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",z),m.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",z)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(x).length>this.options.size){var A=this.$lis.not(".divider").not(x).children().slice(0,this.options.size).last().parent().index(),B=this.$lis.slice(0,A+1).filter(".divider").length;b=p*this.options.size+B*u+v.vert,j.options.container?(k.data("height")||k.data("height",k.height()),d=k.data("height")):d=k.height(),j.options.dropupAuto&&this.$newElement.toggleClass("dropup",f>g&&b-w.vert');var b,c,d,e=this,f=a(this.options.container),g=function(a){e.$bsContainer.addClass(a.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),f.is("body")?c={top:0,left:0}:(c=f.offset(),c.top+=parseInt(f.css("borderTopWidth"))-f.scrollTop(),c.left+=parseInt(f.css("borderLeftWidth"))-f.scrollLeft()),d=a.hasClass("dropup")?0:a[0].offsetHeight,e.$bsContainer.css({top:b.top-c.top+d,left:b.left-c.left,width:a[0].offsetWidth})};this.$button.on("click",function(){var b=a(this);e.isDisabled()||(g(e.$newElement),e.$bsContainer.appendTo(e.options.container).toggleClass("open",!b.hasClass("open")).append(e.$menu))}),a(window).on("resize scroll",function(){g(e.$newElement)}),this.$element.on("hide.bs.select",function(){e.$menu.data("height",e.$menu.height()),e.$bsContainer.detach()})},setSelected:function(a,b,c){c||(this.togglePlaceholder(),c=this.findLis().eq(this.liObj[a])),c.toggleClass("selected",b).find("a").attr("aria-selected",b)},setDisabled:function(a,b,c){c||(c=this.findLis().eq(this.liObj[a])),b?c.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1).attr("aria-disabled",!0):c.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0).attr("aria-disabled",!1)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var a=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click(function(){return!a.isDisabled()})},togglePlaceholder:function(){var a=this.$element.val();this.$button.toggleClass("bs-placeholder",null===a||""===a)},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var b=this,c=a(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),c.data("spaceSelect",!1),this.$button.on("keyup",function(a){/(32)/.test(a.keyCode.toString(10))&&c.data("spaceSelect")&&(a.preventDefault(),c.data("spaceSelect",!1))}),this.$button.on("click",function(){b.setSize()}),this.$element.on("shown.bs.select",function(){if(b.options.liveSearch||b.multiple){if(!b.multiple){var a=b.liObj[b.$element[0].selectedIndex];if("number"!=typeof a||b.options.size===!1)return;var c=b.$lis.eq(a)[0].offsetTop-b.$menuInner[0].offsetTop;c=c-b.$menuInner[0].offsetHeight/2+b.sizeInfo.liHeight/2,b.$menuInner[0].scrollTop=c}}else b.$menuInner.find(".selected a").focus()}),this.$menuInner.on("click","li a",function(c){var d=a(this),e=d.parent().data("originalIndex"),g=b.$element.val(),h=b.$element.prop("selectedIndex"),i=!0;if(b.multiple&&1!==b.options.maxOptions&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!d.parent().hasClass("disabled")){var j=b.$element.find("option"),k=j.eq(e),l=k.prop("selected"),m=k.parent("optgroup"),n=b.options.maxOptions,o=m.data("maxOptions")||!1;if(b.multiple){if(k.prop("selected",!l),b.setSelected(e,!l),d.blur(),n!==!1||o!==!1){var p=n');t[2]&&(u=u.replace("{var}",t[2][n>1?0:1]),v=v.replace("{var}",t[2][o>1?0:1])),k.prop("selected",!1),b.$menu.append(w),n&&p&&(w.append(a(""+u+"
")),i=!1,b.$element.trigger("maxReached.bs.select")),o&&q&&(w.append(a(""+v+"
")),i=!1,b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(e,!1)},10),w.delay(750).fadeOut(300,function(){a(this).remove()})}}}else j.prop("selected",!1),k.prop("selected",!0),b.$menuInner.find(".selected").removeClass("selected").find("a").attr("aria-selected",!1),b.setSelected(e,!0);!b.multiple||b.multiple&&1===b.options.maxOptions?b.$button.focus():b.options.liveSearch&&b.$searchbox.focus(),i&&(g!=b.$element.val()&&b.multiple||h!=b.$element.prop("selectedIndex")&&!b.multiple)&&(f=[e,k.prop("selected"),l],b.$element.triggerNative("change"))}}),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(c){c.currentTarget==this&&(c.preventDefault(),c.stopPropagation(),b.options.liveSearch&&!a(c.target).hasClass("close")?b.$searchbox.focus():b.$button.focus())}),this.$menuInner.on("click",".divider, .dropdown-header",function(a){a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus()}),this.$menu.on("click",".popover-title .close",function(){b.$button.click()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).hasClass("bs-select-all")?b.selectAll():b.deselectAll()}),this.$element.change(function(){b.render(!1),b.$element.trigger("changed.bs.select",f),f=null})},liveSearchListener:function(){var d=this,e=a('');this.$button.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){d.$menuInner.find(".active").removeClass("active"),d.$searchbox.val()&&(d.$searchbox.val(""),d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove()),d.multiple||d.$menuInner.find(".selected").addClass("active"),setTimeout(function(){d.$searchbox.focus()},10)}),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(a){a.stopPropagation()}),this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){var f=d.$lis.not(".is-hidden").removeClass("hidden").children("a");f=d.options.liveSearchNormalize?f.not(":a"+d._searchStyle()+'("'+b(d.$searchbox.val())+'")'):f.not(":"+d._searchStyle()+'("'+d.$searchbox.val()+'")'),f.parent().addClass("hidden"),d.$lis.filter(".dropdown-header").each(function(){var b=a(this),c=b.data("optgroup");0===d.$lis.filter("[data-optgroup="+c+"]").not(b).not(".hidden").length&&(b.addClass("hidden"),d.$lis.filter("[data-optgroup="+c+"div]").addClass("hidden"))});var g=d.$lis.not(".hidden");g.each(function(b){var c=a(this);c.hasClass("divider")&&(c.index()===g.first().index()||c.index()===g.last().index()||g.eq(b+1).hasClass("divider"))&&c.addClass("hidden")}),d.$lis.not(".hidden, .no-results").length?e.parent().length&&e.remove():(e.parent().length&&e.remove(),e.html(d.options.noneResultsText.replace("{0}",'"'+c(d.$searchbox.val())+'"')).show(),d.$menuInner.append(e))}else d.$lis.not(".is-hidden").removeClass("hidden"),e.parent().length&&e.remove();d.$lis.filter(".active").removeClass("active"),d.$searchbox.val()&&d.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),a(this).focus()})},_searchStyle:function(){var a={begins:"ibegins",startsWith:"ibegins"};return a[this.options.liveSearchStyle]||"icontains"},val:function(a){return"undefined"!=typeof a?(this.$element.val(a),this.render(),this.$element):this.$element.val()},changeAll:function(b){if(this.multiple){"undefined"==typeof b&&(b=!0),this.findLis();var c=this.$element.find("option"),d=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden"),e=d.length,f=[];if(b){if(d.filter(".selected").length===d.length)return}else if(0===d.filter(".selected").length)return;d.toggleClass("selected",b);for(var g=0;e>g;g++){var h=d[g].getAttribute("data-original-index");f[f.length]=c.eq(h)[0]}a(f).prop("selected",b),this.render(!1),this.togglePlaceholder(),this.$element.triggerNative("change")}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(a){a=a||window.event,a&&a.stopPropagation(),this.$button.trigger("click")},keydown:function(c){var d,e,f,g,h,i,j,k,l,m=a(this),n=m.is("input")?m.parent().parent():m.parent(),o=n.data("this"),p=":not(.disabled, .hidden, .dropdown-header, .divider)",q={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(o.options.liveSearch&&(n=m.parent().parent()),o.options.container&&(n=o.$menu),d=a('[role="listbox"] li',n),l=o.$newElement.hasClass("open"),!l&&(c.keyCode>=48&&c.keyCode<=57||c.keyCode>=96&&c.keyCode<=105||c.keyCode>=65&&c.keyCode<=90))return o.options.container?o.$button.trigger("click"):(o.setSize(),o.$menu.parent().addClass("open"),l=!0),void o.$searchbox.focus();if(o.options.liveSearch&&(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&(c.preventDefault(),c.stopPropagation(),o.$button.click().focus()),d=a('[role="listbox"] li'+p,n),m.val()||/(38|40)/.test(c.keyCode.toString(10))||0===d.filter(".active").length&&(d=o.$menuInner.find("li"),d=o.options.liveSearchNormalize?d.filter(":a"+o._searchStyle()+"("+b(q[c.keyCode])+")"):d.filter(":"+o._searchStyle()+"("+q[c.keyCode]+")"))),d.length){if(/(38|40)/.test(c.keyCode.toString(10)))e=d.index(d.find("a").filter(":focus").parent()),g=d.filter(p).first().index(),h=d.filter(p).last().index(),f=d.eq(e).nextAll(p).eq(0).index(),i=d.eq(e).prevAll(p).eq(0).index(),j=d.eq(f).prevAll(p).eq(0).index(),o.options.liveSearch&&(d.each(function(b){a(this).hasClass("disabled")||a(this).data("index",b)}),e=d.index(d.filter(".active")),g=d.first().data("index"),h=d.last().data("index"),f=d.eq(e).nextAll().eq(0).data("index"),i=d.eq(e).prevAll().eq(0).data("index"),j=d.eq(f).prevAll().eq(0).data("index")),k=m.data("prevIndex"),38==c.keyCode?(o.options.liveSearch&&e--,e!=j&&e>i&&(e=i),g>e&&(e=g),e==k&&(e=h)):40==c.keyCode&&(o.options.liveSearch&&e++,-1==e&&(e=0),e!=j&&f>e&&(e=f),e>h&&(e=h),e==k&&(e=g)),m.data("prevIndex",e),o.options.liveSearch?(c.preventDefault(),m.hasClass("dropdown-toggle")||(d.removeClass("active").eq(e).addClass("active").children("a").focus(),m.focus())):d.eq(e).children("a").focus();else if(!m.is("input")){var r,s,t=[];d.each(function(){a(this).hasClass("disabled")||a.trim(a(this).children("a").text().toLowerCase()).substring(0,1)==q[c.keyCode]&&t.push(a(this).index())}),r=a(document).data("keycount"),r++,a(document).data("keycount",r),s=a.trim(a(":focus").text().toLowerCase()).substring(0,1),s!=q[c.keyCode]?(r=1,a(document).data("keycount",r)):r>=t.length&&(a(document).data("keycount",0),r>t.length&&(r=1)),d.eq(t[r-1]).children("a").focus()}if((/(13|32)/.test(c.keyCode.toString(10))||/(^9$)/.test(c.keyCode.toString(10))&&o.options.selectOnTab)&&l){
+if(/(32)/.test(c.keyCode.toString(10))||c.preventDefault(),o.options.liveSearch)/(32)/.test(c.keyCode.toString(10))||(o.$menuInner.find(".active a").click(),m.focus());else{var u=a(":focus");u.click(),u.focus(),c.preventDefault(),a(document).data("spaceSelect",!0)}a(document).data("keycount",0)}(/(^9$|27)/.test(c.keyCode.toString(10))&&l&&(o.multiple||o.options.liveSearch)||/(27)/.test(c.keyCode.toString(10))&&!l)&&(o.$menu.parent().removeClass("open"),o.options.container&&o.$newElement.removeClass("open"),o.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};var h=a.fn.selectpicker;a.fn.selectpicker=d,a.fn.selectpicker.Constructor=g,a.fn.selectpicker.noConflict=function(){return a.fn.selectpicker=h,this},a(document).data("keycount",0).on("keydown.bs.select",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',g.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="listbox"], .bs-searchbox input',function(a){a.stopPropagation()}),a(window).on("load.bs.select.data-api",function(){a(".selectpicker").each(function(){var b=a(this);d.call(b,b.data())})})}(a)});
+//# sourceMappingURL=bootstrap-select.js.map
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ar_AR.js b/javascript/bootstrap-select/js/i18n/defaults-ar_AR.js
new file mode 100755
index 0000000..59ff40d
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ar_AR.js
@@ -0,0 +1,49 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+/*!
+ * Translated default messages for bootstrap-select.
+ * Locale: AR (Arabic)
+ * Author: Yasser Lotfy
+ */
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'لم يتم إختيار شئ',
+ noneResultsText: 'لا توجد نتائج مطابقة لـ {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} خيار تم إختياره" : "{0} خيارات تمت إختيارها";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'تخطى الحد المسموح ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح ({n} خيارات بحد أقصى)',
+ (numGroup == 1) ? 'تخطى الحد المسموح للمجموعة ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح للمجموعة ({n} خيارات بحد أقصى)'
+ ];
+ },
+ selectAllText: 'إختيار الجميع',
+ deselectAllText: 'إلغاء إختيار الجميع',
+ multipleSeparator: '، '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ar_AR.min.js b/javascript/bootstrap-select/js/i18n/defaults-ar_AR.min.js
new file mode 100755
index 0000000..88a68f9
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ar_AR.min.js
@@ -0,0 +1,12 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){/*!
+ * Translated default messages for bootstrap-select.
+ * Locale: AR (Arabic)
+ * Author: Yasser Lotfy
+ */
+!function(a){a.fn.selectpicker.defaults={noneSelectedText:"لم يتم إختيار شئ",noneResultsText:"لا توجد نتائج مطابقة لـ {0}",countSelectedText:function(a,b){return 1==a?"{0} خيار تم إختياره":"{0} خيارات تمت إختيارها"},maxOptionsText:function(a,b){return[1==a?"تخطى الحد المسموح ({n} خيار بحد أقصى)":"تخطى الحد المسموح ({n} خيارات بحد أقصى)",1==b?"تخطى الحد المسموح للمجموعة ({n} خيار بحد أقصى)":"تخطى الحد المسموح للمجموعة ({n} خيارات بحد أقصى)"]},selectAllText:"إختيار الجميع",deselectAllText:"إلغاء إختيار الجميع",multipleSeparator:"، "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-bg_BG.js b/javascript/bootstrap-select/js/i18n/defaults-bg_BG.js
new file mode 100755
index 0000000..f2b46f7
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-bg_BG.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Нищо избрано',
+ noneResultsText: 'Няма резултат за {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} избран елемент" : "{0} избрани елемента";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Лимита е достигнат ({n} елемент максимум)' : 'Лимита е достигнат ({n} елемента максимум)',
+ (numGroup == 1) ? 'Груповия лимит е достигнат ({n} елемент максимум)' : 'Груповия лимит е достигнат ({n} елемента максимум)'
+ ];
+ },
+ selectAllText: 'Избери всички',
+ deselectAllText: 'Размаркирай всички',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-bg_BG.min.js b/javascript/bootstrap-select/js/i18n/defaults-bg_BG.min.js
new file mode 100755
index 0000000..f31588b
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-bg_BG.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нищо избрано",noneResultsText:"Няма резултат за {0}",countSelectedText:function(a,b){return 1==a?"{0} избран елемент":"{0} избрани елемента"},maxOptionsText:function(a,b){return[1==a?"Лимита е достигнат ({n} елемент максимум)":"Лимита е достигнат ({n} елемента максимум)",1==b?"Груповия лимит е достигнат ({n} елемент максимум)":"Груповия лимит е достигнат ({n} елемента максимум)"]},selectAllText:"Избери всички",deselectAllText:"Размаркирай всички",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-cro_CRO.js b/javascript/bootstrap-select/js/i18n/defaults-cro_CRO.js
new file mode 100755
index 0000000..dbdb95f
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-cro_CRO.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Odaberite stavku',
+ noneResultsText: 'Nema rezultata pretrage {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} stavka selektirana" : "{0} stavke selektirane";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit je postignut ({n} stvar maximalno)' : 'Limit je postignut ({n} stavke maksimalno)',
+ (numGroup == 1) ? 'Grupni limit je postignut ({n} stvar maksimalno)' : 'Grupni limit je postignut ({n} stavke maksimalno)'
+ ];
+ },
+ selectAllText: 'Selektiraj sve',
+ deselectAllText: 'Deselektiraj sve',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-cro_CRO.min.js b/javascript/bootstrap-select/js/i18n/defaults-cro_CRO.min.js
new file mode 100755
index 0000000..6f554ae
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-cro_CRO.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Odaberite stavku",noneResultsText:"Nema rezultata pretrage {0}",countSelectedText:function(a,b){return 1==a?"{0} stavka selektirana":"{0} stavke selektirane"},maxOptionsText:function(a,b){return[1==a?"Limit je postignut ({n} stvar maximalno)":"Limit je postignut ({n} stavke maksimalno)",1==b?"Grupni limit je postignut ({n} stvar maksimalno)":"Grupni limit je postignut ({n} stavke maksimalno)"]},selectAllText:"Selektiraj sve",deselectAllText:"Deselektiraj sve",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-cs_CZ.js b/javascript/bootstrap-select/js/i18n/defaults-cs_CZ.js
new file mode 100755
index 0000000..5c45198
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-cs_CZ.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nic není vybráno',
+ noneResultsText: 'Žádné výsledky {0}',
+ countSelectedText: 'Označeno {0} z {1}',
+ maxOptionsText: ['Limit překročen ({n} {var} max)', 'Limit skupiny překročen ({n} {var} max)', ['položek', 'položka']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-cs_CZ.min.js b/javascript/bootstrap-select/js/i18n/defaults-cs_CZ.min.js
new file mode 100755
index 0000000..9a38210
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-cs_CZ.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic není vybráno",noneResultsText:"Žádné výsledky {0}",countSelectedText:"Označeno {0} z {1}",maxOptionsText:["Limit překročen ({n} {var} max)","Limit skupiny překročen ({n} {var} max)",["položek","položka"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-da_DK.js b/javascript/bootstrap-select/js/i18n/defaults-da_DK.js
new file mode 100755
index 0000000..8fc1928
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-da_DK.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Intet valgt',
+ noneResultsText: 'Ingen resultater fundet {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} valgt" : "{0} valgt";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Begrænsning nået (max {n} valgt)' : 'Begrænsning nået (max {n} valgte)',
+ (numGroup == 1) ? 'Gruppe-begrænsning nået (max {n} valgt)' : 'Gruppe-begrænsning nået (max {n} valgte)'
+ ];
+ },
+ selectAllText: 'Markér alle',
+ deselectAllText: 'Afmarkér alle',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-da_DK.min.js b/javascript/bootstrap-select/js/i18n/defaults-da_DK.min.js
new file mode 100755
index 0000000..9b80242
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-da_DK.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Intet valgt",noneResultsText:"Ingen resultater fundet {0}",countSelectedText:function(a,b){return"{0} valgt"},maxOptionsText:function(a,b){return[1==a?"Begrænsning nået (max {n} valgt)":"Begrænsning nået (max {n} valgte)",1==b?"Gruppe-begrænsning nået (max {n} valgt)":"Gruppe-begrænsning nået (max {n} valgte)"]},selectAllText:"Markér alle",deselectAllText:"Afmarkér alle",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-de_DE.js b/javascript/bootstrap-select/js/i18n/defaults-de_DE.js
new file mode 100755
index 0000000..237d5b2
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-de_DE.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Bitte wählen...',
+ noneResultsText: 'Keine Ergebnisse für {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} Element ausgewählt" : "{0} Elemente ausgewählt";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit erreicht ({n} Element max.)' : 'Limit erreicht ({n} Elemente max.)',
+ (numGroup == 1) ? 'Gruppen-Limit erreicht ({n} Element max.)' : 'Gruppen-Limit erreicht ({n} Elemente max.)'
+ ];
+ },
+ selectAllText: 'Alles auswählen',
+ deselectAllText: 'Nichts auswählen',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-de_DE.min.js b/javascript/bootstrap-select/js/i18n/defaults-de_DE.min.js
new file mode 100755
index 0000000..dce1a26
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-de_DE.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Bitte wählen...",noneResultsText:"Keine Ergebnisse für {0}",countSelectedText:function(a,b){return 1==a?"{0} Element ausgewählt":"{0} Elemente ausgewählt"},maxOptionsText:function(a,b){return[1==a?"Limit erreicht ({n} Element max.)":"Limit erreicht ({n} Elemente max.)",1==b?"Gruppen-Limit erreicht ({n} Element max.)":"Gruppen-Limit erreicht ({n} Elemente max.)"]},selectAllText:"Alles auswählen",deselectAllText:"Nichts auswählen",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-en_US.js b/javascript/bootstrap-select/js/i18n/defaults-en_US.js
new file mode 100755
index 0000000..8c349c7
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-en_US.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nothing selected',
+ noneResultsText: 'No results match {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
+ (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
+ ];
+ },
+ selectAllText: 'Select All',
+ deselectAllText: 'Deselect All',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-en_US.min.js b/javascript/bootstrap-select/js/i18n/defaults-en_US.min.js
new file mode 100755
index 0000000..4eb020e
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-en_US.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nothing selected",noneResultsText:"No results match {0}",countSelectedText:function(a,b){return 1==a?"{0} item selected":"{0} items selected"},maxOptionsText:function(a,b){return[1==a?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==b?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-es_CL.js b/javascript/bootstrap-select/js/i18n/defaults-es_CL.js
new file mode 100755
index 0000000..8a832c5
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-es_CL.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'No hay selección',
+ noneResultsText: 'No hay resultados {0}',
+ countSelectedText: 'Seleccionados {0} de {1}',
+ maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-es_CL.min.js b/javascript/bootstrap-select/js/i18n/defaults-es_CL.min.js
new file mode 100755
index 0000000..241c23e
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-es_CL.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"No hay selección",noneResultsText:"No hay resultados {0}",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-eu.js b/javascript/bootstrap-select/js/i18n/defaults-eu.js
new file mode 100755
index 0000000..8ef5297
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-eu.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Hautapenik ez',
+ noneResultsText: 'Emaitzarik ez {0}',
+ countSelectedText: '{1}(e)tik {0} hautatuta',
+ maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu', 'elementu']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-eu.min.js b/javascript/bootstrap-select/js/i18n/defaults-eu.min.js
new file mode 100755
index 0000000..991a5d8
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-eu.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hautapenik ez",noneResultsText:"Emaitzarik ez {0}",countSelectedText:"{1}(e)tik {0} hautatuta",maxOptionsText:["Mugara iritsita ({n} {var} gehienez)","Taldearen mugara iritsita ({n} {var} gehienez)",["elementu","elementu"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-fa_IR.js b/javascript/bootstrap-select/js/i18n/defaults-fa_IR.js
new file mode 100755
index 0000000..2277669
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-fa_IR.js
@@ -0,0 +1,37 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'چیزی انتخاب نشده است',
+ noneResultsText: 'هیج مشابهی برای {0} پیدا نشد',
+ countSelectedText: "{0} از {1} مورد انتخاب شده",
+ maxOptionsText: ['بیشتر ممکن نیست {حداکثر {n} عدد}', 'بیشتر ممکن نیست {حداکثر {n} عدد}'],
+ selectAllText: 'انتخاب همه',
+ deselectAllText: 'انتخاب هیچ کدام',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-fa_IR.min.js b/javascript/bootstrap-select/js/i18n/defaults-fa_IR.min.js
new file mode 100755
index 0000000..14ca24f
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-fa_IR.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"چیزی انتخاب نشده است",noneResultsText:"هیج مشابهی برای {0} پیدا نشد",countSelectedText:"{0} از {1} مورد انتخاب شده",maxOptionsText:["بیشتر ممکن نیست {حداکثر {n} عدد}","بیشتر ممکن نیست {حداکثر {n} عدد}"],selectAllText:"انتخاب همه",deselectAllText:"انتخاب هیچ کدام",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-fi_FI.js b/javascript/bootstrap-select/js/i18n/defaults-fi_FI.js
new file mode 100755
index 0000000..6019dc6
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-fi_FI.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Ei valintoja',
+ noneResultsText: 'Ei hakutuloksia {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} valittu" : "{0} valitut";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Valintojen maksimimäärä ({n} saavutettu)' : 'Valintojen maksimimäärä ({n} saavutettu)',
+ (numGroup == 1) ? 'Ryhmän maksimimäärä ({n} saavutettu)' : 'Ryhmän maksimimäärä ({n} saavutettu)'
+ ];
+ },
+ selectAllText: 'Valitse kaikki',
+ deselectAllText: 'Poista kaikki',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-fi_FI.min.js b/javascript/bootstrap-select/js/i18n/defaults-fi_FI.min.js
new file mode 100755
index 0000000..793f175
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-fi_FI.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ei valintoja",noneResultsText:"Ei hakutuloksia {0}",countSelectedText:function(a,b){return 1==a?"{0} valittu":"{0} valitut"},maxOptionsText:function(a,b){return["Valintojen maksimimäärä ({n} saavutettu)","Ryhmän maksimimäärä ({n} saavutettu)"]},selectAllText:"Valitse kaikki",deselectAllText:"Poista kaikki",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-fr_FR.js b/javascript/bootstrap-select/js/i18n/defaults-fr_FR.js
new file mode 100755
index 0000000..0b7b904
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-fr_FR.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Aucune sélection',
+ noneResultsText: 'Aucun résultat pour {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected > 1) ? "{0} éléments sélectionnés" : "{0} élément sélectionné";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)',
+ (numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)'
+ ];
+ },
+ multipleSeparator: ', ',
+ selectAllText: 'Tout Sélectionner',
+ deselectAllText: 'Tout Dé-selectionner',
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-fr_FR.min.js b/javascript/bootstrap-select/js/i18n/defaults-fr_FR.min.js
new file mode 100755
index 0000000..911d48f
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-fr_FR.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Aucune sélection",noneResultsText:"Aucun résultat pour {0}",countSelectedText:function(a,b){return a>1?"{0} éléments sélectionnés":"{0} élément sélectionné"},maxOptionsText:function(a,b){return[a>1?"Limite atteinte ({n} éléments max)":"Limite atteinte ({n} élément max)",b>1?"Limite du groupe atteinte ({n} éléments max)":"Limite du groupe atteinte ({n} élément max)"]},multipleSeparator:", ",selectAllText:"Tout Sélectionner",deselectAllText:"Tout Dé-selectionner"}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-hu_HU.js b/javascript/bootstrap-select/js/i18n/defaults-hu_HU.js
new file mode 100755
index 0000000..8e0fffc
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-hu_HU.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Válasszon!',
+ noneResultsText: 'Nincs találat {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return '{0} elem kiválasztva';
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Legfeljebb {n} elem választható',
+ 'A csoportban legfeljebb {n} elem választható'
+ ];
+ },
+ selectAllText: 'Mind',
+ deselectAllText: 'Egyik sem',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-hu_HU.min.js b/javascript/bootstrap-select/js/i18n/defaults-hu_HU.min.js
new file mode 100755
index 0000000..8716a48
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-hu_HU.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Válasszon!",noneResultsText:"Nincs találat {0}",countSelectedText:function(a,b){return"{0} elem kiválasztva"},maxOptionsText:function(a,b){return["Legfeljebb {n} elem választható","A csoportban legfeljebb {n} elem választható"]},selectAllText:"Mind",deselectAllText:"Egyik sem",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-id_ID.js b/javascript/bootstrap-select/js/i18n/defaults-id_ID.js
new file mode 100755
index 0000000..08e3727
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-id_ID.js
@@ -0,0 +1,37 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Tidak ada yang dipilih',
+ noneResultsText: 'Tidak ada yang cocok {0}',
+ countSelectedText: '{0} terpilih',
+ maxOptionsText: ['Mencapai batas (maksimum {n})', 'Mencapai batas grup (maksimum {n})'],
+ selectAllText: 'Pilih Semua',
+ deselectAllText: 'Hapus Semua',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-id_ID.min.js b/javascript/bootstrap-select/js/i18n/defaults-id_ID.min.js
new file mode 100755
index 0000000..7442a8b
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-id_ID.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Tidak ada yang dipilih",noneResultsText:"Tidak ada yang cocok {0}",countSelectedText:"{0} terpilih",maxOptionsText:["Mencapai batas (maksimum {n})","Mencapai batas grup (maksimum {n})"],selectAllText:"Pilih Semua",deselectAllText:"Hapus Semua",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-it_IT.js b/javascript/bootstrap-select/js/i18n/defaults-it_IT.js
new file mode 100755
index 0000000..a248da6
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-it_IT.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nessuna selezione',
+ noneResultsText: 'Nessun risultato per {0}',
+ countSelectedText: 'Selezionati {0} di {1}',
+ maxOptionsText: ['Limite raggiunto ({n} {var} max)', 'Limite del gruppo raggiunto ({n} {var} max)', ['elementi', 'elemento']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-it_IT.min.js b/javascript/bootstrap-select/js/i18n/defaults-it_IT.min.js
new file mode 100755
index 0000000..d6173e1
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-it_IT.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nessuna selezione",noneResultsText:"Nessun risultato per {0}",countSelectedText:"Selezionati {0} di {1}",maxOptionsText:["Limite raggiunto ({n} {var} max)","Limite del gruppo raggiunto ({n} {var} max)",["elementi","elemento"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ko_KR.js b/javascript/bootstrap-select/js/i18n/defaults-ko_KR.js
new file mode 100755
index 0000000..88262c1
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ko_KR.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '항목을 선택해주세요',
+ noneResultsText: '{0} 검색 결과가 없습니다',
+ countSelectedText: function (numSelected, numTotal) {
+ return "{0}개를 선택하였습니다";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ '{n}개까지 선택 가능합니다',
+ '해당 그룹은 {n}개까지 선택 가능합니다'
+ ];
+ },
+ selectAllText: '전체선택',
+ deselectAllText: '전체해제',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ko_KR.min.js b/javascript/bootstrap-select/js/i18n/defaults-ko_KR.min.js
new file mode 100755
index 0000000..13f7713
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ko_KR.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"항목을 선택해주세요",noneResultsText:"{0} 검색 결과가 없습니다",countSelectedText:function(a,b){return"{0}개를 선택하였습니다"},maxOptionsText:function(a,b){return["{n}개까지 선택 가능합니다","해당 그룹은 {n}개까지 선택 가능합니다"]},selectAllText:"전체선택",deselectAllText:"전체해제",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-lt_LT.js b/javascript/bootstrap-select/js/i18n/defaults-lt_LT.js
new file mode 100755
index 0000000..75e4f7f
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-lt_LT.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Niekas nepasirinkta',
+ noneResultsText: 'Niekas nesutapo su {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} elementas pasirinktas" : "{0} elementai(-ų) pasirinkta";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Pasiekta riba ({n} elementas daugiausiai)' : 'Riba pasiekta ({n} elementai(-ų) daugiausiai)',
+ (numGroup == 1) ? 'Grupės riba pasiekta ({n} elementas daugiausiai)' : 'Grupės riba pasiekta ({n} elementai(-ų) daugiausiai)'
+ ];
+ },
+ selectAllText: 'Pasirinkti visus',
+ deselectAllText: 'Atmesti visus',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-lt_LT.min.js b/javascript/bootstrap-select/js/i18n/defaults-lt_LT.min.js
new file mode 100755
index 0000000..b19b42a
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-lt_LT.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Niekas nepasirinkta",noneResultsText:"Niekas nesutapo su {0}",countSelectedText:function(a,b){return 1==a?"{0} elementas pasirinktas":"{0} elementai(-ų) pasirinkta"},maxOptionsText:function(a,b){return[1==a?"Pasiekta riba ({n} elementas daugiausiai)":"Riba pasiekta ({n} elementai(-ų) daugiausiai)",1==b?"Grupės riba pasiekta ({n} elementas daugiausiai)":"Grupės riba pasiekta ({n} elementai(-ų) daugiausiai)"]},selectAllText:"Pasirinkti visus",deselectAllText:"Atmesti visus",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-nb_NO.js b/javascript/bootstrap-select/js/i18n/defaults-nb_NO.js
new file mode 100755
index 0000000..63b9985
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-nb_NO.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Ingen valgt',
+ noneResultsText: 'Søket gir ingen treff {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} alternativ valgt" : "{0} alternativer valgt";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Grense nådd (maks {n} valg)' : 'Grense nådd (maks {n} valg)',
+ (numGroup == 1) ? 'Grense for grupper nådd (maks {n} grupper)' : 'Grense for grupper nådd (maks {n} grupper)'
+ ];
+ },
+ selectAllText: 'Merk alle',
+ deselectAllText: 'Fjern alle',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-nb_NO.min.js b/javascript/bootstrap-select/js/i18n/defaults-nb_NO.min.js
new file mode 100755
index 0000000..ffc2e2e
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-nb_NO.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ingen valgt",noneResultsText:"Søket gir ingen treff {0}",countSelectedText:function(a,b){return 1==a?"{0} alternativ valgt":"{0} alternativer valgt"},maxOptionsText:function(a,b){return["Grense nådd (maks {n} valg)","Grense for grupper nådd (maks {n} grupper)"]},selectAllText:"Merk alle",deselectAllText:"Fjern alle",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-nl_NL.js b/javascript/bootstrap-select/js/i18n/defaults-nl_NL.js
new file mode 100755
index 0000000..5b07042
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-nl_NL.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Niets geselecteerd',
+ noneResultsText: 'Geen resultaten gevonden voor {0}',
+ countSelectedText: '{0} van {1} geselecteerd',
+ maxOptionsText: ['Limiet bereikt ({n} {var} max)', 'Groep limiet bereikt ({n} {var} max)', ['items', 'item']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-nl_NL.min.js b/javascript/bootstrap-select/js/i18n/defaults-nl_NL.min.js
new file mode 100755
index 0000000..adffcb6
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-nl_NL.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Niets geselecteerd",noneResultsText:"Geen resultaten gevonden voor {0}",countSelectedText:"{0} van {1} geselecteerd",maxOptionsText:["Limiet bereikt ({n} {var} max)","Groep limiet bereikt ({n} {var} max)",["items","item"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-pl_PL.js b/javascript/bootstrap-select/js/i18n/defaults-pl_PL.js
new file mode 100755
index 0000000..51c9923
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-pl_PL.js
@@ -0,0 +1,37 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nic nie zaznaczono',
+ noneResultsText: 'Brak wyników wyszukiwania {0}',
+ countSelectedText: 'Zaznaczono {0} z {1}',
+ maxOptionsText: ['Osiągnięto limit ({n} {var} max)', 'Limit grupy osiągnięty ({n} {var} max)', ['elementy', 'element']],
+ selectAll: 'Zaznacz wszystkie',
+ deselectAll: 'Odznacz wszystkie',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-pl_PL.min.js b/javascript/bootstrap-select/js/i18n/defaults-pl_PL.min.js
new file mode 100755
index 0000000..42a3f90
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-pl_PL.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic nie zaznaczono",noneResultsText:"Brak wyników wyszukiwania {0}",countSelectedText:"Zaznaczono {0} z {1}",maxOptionsText:["Osiągnięto limit ({n} {var} max)","Limit grupy osiągnięty ({n} {var} max)",["elementy","element"]],selectAll:"Zaznacz wszystkie",deselectAll:"Odznacz wszystkie",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-pt_BR.js b/javascript/bootstrap-select/js/i18n/defaults-pt_BR.js
new file mode 100755
index 0000000..40a2f36
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-pt_BR.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nada selecionado',
+ noneResultsText: 'Nada encontrado contendo {0}',
+ countSelectedText: 'Selecionado {0} de {1}',
+ maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-pt_BR.min.js b/javascript/bootstrap-select/js/i18n/defaults-pt_BR.min.js
new file mode 100755
index 0000000..12b3393
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-pt_BR.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo {0}",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (máx. {n} {var})","Limite do grupo excedido (máx. {n} {var})",["itens","item"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-pt_PT.js b/javascript/bootstrap-select/js/i18n/defaults-pt_PT.js
new file mode 100755
index 0000000..c06f452
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-pt_PT.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+$.fn.selectpicker.defaults = {
+noneSelectedText: 'Nenhum seleccionado',
+noneResultsText: 'Sem resultados contendo {0}',
+countSelectedText: 'Selecionado {0} de {1}',
+maxOptionsText: ['Limite ultrapassado (máx. {n} {var})', 'Limite de seleções ultrapassado (máx. {n} {var})', ['itens', 'item']],
+multipleSeparator: ', '
+};
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-pt_PT.min.js b/javascript/bootstrap-select/js/i18n/defaults-pt_PT.min.js
new file mode 100755
index 0000000..aec4bff
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-pt_PT.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nenhum seleccionado",noneResultsText:"Sem resultados contendo {0}",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite ultrapassado (máx. {n} {var})","Limite de seleções ultrapassado (máx. {n} {var})",["itens","item"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ro_RO.js b/javascript/bootstrap-select/js/i18n/defaults-ro_RO.js
new file mode 100755
index 0000000..92add21
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ro_RO.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nu a fost selectat nimic',
+ noneResultsText: 'Nu exista niciun rezultat {0}',
+ countSelectedText: '{0} din {1} selectat(e)',
+ maxOptionsText: ['Limita a fost atinsa ({n} {var} max)', 'Limita de grup a fost atinsa ({n} {var} max)', ['iteme', 'item']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ro_RO.min.js b/javascript/bootstrap-select/js/i18n/defaults-ro_RO.min.js
new file mode 100755
index 0000000..2be1424
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ro_RO.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nu a fost selectat nimic",noneResultsText:"Nu exista niciun rezultat {0}",countSelectedText:"{0} din {1} selectat(e)",maxOptionsText:["Limita a fost atinsa ({n} {var} max)","Limita de grup a fost atinsa ({n} {var} max)",["iteme","item"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ru_RU.js b/javascript/bootstrap-select/js/i18n/defaults-ru_RU.js
new file mode 100755
index 0000000..50f4bce
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ru_RU.js
@@ -0,0 +1,36 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Ничего не выбрано',
+ noneResultsText: 'Совпадений не найдено {0}',
+ countSelectedText: 'Выбрано {0} из {1}',
+ maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items', 'item']],
+ doneButtonText: 'Закрыть',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ru_RU.min.js b/javascript/bootstrap-select/js/i18n/defaults-ru_RU.min.js
new file mode 100755
index 0000000..f04274f
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ru_RU.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ничего не выбрано",noneResultsText:"Совпадений не найдено {0}",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["Достигнут предел ({n} {var} максимум)","Достигнут предел в группе ({n} {var} максимум)",["items","item"]],doneButtonText:"Закрыть",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-sk_SK.js b/javascript/bootstrap-select/js/i18n/defaults-sk_SK.js
new file mode 100755
index 0000000..be9c9f8
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-sk_SK.js
@@ -0,0 +1,37 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Vyberte zo zoznamu',
+ noneResultsText: 'Pre výraz {0} neboli nájdené žiadne výsledky',
+ countSelectedText: 'Vybrané {0} z {1}',
+ maxOptionsText: ['Limit prekročený ({n} {var} max)', 'Limit skupiny prekročený ({n} {var} max)', ['položiek', 'položka']],
+ selectAllText: 'Vybrať všetky',
+ deselectAllText: 'Zrušiť výber',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-sk_SK.min.js b/javascript/bootstrap-select/js/i18n/defaults-sk_SK.min.js
new file mode 100755
index 0000000..1d27b9a
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-sk_SK.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Vyberte zo zoznamu",noneResultsText:"Pre výraz {0} neboli nájdené žiadne výsledky",countSelectedText:"Vybrané {0} z {1}",maxOptionsText:["Limit prekročený ({n} {var} max)","Limit skupiny prekročený ({n} {var} max)",["položiek","položka"]],selectAllText:"Vybrať všetky",deselectAllText:"Zrušiť výber",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-sl_SI.js b/javascript/bootstrap-select/js/i18n/defaults-sl_SI.js
new file mode 100755
index 0000000..7d9804d
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-sl_SI.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Nič izbranega',
+ noneResultsText: 'Ni zadetkov za {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ "Število izbranih: {0}";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Omejitev dosežena (max. izbranih: {n})',
+ 'Omejitev skupine dosežena (max. izbranih: {n})'
+ ];
+ },
+ selectAllText: 'Izberi vse',
+ deselectAllText: 'Počisti izbor',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-sl_SI.min.js b/javascript/bootstrap-select/js/i18n/defaults-sl_SI.min.js
new file mode 100755
index 0000000..5e76301
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-sl_SI.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nič izbranega",noneResultsText:"Ni zadetkov za {0}",countSelectedText:function(a,b){"Število izbranih: {0}"},maxOptionsText:function(a,b){return["Omejitev dosežena (max. izbranih: {n})","Omejitev skupine dosežena (max. izbranih: {n})"]},selectAllText:"Izberi vse",deselectAllText:"Počisti izbor",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-sv_SE.js b/javascript/bootstrap-select/js/i18n/defaults-sv_SE.js
new file mode 100755
index 0000000..76e059d
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-sv_SE.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Inget valt',
+ noneResultsText: 'Inget sökresultat matchar {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected === 1) ? "{0} alternativ valt" : "{0} alternativ valda";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ 'Gräns uppnåd (max {n} alternativ)',
+ 'Gräns uppnåd (max {n} gruppalternativ)'
+ ];
+ },
+ selectAllText: 'Markera alla',
+ deselectAllText: 'Avmarkera alla',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-sv_SE.min.js b/javascript/bootstrap-select/js/i18n/defaults-sv_SE.min.js
new file mode 100755
index 0000000..ac06e52
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-sv_SE.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Inget valt",noneResultsText:"Inget sökresultat matchar {0}",countSelectedText:function(a,b){return 1===a?"{0} alternativ valt":"{0} alternativ valda"},maxOptionsText:function(a,b){return["Gräns uppnåd (max {n} alternativ)","Gräns uppnåd (max {n} gruppalternativ)"]},selectAllText:"Markera alla",deselectAllText:"Avmarkera alla",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-tr_TR.js b/javascript/bootstrap-select/js/i18n/defaults-tr_TR.js
new file mode 100755
index 0000000..6ac6858
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-tr_TR.js
@@ -0,0 +1,44 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Hiçbiri seçilmedi',
+ noneResultsText: 'Hiçbir sonuç bulunamadı {0}',
+ countSelectedText: function (numSelected, numTotal) {
+ return (numSelected == 1) ? "{0} öğe seçildi" : "{0} öğe seçildi";
+ },
+ maxOptionsText: function (numAll, numGroup) {
+ return [
+ (numAll == 1) ? 'Limit aşıldı (maksimum {n} sayıda öğe )' : 'Limit aşıldı (maksimum {n} sayıda öğe)',
+ (numGroup == 1) ? 'Grup limiti aşıldı (maksimum {n} sayıda öğe)' : 'Grup limiti aşıldı (maksimum {n} sayıda öğe)'
+ ];
+ },
+ selectAllText: 'Tümünü Seç',
+ deselectAllText: 'Seçiniz',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-tr_TR.min.js b/javascript/bootstrap-select/js/i18n/defaults-tr_TR.min.js
new file mode 100755
index 0000000..a5a76cf
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-tr_TR.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hiçbiri seçilmedi",noneResultsText:"Hiçbir sonuç bulunamadı {0}",countSelectedText:function(a,b){return"{0} öğe seçildi"},maxOptionsText:function(a,b){return[1==a?"Limit aşıldı (maksimum {n} sayıda öğe )":"Limit aşıldı (maksimum {n} sayıda öğe)","Grup limiti aşıldı (maksimum {n} sayıda öğe)"]},selectAllText:"Tümünü Seç",deselectAllText:"Seçiniz",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ua_UA.js b/javascript/bootstrap-select/js/i18n/defaults-ua_UA.js
new file mode 100755
index 0000000..cc446e0
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ua_UA.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: 'Нічого не вибрано',
+ noneResultsText: 'Збігів не знайдено {0}',
+ countSelectedText: 'Вибрано {0} із {1}',
+ maxOptionsText: ['Досягнута межа ({n} {var} максимум)', 'Досягнута межа в групі ({n} {var} максимум)', ['items', 'item']],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-ua_UA.min.js b/javascript/bootstrap-select/js/i18n/defaults-ua_UA.min.js
new file mode 100755
index 0000000..e0eee57
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-ua_UA.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нічого не вибрано",noneResultsText:"Збігів не знайдено {0}",countSelectedText:"Вибрано {0} із {1}",maxOptionsText:["Досягнута межа ({n} {var} максимум)","Досягнута межа в групі ({n} {var} максимум)",["items","item"]],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-zh_CN.js b/javascript/bootstrap-select/js/i18n/defaults-zh_CN.js
new file mode 100755
index 0000000..57db1d3
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-zh_CN.js
@@ -0,0 +1,35 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '没有选中任何项',
+ noneResultsText: '没有找到匹配项',
+ countSelectedText: '选中{1}中的{0}项',
+ maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'],
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-zh_CN.min.js b/javascript/bootstrap-select/js/i18n/defaults-zh_CN.min.js
new file mode 100755
index 0000000..0c64a07
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-zh_CN.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"没有选中任何项",noneResultsText:"没有找到匹配项",countSelectedText:"选中{1}中的{0}项",maxOptionsText:["超出限制 (最多选择{n}项)","组选择超出限制(最多选择{n}组)"],multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap-select/js/i18n/defaults-zh_TW.js b/javascript/bootstrap-select/js/i18n/defaults-zh_TW.js
new file mode 100755
index 0000000..62ac1ab
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-zh_TW.js
@@ -0,0 +1,37 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module unless amdModuleId is set
+ define(["jquery"], function (a0) {
+ return (factory(a0));
+ });
+ } else if (typeof exports === 'object') {
+ // Node. Does not work with strict CommonJS, but
+ // only CommonJS-like environments that support module.exports,
+ // like Node.
+ module.exports = factory(require("jquery"));
+ } else {
+ factory(jQuery);
+ }
+}(this, function (jQuery) {
+
+(function ($) {
+ $.fn.selectpicker.defaults = {
+ noneSelectedText: '沒有選取任何項目',
+ noneResultsText: '沒有找到符合的結果',
+ countSelectedText: '已經選取{0}個項目',
+ maxOptionsText: ['超過限制 (最多選擇{n}項)', '超過限制(最多選擇{n}組)'],
+ selectAllText: '選取全部',
+ deselectAllText: '全部取消',
+ multipleSeparator: ', '
+ };
+})(jQuery);
+
+
+}));
diff --git a/javascript/bootstrap-select/js/i18n/defaults-zh_TW.min.js b/javascript/bootstrap-select/js/i18n/defaults-zh_TW.min.js
new file mode 100755
index 0000000..befa7e0
--- /dev/null
+++ b/javascript/bootstrap-select/js/i18n/defaults-zh_TW.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
+ *
+ * Copyright 2013-2016 bootstrap-select
+ * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
+ */
+!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"沒有選取任何項目",noneResultsText:"沒有找到符合的結果",countSelectedText:"已經選取{0}個項目",maxOptionsText:["超過限制 (最多選擇{n}項)","超過限制(最多選擇{n}組)"],selectAllText:"選取全部",deselectAllText:"全部取消",multipleSeparator:", "}}(a)});
\ No newline at end of file
diff --git a/javascript/bootstrap_forms.js b/javascript/bootstrap_forms.js
index 58d2e91..efeb9e2 100755
--- a/javascript/bootstrap_forms.js
+++ b/javascript/bootstrap_forms.js
@@ -50,21 +50,8 @@ $(function() {
}).filter('.active').click();
}
-// dropdowns need to be configured when javascript is enabled.
- $('.dropdown-select').hide();
- $('.dropdown-toggle').show();
- // sync selected list item with the select control
- $('.dropdown-menu a').on('click', function(ev) {
- var rel = $(this).attr('rel'),
- value = $(this).data('value');
-
- $(rel + '_select').val(value);
- $(rel + '_select').change();
- $(rel + '_label').text($(this).text());
- });
-
- });
+});
})(jQuery);
diff --git a/javascript/chosen/chosen-sprite.png b/javascript/chosen/chosen-sprite.png
new file mode 100755
index 0000000..c57da70
Binary files /dev/null and b/javascript/chosen/chosen-sprite.png differ
diff --git a/javascript/chosen/chosen-sprite@2x.png b/javascript/chosen/chosen-sprite@2x.png
new file mode 100755
index 0000000..6b50545
Binary files /dev/null and b/javascript/chosen/chosen-sprite@2x.png differ
diff --git a/javascript/chosen/chosen.css b/javascript/chosen/chosen.css
new file mode 100755
index 0000000..b066b4c
--- /dev/null
+++ b/javascript/chosen/chosen.css
@@ -0,0 +1,447 @@
+/*!
+Chosen, a Select Box Enhancer for jQuery and Prototype
+by Patrick Filler for Harvest, http://getharvest.com
+
+Version 1.6.2
+Full source at https://github.com/harvesthq/chosen
+Copyright (c) 2011-2016 Harvest http://getharvest.com
+
+MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+This file is generated by `grunt build`, do not edit it by hand.
+*/
+
+/* @group Base */
+.chosen-container {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+ font-size: 13px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+}
+.chosen-container * {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+.chosen-container .chosen-drop {
+ position: absolute;
+ top: 100%;
+ left: -9999px;
+ z-index: 1010;
+ width: 100%;
+ border: 1px solid #aaa;
+ border-top: 0;
+ background: #fff;
+ box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
+}
+.chosen-container.chosen-with-drop .chosen-drop {
+ left: 0;
+}
+.chosen-container a {
+ cursor: pointer;
+}
+.chosen-container .search-choice .group-name, .chosen-container .chosen-single .group-name {
+ margin-right: 4px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ font-weight: normal;
+ color: #999999;
+}
+.chosen-container .search-choice .group-name:after, .chosen-container .chosen-single .group-name:after {
+ content: ":";
+ padding-left: 2px;
+ vertical-align: top;
+}
+
+/* @end */
+/* @group Single Chosen */
+.chosen-container-single .chosen-single {
+ position: relative;
+ display: block;
+ overflow: hidden;
+ padding: 0 0 0 8px;
+ height: 25px;
+ border: 1px solid #aaa;
+ border-radius: 5px;
+ background-color: #fff;
+ background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
+ background: -webkit-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background: -moz-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background: -o-linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
+ background-clip: padding-box;
+ box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1);
+ color: #444;
+ text-decoration: none;
+ white-space: nowrap;
+ line-height: 24px;
+}
+.chosen-container-single .chosen-default {
+ color: #999;
+}
+.chosen-container-single .chosen-single span {
+ display: block;
+ overflow: hidden;
+ margin-right: 26px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.chosen-container-single .chosen-single-with-deselect span {
+ margin-right: 38px;
+}
+.chosen-container-single .chosen-single abbr {
+ position: absolute;
+ top: 6px;
+ right: 26px;
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
+ font-size: 1px;
+}
+.chosen-container-single .chosen-single abbr:hover {
+ background-position: -42px -10px;
+}
+.chosen-container-single.chosen-disabled .chosen-single abbr:hover {
+ background-position: -42px -10px;
+}
+.chosen-container-single .chosen-single div {
+ position: absolute;
+ top: 0;
+ right: 0;
+ display: block;
+ width: 18px;
+ height: 100%;
+}
+.chosen-container-single .chosen-single div b {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background: url('chosen-sprite.png') no-repeat 0px 2px;
+}
+.chosen-container-single .chosen-search {
+ position: relative;
+ z-index: 1010;
+ margin: 0;
+ padding: 3px 4px;
+ white-space: nowrap;
+}
+.chosen-container-single .chosen-search input[type="text"] {
+ margin: 1px 0;
+ padding: 4px 20px 4px 5px;
+ width: 100%;
+ height: auto;
+ outline: 0;
+ border: 1px solid #aaa;
+ background: white url('chosen-sprite.png') no-repeat 100% -20px;
+ background: url('chosen-sprite.png') no-repeat 100% -20px;
+ font-size: 1em;
+ font-family: sans-serif;
+ line-height: normal;
+ border-radius: 0;
+}
+.chosen-container-single .chosen-drop {
+ margin-top: -1px;
+ border-radius: 0 0 4px 4px;
+ background-clip: padding-box;
+}
+.chosen-container-single.chosen-container-single-nosearch .chosen-search {
+ position: absolute;
+ left: -9999px;
+}
+
+/* @end */
+/* @group Results */
+.chosen-container .chosen-results {
+ color: #444;
+ position: relative;
+ overflow-x: hidden;
+ overflow-y: auto;
+ margin: 0 4px 4px 0;
+ padding: 0 0 0 4px;
+ max-height: 240px;
+ -webkit-overflow-scrolling: touch;
+}
+.chosen-container .chosen-results li {
+ display: none;
+ margin: 0;
+ padding: 5px 6px;
+ list-style: none;
+ line-height: 15px;
+ word-wrap: break-word;
+ -webkit-touch-callout: none;
+}
+.chosen-container .chosen-results li.active-result {
+ display: list-item;
+ cursor: pointer;
+}
+.chosen-container .chosen-results li.disabled-result {
+ display: list-item;
+ color: #ccc;
+ cursor: default;
+}
+.chosen-container .chosen-results li.highlighted {
+ background-color: #3875d7;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
+ background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%);
+ background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%);
+ background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%);
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
+ color: #fff;
+}
+.chosen-container .chosen-results li.no-results {
+ color: #777;
+ display: list-item;
+ background: #f4f4f4;
+}
+.chosen-container .chosen-results li.group-result {
+ display: list-item;
+ font-weight: bold;
+ cursor: default;
+}
+.chosen-container .chosen-results li.group-option {
+ padding-left: 15px;
+}
+.chosen-container .chosen-results li em {
+ font-style: normal;
+ text-decoration: underline;
+}
+
+/* @end */
+/* @group Multi Chosen */
+.chosen-container-multi .chosen-choices {
+ position: relative;
+ overflow: hidden;
+ margin: 0;
+ padding: 0 5px;
+ width: 100%;
+ height: auto;
+ border: 1px solid #aaa;
+ background-color: #fff;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
+ background-image: -webkit-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background-image: -moz-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background-image: -o-linear-gradient(#eeeeee 1%, #ffffff 15%);
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
+ cursor: text;
+}
+.chosen-container-multi .chosen-choices li {
+ float: left;
+ list-style: none;
+}
+.chosen-container-multi .chosen-choices li.search-field {
+ margin: 0;
+ padding: 0;
+ white-space: nowrap;
+}
+.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
+ margin: 1px 0;
+ padding: 0;
+ height: 25px;
+ outline: 0;
+ border: 0 !important;
+ background: transparent !important;
+ box-shadow: none;
+ color: #999;
+ font-size: 100%;
+ font-family: sans-serif;
+ line-height: normal;
+ border-radius: 0;
+}
+.chosen-container-multi .chosen-choices li.search-choice {
+ position: relative;
+ margin: 3px 5px 3px 0;
+ padding: 3px 20px 3px 5px;
+ border: 1px solid #aaa;
+ max-width: 100%;
+ border-radius: 3px;
+ background-color: #eeeeee;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+ background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-size: 100% 19px;
+ background-repeat: repeat-x;
+ background-clip: padding-box;
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
+ color: #333;
+ line-height: 13px;
+ cursor: default;
+}
+.chosen-container-multi .chosen-choices li.search-choice span {
+ word-wrap: break-word;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
+ position: absolute;
+ top: 4px;
+ right: 3px;
+ display: block;
+ width: 12px;
+ height: 12px;
+ background: url('chosen-sprite.png') -42px 1px no-repeat;
+ font-size: 1px;
+}
+.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
+ background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-choices li.search-choice-disabled {
+ padding-right: 5px;
+ border: 1px solid #ccc;
+ background-color: #e4e4e4;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
+ background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
+ color: #666;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus {
+ background: #d4d4d4;
+}
+.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
+ background-position: -42px -10px;
+}
+.chosen-container-multi .chosen-results {
+ margin: 0;
+ padding: 0;
+}
+.chosen-container-multi .chosen-drop .result-selected {
+ display: list-item;
+ color: #ccc;
+ cursor: default;
+}
+
+/* @end */
+/* @group Active */
+.chosen-container-active .chosen-single {
+ border: 1px solid #5897fb;
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active.chosen-with-drop .chosen-single {
+ border: 1px solid #aaa;
+ -moz-border-radius-bottomright: 0;
+ border-bottom-right-radius: 0;
+ -moz-border-radius-bottomleft: 0;
+ border-bottom-left-radius: 0;
+ background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
+ background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%);
+ background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%);
+ background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%);
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
+ box-shadow: 0 1px 0 #fff inset;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div {
+ border-left: none;
+ background: transparent;
+}
+.chosen-container-active.chosen-with-drop .chosen-single div b {
+ background-position: -18px 2px;
+}
+.chosen-container-active .chosen-choices {
+ border: 1px solid #5897fb;
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
+}
+.chosen-container-active .chosen-choices li.search-field input[type="text"] {
+ color: #222 !important;
+}
+
+/* @end */
+/* @group Disabled Support */
+.chosen-disabled {
+ opacity: 0.5 !important;
+ cursor: default;
+}
+.chosen-disabled .chosen-single {
+ cursor: default;
+}
+.chosen-disabled .chosen-choices .search-choice .search-choice-close {
+ cursor: default;
+}
+
+/* @end */
+/* @group Right to Left */
+.chosen-rtl {
+ text-align: right;
+}
+.chosen-rtl .chosen-single {
+ overflow: visible;
+ padding: 0 8px 0 0;
+}
+.chosen-rtl .chosen-single span {
+ margin-right: 0;
+ margin-left: 26px;
+ direction: rtl;
+}
+.chosen-rtl .chosen-single-with-deselect span {
+ margin-left: 38px;
+}
+.chosen-rtl .chosen-single div {
+ right: auto;
+ left: 3px;
+}
+.chosen-rtl .chosen-single abbr {
+ right: auto;
+ left: 26px;
+}
+.chosen-rtl .chosen-choices li {
+ float: right;
+}
+.chosen-rtl .chosen-choices li.search-field input[type="text"] {
+ direction: rtl;
+}
+.chosen-rtl .chosen-choices li.search-choice {
+ margin: 3px 5px 3px 0;
+ padding: 3px 5px 3px 19px;
+}
+.chosen-rtl .chosen-choices li.search-choice .search-choice-close {
+ right: auto;
+ left: 4px;
+}
+.chosen-rtl.chosen-container-single-nosearch .chosen-search,
+.chosen-rtl .chosen-drop {
+ left: 9999px;
+}
+.chosen-rtl.chosen-container-single .chosen-results {
+ margin: 0 0 4px 4px;
+ padding: 0 4px 0 0;
+}
+.chosen-rtl .chosen-results li.group-option {
+ padding-right: 15px;
+ padding-left: 0;
+}
+.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
+ border-right: none;
+}
+.chosen-rtl .chosen-search input[type="text"] {
+ padding: 4px 5px 4px 20px;
+ background: white url('chosen-sprite.png') no-repeat -30px -20px;
+ background: url('chosen-sprite.png') no-repeat -30px -20px;
+ direction: rtl;
+}
+.chosen-rtl.chosen-container-single .chosen-single div b {
+ background-position: 6px 2px;
+}
+.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
+ background-position: -12px 2px;
+}
+
+/* @end */
+/* @group Retina compatibility */
+@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
+ .chosen-rtl .chosen-search input[type="text"],
+ .chosen-container-single .chosen-single abbr,
+ .chosen-container-single .chosen-single div b,
+ .chosen-container-single .chosen-search input[type="text"],
+ .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
+ .chosen-container .chosen-results-scroll-down span,
+ .chosen-container .chosen-results-scroll-up span {
+ background-image: url('chosen-sprite@2x.png') !important;
+ background-size: 52px 37px !important;
+ background-repeat: no-repeat !important;
+ }
+}
+/* @end */
diff --git a/javascript/chosen/chosen.jquery.js b/javascript/chosen/chosen.jquery.js
new file mode 100755
index 0000000..060c162
--- /dev/null
+++ b/javascript/chosen/chosen.jquery.js
@@ -0,0 +1,1269 @@
+/*!
+Chosen, a Select Box Enhancer for jQuery and Prototype
+by Patrick Filler for Harvest, http://getharvest.com
+
+Version 1.6.2
+Full source at https://github.com/harvesthq/chosen
+Copyright (c) 2011-2016 Harvest http://getharvest.com
+
+MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
+This file is generated by `grunt build`, do not edit it by hand.
+*/
+
+(function() {
+ var $, AbstractChosen, Chosen, SelectParser, _ref,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
+
+ SelectParser = (function() {
+ function SelectParser() {
+ this.options_index = 0;
+ this.parsed = [];
+ }
+
+ SelectParser.prototype.add_node = function(child) {
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
+ return this.add_group(child);
+ } else {
+ return this.add_option(child);
+ }
+ };
+
+ SelectParser.prototype.add_group = function(group) {
+ var group_position, option, _i, _len, _ref, _results;
+ group_position = this.parsed.length;
+ this.parsed.push({
+ array_index: group_position,
+ group: true,
+ label: this.escapeExpression(group.label),
+ title: group.title ? group.title : void 0,
+ children: 0,
+ disabled: group.disabled,
+ classes: group.className
+ });
+ _ref = group.childNodes;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ option = _ref[_i];
+ _results.push(this.add_option(option, group_position, group.disabled));
+ }
+ return _results;
+ };
+
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
+ if (option.nodeName.toUpperCase() === "OPTION") {
+ if (option.text !== "") {
+ if (group_position != null) {
+ this.parsed[group_position].children += 1;
+ }
+ this.parsed.push({
+ array_index: this.parsed.length,
+ options_index: this.options_index,
+ value: option.value,
+ text: option.text,
+ html: option.innerHTML,
+ title: option.title ? option.title : void 0,
+ selected: option.selected,
+ disabled: group_disabled === true ? group_disabled : option.disabled,
+ group_array_index: group_position,
+ group_label: group_position != null ? this.parsed[group_position].label : null,
+ classes: option.className,
+ style: option.style.cssText
+ });
+ } else {
+ this.parsed.push({
+ array_index: this.parsed.length,
+ options_index: this.options_index,
+ empty: true
+ });
+ }
+ return this.options_index += 1;
+ }
+ };
+
+ SelectParser.prototype.escapeExpression = function(text) {
+ var map, unsafe_chars;
+ if ((text == null) || text === false) {
+ return "";
+ }
+ if (!/[\&\<\>\"\'\`]/.test(text)) {
+ return text;
+ }
+ map = {
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'",
+ "`": "`"
+ };
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
+ return text.replace(unsafe_chars, function(chr) {
+ return map[chr] || "&";
+ });
+ };
+
+ return SelectParser;
+
+ })();
+
+ SelectParser.select_to_array = function(select) {
+ var child, parser, _i, _len, _ref;
+ parser = new SelectParser();
+ _ref = select.childNodes;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ child = _ref[_i];
+ parser.add_node(child);
+ }
+ return parser.parsed;
+ };
+
+ AbstractChosen = (function() {
+ function AbstractChosen(form_field, options) {
+ this.form_field = form_field;
+ this.options = options != null ? options : {};
+ if (!AbstractChosen.browser_is_supported()) {
+ return;
+ }
+ this.is_multiple = this.form_field.multiple;
+ this.set_default_text();
+ this.set_default_values();
+ this.setup();
+ this.set_up_html();
+ this.register_observers();
+ this.on_ready();
+ }
+
+ AbstractChosen.prototype.set_default_values = function() {
+ var _this = this;
+ this.click_test_action = function(evt) {
+ return _this.test_active_click(evt);
+ };
+ this.activate_action = function(evt) {
+ return _this.activate_field(evt);
+ };
+ this.active_field = false;
+ this.mouse_on_container = false;
+ this.results_showing = false;
+ this.result_highlighted = null;
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
+ this.disable_search = this.options.disable_search || false;
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
+ this.search_contains = this.options.search_contains || false;
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
+ this.max_selected_options = this.options.max_selected_options || Infinity;
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
+ this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
+ return this.case_sensitive_search = this.options.case_sensitive_search || false;
+ };
+
+ AbstractChosen.prototype.set_default_text = function() {
+ if (this.form_field.getAttribute("data-placeholder")) {
+ this.default_text = this.form_field.getAttribute("data-placeholder");
+ } else if (this.is_multiple) {
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
+ } else {
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
+ }
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
+ };
+
+ AbstractChosen.prototype.choice_label = function(item) {
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
+ return "" + item.group_label + "" + item.html;
+ } else {
+ return item.html;
+ }
+ };
+
+ AbstractChosen.prototype.mouse_enter = function() {
+ return this.mouse_on_container = true;
+ };
+
+ AbstractChosen.prototype.mouse_leave = function() {
+ return this.mouse_on_container = false;
+ };
+
+ AbstractChosen.prototype.input_focus = function(evt) {
+ var _this = this;
+ if (this.is_multiple) {
+ if (!this.active_field) {
+ return setTimeout((function() {
+ return _this.container_mousedown();
+ }), 50);
+ }
+ } else {
+ if (!this.active_field) {
+ return this.activate_field();
+ }
+ }
+ };
+
+ AbstractChosen.prototype.input_blur = function(evt) {
+ var _this = this;
+ if (!this.mouse_on_container) {
+ this.active_field = false;
+ return setTimeout((function() {
+ return _this.blur_test();
+ }), 100);
+ }
+ };
+
+ AbstractChosen.prototype.results_option_build = function(options) {
+ var content, data, data_content, shown_results, _i, _len, _ref;
+ content = '';
+ shown_results = 0;
+ _ref = this.results_data;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ data = _ref[_i];
+ data_content = '';
+ if (data.group) {
+ data_content = this.result_add_group(data);
+ } else {
+ data_content = this.result_add_option(data);
+ }
+ if (data_content !== '') {
+ shown_results++;
+ content += data_content;
+ }
+ if (options != null ? options.first : void 0) {
+ if (data.selected && this.is_multiple) {
+ this.choice_build(data);
+ } else if (data.selected && !this.is_multiple) {
+ this.single_set_selected_text(this.choice_label(data));
+ }
+ }
+ if (shown_results >= this.max_shown_results) {
+ break;
+ }
+ }
+ return content;
+ };
+
+ AbstractChosen.prototype.result_add_option = function(option) {
+ var classes, option_el;
+ if (!option.search_match) {
+ return '';
+ }
+ if (!this.include_option_in_results(option)) {
+ return '';
+ }
+ classes = [];
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
+ classes.push("active-result");
+ }
+ if (option.disabled && !(option.selected && this.is_multiple)) {
+ classes.push("disabled-result");
+ }
+ if (option.selected) {
+ classes.push("result-selected");
+ }
+ if (option.group_array_index != null) {
+ classes.push("group-option");
+ }
+ if (option.classes !== "") {
+ classes.push(option.classes);
+ }
+ option_el = document.createElement("li");
+ option_el.className = classes.join(" ");
+ option_el.style.cssText = option.style;
+ option_el.setAttribute("data-option-array-index", option.array_index);
+ option_el.innerHTML = option.search_text;
+ if (option.title) {
+ option_el.title = option.title;
+ }
+ return this.outerHTML(option_el);
+ };
+
+ AbstractChosen.prototype.result_add_group = function(group) {
+ var classes, group_el;
+ if (!(group.search_match || group.group_match)) {
+ return '';
+ }
+ if (!(group.active_options > 0)) {
+ return '';
+ }
+ classes = [];
+ classes.push("group-result");
+ if (group.classes) {
+ classes.push(group.classes);
+ }
+ group_el = document.createElement("li");
+ group_el.className = classes.join(" ");
+ group_el.innerHTML = group.search_text;
+ if (group.title) {
+ group_el.title = group.title;
+ }
+ return this.outerHTML(group_el);
+ };
+
+ AbstractChosen.prototype.results_update_field = function() {
+ this.set_default_text();
+ if (!this.is_multiple) {
+ this.results_reset_cleanup();
+ }
+ this.result_clear_highlight();
+ this.results_build();
+ if (this.results_showing) {
+ return this.winnow_results();
+ }
+ };
+
+ AbstractChosen.prototype.reset_single_select_options = function() {
+ var result, _i, _len, _ref, _results;
+ _ref = this.results_data;
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ result = _ref[_i];
+ if (result.selected) {
+ _results.push(result.selected = false);
+ } else {
+ _results.push(void 0);
+ }
+ }
+ return _results;
+ };
+
+ AbstractChosen.prototype.results_toggle = function() {
+ if (this.results_showing) {
+ return this.results_hide();
+ } else {
+ return this.results_show();
+ }
+ };
+
+ AbstractChosen.prototype.results_search = function(evt) {
+ if (this.results_showing) {
+ return this.winnow_results();
+ } else {
+ return this.results_show();
+ }
+ };
+
+ AbstractChosen.prototype.winnow_results = function() {
+ var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
+ this.no_results_clear();
+ results = 0;
+ searchText = this.get_search_text();
+ escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+ zregex = new RegExp(escapedSearchText, 'i');
+ regex = this.get_search_regex(escapedSearchText);
+ _ref = this.results_data;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ option = _ref[_i];
+ option.search_match = false;
+ results_group = null;
+ if (this.include_option_in_results(option)) {
+ if (option.group) {
+ option.group_match = false;
+ option.active_options = 0;
+ }
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
+ results_group = this.results_data[option.group_array_index];
+ if (results_group.active_options === 0 && results_group.search_match) {
+ results += 1;
+ }
+ results_group.active_options += 1;
+ }
+ option.search_text = option.group ? option.label : option.html;
+ if (!(option.group && !this.group_search)) {
+ option.search_match = this.search_string_match(option.search_text, regex);
+ if (option.search_match && !option.group) {
+ results += 1;
+ }
+ if (option.search_match) {
+ if (searchText.length) {
+ startpos = option.search_text.search(zregex);
+ text = option.search_text.substr(0, startpos + searchText.length) + '' + option.search_text.substr(startpos + searchText.length);
+ option.search_text = text.substr(0, startpos) + '' + text.substr(startpos);
+ }
+ if (results_group != null) {
+ results_group.group_match = true;
+ }
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
+ option.search_match = true;
+ }
+ }
+ }
+ }
+ this.result_clear_highlight();
+ if (results < 1 && searchText.length) {
+ this.update_results_content("");
+ return this.no_results(searchText);
+ } else {
+ this.update_results_content(this.results_option_build());
+ return this.winnow_results_set_highlight();
+ }
+ };
+
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
+ var regex_anchor, regex_flag;
+ regex_anchor = this.search_contains ? "" : "^";
+ regex_flag = this.case_sensitive_search ? "" : "i";
+ return new RegExp(regex_anchor + escaped_search_string, regex_flag);
+ };
+
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
+ var part, parts, _i, _len;
+ if (regex.test(search_string)) {
+ return true;
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
+ if (parts.length) {
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
+ part = parts[_i];
+ if (regex.test(part)) {
+ return true;
+ }
+ }
+ }
+ }
+ };
+
+ AbstractChosen.prototype.choices_count = function() {
+ var option, _i, _len, _ref;
+ if (this.selected_option_count != null) {
+ return this.selected_option_count;
+ }
+ this.selected_option_count = 0;
+ _ref = this.form_field.options;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ option = _ref[_i];
+ if (option.selected) {
+ this.selected_option_count += 1;
+ }
+ }
+ return this.selected_option_count;
+ };
+
+ AbstractChosen.prototype.choices_click = function(evt) {
+ evt.preventDefault();
+ if (!(this.results_showing || this.is_disabled)) {
+ return this.results_show();
+ }
+ };
+
+ AbstractChosen.prototype.keyup_checker = function(evt) {
+ var stroke, _ref;
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
+ this.search_field_scale();
+ switch (stroke) {
+ case 8:
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
+ return this.keydown_backstroke();
+ } else if (!this.pending_backstroke) {
+ this.result_clear_highlight();
+ return this.results_search();
+ }
+ break;
+ case 13:
+ evt.preventDefault();
+ if (this.results_showing) {
+ return this.result_select(evt);
+ }
+ break;
+ case 27:
+ if (this.results_showing) {
+ this.results_hide();
+ }
+ return true;
+ case 9:
+ case 38:
+ case 40:
+ case 16:
+ case 91:
+ case 17:
+ case 18:
+ break;
+ default:
+ return this.results_search();
+ }
+ };
+
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
+ var _this = this;
+ return setTimeout((function() {
+ return _this.results_search();
+ }), 50);
+ };
+
+ AbstractChosen.prototype.container_width = function() {
+ if (this.options.width != null) {
+ return this.options.width;
+ } else {
+ return "" + this.form_field.offsetWidth + "px";
+ }
+ };
+
+ AbstractChosen.prototype.include_option_in_results = function(option) {
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
+ return false;
+ }
+ if (!this.display_disabled_options && option.disabled) {
+ return false;
+ }
+ if (option.empty) {
+ return false;
+ }
+ return true;
+ };
+
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
+ this.touch_started = true;
+ return this.search_results_mouseover(evt);
+ };
+
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
+ this.touch_started = false;
+ return this.search_results_mouseout(evt);
+ };
+
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
+ if (this.touch_started) {
+ return this.search_results_mouseup(evt);
+ }
+ };
+
+ AbstractChosen.prototype.outerHTML = function(element) {
+ var tmp;
+ if (element.outerHTML) {
+ return element.outerHTML;
+ }
+ tmp = document.createElement("div");
+ tmp.appendChild(element);
+ return tmp.innerHTML;
+ };
+
+ AbstractChosen.browser_is_supported = function() {
+ if ("Microsoft Internet Explorer" === window.navigator.appName) {
+ return document.documentMode >= 8;
+ }
+ if (/iP(od|hone)/i.test(window.navigator.userAgent) || /IEMobile/i.test(window.navigator.userAgent) || /Windows Phone/i.test(window.navigator.userAgent) || /BlackBerry/i.test(window.navigator.userAgent) || /BB10/i.test(window.navigator.userAgent) || /Android.*Mobile/i.test(window.navigator.userAgent)) {
+ return false;
+ }
+ return true;
+ };
+
+ AbstractChosen.default_multiple_text = "Select Some Options";
+
+ AbstractChosen.default_single_text = "Select an Option";
+
+ AbstractChosen.default_no_result_text = "No results match";
+
+ return AbstractChosen;
+
+ })();
+
+ $ = jQuery;
+
+ $.fn.extend({
+ chosen: function(options) {
+ if (!AbstractChosen.browser_is_supported()) {
+ return this;
+ }
+ return this.each(function(input_field) {
+ var $this, chosen;
+ $this = $(this);
+ chosen = $this.data('chosen');
+ if (options === 'destroy') {
+ if (chosen instanceof Chosen) {
+ chosen.destroy();
+ }
+ return;
+ }
+ if (!(chosen instanceof Chosen)) {
+ $this.data('chosen', new Chosen(this, options));
+ }
+ });
+ }
+ });
+
+ Chosen = (function(_super) {
+ __extends(Chosen, _super);
+
+ function Chosen() {
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
+ return _ref;
+ }
+
+ Chosen.prototype.setup = function() {
+ this.form_field_jq = $(this.form_field);
+ this.current_selectedIndex = this.form_field.selectedIndex;
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
+ };
+
+ Chosen.prototype.set_up_html = function() {
+ var container_classes, container_props;
+ container_classes = ["chosen-container"];
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
+ if (this.inherit_select_classes && this.form_field.className) {
+ container_classes.push(this.form_field.className);
+ }
+ if (this.is_rtl) {
+ container_classes.push("chosen-rtl");
+ }
+ container_props = {
+ 'class': container_classes.join(' '),
+ 'style': "width: " + (this.container_width()) + ";",
+ 'title': this.form_field.title
+ };
+ if (this.form_field.id.length) {
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
+ }
+ this.container = $("", container_props);
+ if (this.is_multiple) {
+ this.container.html('');
+ } else {
+ this.container.html('' + this.default_text + '
');
+ }
+ this.form_field_jq.hide().after(this.container);
+ this.dropdown = this.container.find('div.chosen-drop').first();
+ this.search_field = this.container.find('input').first();
+ this.search_results = this.container.find('ul.chosen-results').first();
+ this.search_field_scale();
+ this.search_no_results = this.container.find('li.no-results').first();
+ if (this.is_multiple) {
+ this.search_choices = this.container.find('ul.chosen-choices').first();
+ this.search_container = this.container.find('li.search-field').first();
+ } else {
+ this.search_container = this.container.find('div.chosen-search').first();
+ this.selected_item = this.container.find('.chosen-single').first();
+ }
+ this.results_build();
+ this.set_tab_index();
+ return this.set_label_behavior();
+ };
+
+ Chosen.prototype.on_ready = function() {
+ return this.form_field_jq.trigger("chosen:ready", {
+ chosen: this
+ });
+ };
+
+ Chosen.prototype.register_observers = function() {
+ var _this = this;
+ this.container.bind('touchstart.chosen', function(evt) {
+ _this.container_mousedown(evt);
+ return evt.preventDefault();
+ });
+ this.container.bind('touchend.chosen', function(evt) {
+ _this.container_mouseup(evt);
+ return evt.preventDefault();
+ });
+ this.container.bind('mousedown.chosen', function(evt) {
+ _this.container_mousedown(evt);
+ });
+ this.container.bind('mouseup.chosen', function(evt) {
+ _this.container_mouseup(evt);
+ });
+ this.container.bind('mouseenter.chosen', function(evt) {
+ _this.mouse_enter(evt);
+ });
+ this.container.bind('mouseleave.chosen', function(evt) {
+ _this.mouse_leave(evt);
+ });
+ this.search_results.bind('mouseup.chosen', function(evt) {
+ _this.search_results_mouseup(evt);
+ });
+ this.search_results.bind('mouseover.chosen', function(evt) {
+ _this.search_results_mouseover(evt);
+ });
+ this.search_results.bind('mouseout.chosen', function(evt) {
+ _this.search_results_mouseout(evt);
+ });
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
+ _this.search_results_mousewheel(evt);
+ });
+ this.search_results.bind('touchstart.chosen', function(evt) {
+ _this.search_results_touchstart(evt);
+ });
+ this.search_results.bind('touchmove.chosen', function(evt) {
+ _this.search_results_touchmove(evt);
+ });
+ this.search_results.bind('touchend.chosen', function(evt) {
+ _this.search_results_touchend(evt);
+ });
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
+ _this.results_update_field(evt);
+ });
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
+ _this.activate_field(evt);
+ });
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
+ _this.container_mousedown(evt);
+ });
+ this.form_field_jq.bind("chosen:close.chosen", function(evt) {
+ _this.input_blur(evt);
+ });
+ this.search_field.bind('blur.chosen', function(evt) {
+ _this.input_blur(evt);
+ });
+ this.search_field.bind('keyup.chosen', function(evt) {
+ _this.keyup_checker(evt);
+ });
+ this.search_field.bind('keydown.chosen', function(evt) {
+ _this.keydown_checker(evt);
+ });
+ this.search_field.bind('focus.chosen', function(evt) {
+ _this.input_focus(evt);
+ });
+ this.search_field.bind('cut.chosen', function(evt) {
+ _this.clipboard_event_checker(evt);
+ });
+ this.search_field.bind('paste.chosen', function(evt) {
+ _this.clipboard_event_checker(evt);
+ });
+ if (this.is_multiple) {
+ return this.search_choices.bind('click.chosen', function(evt) {
+ _this.choices_click(evt);
+ });
+ } else {
+ return this.container.bind('click.chosen', function(evt) {
+ evt.preventDefault();
+ });
+ }
+ };
+
+ Chosen.prototype.destroy = function() {
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
+ if (this.search_field[0].tabIndex) {
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
+ }
+ this.container.remove();
+ this.form_field_jq.removeData('chosen');
+ return this.form_field_jq.show();
+ };
+
+ Chosen.prototype.search_field_disabled = function() {
+ this.is_disabled = this.form_field_jq[0].disabled;
+ if (this.is_disabled) {
+ this.container.addClass('chosen-disabled');
+ this.search_field[0].disabled = true;
+ if (!this.is_multiple) {
+ this.selected_item.unbind("focus.chosen", this.activate_action);
+ }
+ return this.close_field();
+ } else {
+ this.container.removeClass('chosen-disabled');
+ this.search_field[0].disabled = false;
+ if (!this.is_multiple) {
+ return this.selected_item.bind("focus.chosen", this.activate_action);
+ }
+ }
+ };
+
+ Chosen.prototype.container_mousedown = function(evt) {
+ if (!this.is_disabled) {
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
+ evt.preventDefault();
+ }
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
+ if (!this.active_field) {
+ if (this.is_multiple) {
+ this.search_field.val("");
+ }
+ $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
+ this.results_show();
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
+ evt.preventDefault();
+ this.results_toggle();
+ }
+ return this.activate_field();
+ }
+ }
+ };
+
+ Chosen.prototype.container_mouseup = function(evt) {
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
+ return this.results_reset(evt);
+ }
+ };
+
+ Chosen.prototype.search_results_mousewheel = function(evt) {
+ var delta;
+ if (evt.originalEvent) {
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
+ }
+ if (delta != null) {
+ evt.preventDefault();
+ if (evt.type === 'DOMMouseScroll') {
+ delta = delta * 40;
+ }
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
+ }
+ };
+
+ Chosen.prototype.blur_test = function(evt) {
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
+ return this.close_field();
+ }
+ };
+
+ Chosen.prototype.close_field = function() {
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
+ this.active_field = false;
+ this.results_hide();
+ this.container.removeClass("chosen-container-active");
+ this.clear_backstroke();
+ this.show_search_field_default();
+ return this.search_field_scale();
+ };
+
+ Chosen.prototype.activate_field = function() {
+ this.container.addClass("chosen-container-active");
+ this.active_field = true;
+ this.search_field.val(this.search_field.val());
+ return this.search_field.focus();
+ };
+
+ Chosen.prototype.test_active_click = function(evt) {
+ var active_container;
+ active_container = $(evt.target).closest('.chosen-container');
+ if (active_container.length && this.container[0] === active_container[0]) {
+ return this.active_field = true;
+ } else {
+ return this.close_field();
+ }
+ };
+
+ Chosen.prototype.results_build = function() {
+ this.parsing = true;
+ this.selected_option_count = null;
+ this.results_data = SelectParser.select_to_array(this.form_field);
+ if (this.is_multiple) {
+ this.search_choices.find("li.search-choice").remove();
+ } else if (!this.is_multiple) {
+ this.single_set_selected_text();
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
+ this.search_field[0].readOnly = true;
+ this.container.addClass("chosen-container-single-nosearch");
+ } else {
+ this.search_field[0].readOnly = false;
+ this.container.removeClass("chosen-container-single-nosearch");
+ }
+ }
+ this.update_results_content(this.results_option_build({
+ first: true
+ }));
+ this.search_field_disabled();
+ this.show_search_field_default();
+ this.search_field_scale();
+ return this.parsing = false;
+ };
+
+ Chosen.prototype.result_do_highlight = function(el) {
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
+ if (el.length) {
+ this.result_clear_highlight();
+ this.result_highlight = el;
+ this.result_highlight.addClass("highlighted");
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
+ visible_top = this.search_results.scrollTop();
+ visible_bottom = maxHeight + visible_top;
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
+ high_bottom = high_top + this.result_highlight.outerHeight();
+ if (high_bottom >= visible_bottom) {
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
+ } else if (high_top < visible_top) {
+ return this.search_results.scrollTop(high_top);
+ }
+ }
+ };
+
+ Chosen.prototype.result_clear_highlight = function() {
+ if (this.result_highlight) {
+ this.result_highlight.removeClass("highlighted");
+ }
+ return this.result_highlight = null;
+ };
+
+ Chosen.prototype.results_show = function() {
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
+ this.form_field_jq.trigger("chosen:maxselected", {
+ chosen: this
+ });
+ return false;
+ }
+ this.container.addClass("chosen-with-drop");
+ this.results_showing = true;
+ this.search_field.focus();
+ this.search_field.val(this.search_field.val());
+ this.winnow_results();
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
+ chosen: this
+ });
+ };
+
+ Chosen.prototype.update_results_content = function(content) {
+ return this.search_results.html(content);
+ };
+
+ Chosen.prototype.results_hide = function() {
+ if (this.results_showing) {
+ this.result_clear_highlight();
+ this.container.removeClass("chosen-with-drop");
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
+ chosen: this
+ });
+ }
+ return this.results_showing = false;
+ };
+
+ Chosen.prototype.set_tab_index = function(el) {
+ var ti;
+ if (this.form_field.tabIndex) {
+ ti = this.form_field.tabIndex;
+ this.form_field.tabIndex = -1;
+ return this.search_field[0].tabIndex = ti;
+ }
+ };
+
+ Chosen.prototype.set_label_behavior = function() {
+ var _this = this;
+ this.form_field_label = this.form_field_jq.parents("label");
+ if (!this.form_field_label.length && this.form_field.id.length) {
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
+ }
+ if (this.form_field_label.length > 0) {
+ return this.form_field_label.bind('click.chosen', function(evt) {
+ if (_this.is_multiple) {
+ return _this.container_mousedown(evt);
+ } else {
+ return _this.activate_field();
+ }
+ });
+ }
+ };
+
+ Chosen.prototype.show_search_field_default = function() {
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
+ this.search_field.val(this.default_text);
+ return this.search_field.addClass("default");
+ } else {
+ this.search_field.val("");
+ return this.search_field.removeClass("default");
+ }
+ };
+
+ Chosen.prototype.search_results_mouseup = function(evt) {
+ var target;
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
+ if (target.length) {
+ this.result_highlight = target;
+ this.result_select(evt);
+ return this.search_field.focus();
+ }
+ };
+
+ Chosen.prototype.search_results_mouseover = function(evt) {
+ var target;
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
+ if (target) {
+ return this.result_do_highlight(target);
+ }
+ };
+
+ Chosen.prototype.search_results_mouseout = function(evt) {
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
+ return this.result_clear_highlight();
+ }
+ };
+
+ Chosen.prototype.choice_build = function(item) {
+ var choice, close_link,
+ _this = this;
+ choice = $('', {
+ "class": "search-choice"
+ }).html("" + (this.choice_label(item)) + "");
+ if (item.disabled) {
+ choice.addClass('search-choice-disabled');
+ } else {
+ close_link = $('', {
+ "class": 'search-choice-close',
+ 'data-option-array-index': item.array_index
+ });
+ close_link.bind('click.chosen', function(evt) {
+ return _this.choice_destroy_link_click(evt);
+ });
+ choice.append(close_link);
+ }
+ return this.search_container.before(choice);
+ };
+
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
+ evt.preventDefault();
+ evt.stopPropagation();
+ if (!this.is_disabled) {
+ return this.choice_destroy($(evt.target));
+ }
+ };
+
+ Chosen.prototype.choice_destroy = function(link) {
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
+ this.show_search_field_default();
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
+ this.results_hide();
+ }
+ link.parents('li').first().remove();
+ return this.search_field_scale();
+ }
+ };
+
+ Chosen.prototype.results_reset = function() {
+ this.reset_single_select_options();
+ this.form_field.options[0].selected = true;
+ this.single_set_selected_text();
+ this.show_search_field_default();
+ this.results_reset_cleanup();
+ this.form_field_jq.trigger("change");
+ if (this.active_field) {
+ return this.results_hide();
+ }
+ };
+
+ Chosen.prototype.results_reset_cleanup = function() {
+ this.current_selectedIndex = this.form_field.selectedIndex;
+ return this.selected_item.find("abbr").remove();
+ };
+
+ Chosen.prototype.result_select = function(evt) {
+ var high, item;
+ if (this.result_highlight) {
+ high = this.result_highlight;
+ this.result_clear_highlight();
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
+ this.form_field_jq.trigger("chosen:maxselected", {
+ chosen: this
+ });
+ return false;
+ }
+ if (this.is_multiple) {
+ high.removeClass("active-result");
+ } else {
+ this.reset_single_select_options();
+ }
+ high.addClass("result-selected");
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
+ item.selected = true;
+ this.form_field.options[item.options_index].selected = true;
+ this.selected_option_count = null;
+ if (this.is_multiple) {
+ this.choice_build(item);
+ } else {
+ this.single_set_selected_text(this.choice_label(item));
+ }
+ if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
+ this.results_hide();
+ }
+ this.show_search_field_default();
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
+ this.form_field_jq.trigger("change", {
+ 'selected': this.form_field.options[item.options_index].value
+ });
+ }
+ this.current_selectedIndex = this.form_field.selectedIndex;
+ evt.preventDefault();
+ return this.search_field_scale();
+ }
+ };
+
+ Chosen.prototype.single_set_selected_text = function(text) {
+ if (text == null) {
+ text = this.default_text;
+ }
+ if (text === this.default_text) {
+ this.selected_item.addClass("chosen-default");
+ } else {
+ this.single_deselect_control_build();
+ this.selected_item.removeClass("chosen-default");
+ }
+ return this.selected_item.find("span").html(text);
+ };
+
+ Chosen.prototype.result_deselect = function(pos) {
+ var result_data;
+ result_data = this.results_data[pos];
+ if (!this.form_field.options[result_data.options_index].disabled) {
+ result_data.selected = false;
+ this.form_field.options[result_data.options_index].selected = false;
+ this.selected_option_count = null;
+ this.result_clear_highlight();
+ if (this.results_showing) {
+ this.winnow_results();
+ }
+ this.form_field_jq.trigger("change", {
+ deselected: this.form_field.options[result_data.options_index].value
+ });
+ this.search_field_scale();
+ return true;
+ } else {
+ return false;
+ }
+ };
+
+ Chosen.prototype.single_deselect_control_build = function() {
+ if (!this.allow_single_deselect) {
+ return;
+ }
+ if (!this.selected_item.find("abbr").length) {
+ this.selected_item.find("span").first().after("");
+ }
+ return this.selected_item.addClass("chosen-single-with-deselect");
+ };
+
+ Chosen.prototype.get_search_text = function() {
+ return $('').text($.trim(this.search_field.val())).html();
+ };
+
+ Chosen.prototype.winnow_results_set_highlight = function() {
+ var do_high, selected_results;
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
+ if (do_high != null) {
+ return this.result_do_highlight(do_high);
+ }
+ };
+
+ Chosen.prototype.no_results = function(terms) {
+ var no_results_html;
+ no_results_html = $('' + this.results_none_found + ' ""');
+ no_results_html.find("span").first().html(terms);
+ this.search_results.append(no_results_html);
+ return this.form_field_jq.trigger("chosen:no_results", {
+ chosen: this
+ });
+ };
+
+ Chosen.prototype.no_results_clear = function() {
+ return this.search_results.find(".no-results").remove();
+ };
+
+ Chosen.prototype.keydown_arrow = function() {
+ var next_sib;
+ if (this.results_showing && this.result_highlight) {
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
+ if (next_sib) {
+ return this.result_do_highlight(next_sib);
+ }
+ } else {
+ return this.results_show();
+ }
+ };
+
+ Chosen.prototype.keyup_arrow = function() {
+ var prev_sibs;
+ if (!this.results_showing && !this.is_multiple) {
+ return this.results_show();
+ } else if (this.result_highlight) {
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
+ if (prev_sibs.length) {
+ return this.result_do_highlight(prev_sibs.first());
+ } else {
+ if (this.choices_count() > 0) {
+ this.results_hide();
+ }
+ return this.result_clear_highlight();
+ }
+ }
+ };
+
+ Chosen.prototype.keydown_backstroke = function() {
+ var next_available_destroy;
+ if (this.pending_backstroke) {
+ this.choice_destroy(this.pending_backstroke.find("a").first());
+ return this.clear_backstroke();
+ } else {
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
+ this.pending_backstroke = next_available_destroy;
+ if (this.single_backstroke_delete) {
+ return this.keydown_backstroke();
+ } else {
+ return this.pending_backstroke.addClass("search-choice-focus");
+ }
+ }
+ }
+ };
+
+ Chosen.prototype.clear_backstroke = function() {
+ if (this.pending_backstroke) {
+ this.pending_backstroke.removeClass("search-choice-focus");
+ }
+ return this.pending_backstroke = null;
+ };
+
+ Chosen.prototype.keydown_checker = function(evt) {
+ var stroke, _ref1;
+ stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
+ this.search_field_scale();
+ if (stroke !== 8 && this.pending_backstroke) {
+ this.clear_backstroke();
+ }
+ switch (stroke) {
+ case 8:
+ this.backstroke_length = this.search_field.val().length;
+ break;
+ case 9:
+ if (this.results_showing && !this.is_multiple) {
+ this.result_select(evt);
+ }
+ this.mouse_on_container = false;
+ break;
+ case 13:
+ if (this.results_showing) {
+ evt.preventDefault();
+ }
+ break;
+ case 32:
+ if (this.disable_search) {
+ evt.preventDefault();
+ }
+ break;
+ case 38:
+ evt.preventDefault();
+ this.keyup_arrow();
+ break;
+ case 40:
+ evt.preventDefault();
+ this.keydown_arrow();
+ break;
+ }
+ };
+
+ Chosen.prototype.search_field_scale = function() {
+ var div, f_width, h, style, style_block, styles, w, _i, _len;
+ if (this.is_multiple) {
+ h = 0;
+ w = 0;
+ style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
+ styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
+ for (_i = 0, _len = styles.length; _i < _len; _i++) {
+ style = styles[_i];
+ style_block += style + ":" + this.search_field.css(style) + ";";
+ }
+ div = $('', {
+ 'style': style_block
+ });
+ div.text(this.search_field.val());
+ $('body').append(div);
+ w = div.width() + 25;
+ div.remove();
+ f_width = this.container.outerWidth();
+ if (w > f_width - 10) {
+ w = f_width - 10;
+ }
+ return this.search_field.css({
+ 'width': w + 'px'
+ });
+ }
+ };
+
+ return Chosen;
+
+ })(AbstractChosen);
+
+}).call(this);
diff --git a/javascript/chosen/chosen.jquery.min.js b/javascript/chosen/chosen.jquery.min.js
new file mode 100755
index 0000000..806018e
--- /dev/null
+++ b/javascript/chosen/chosen.jquery.min.js
@@ -0,0 +1,2 @@
+/* Chosen v1.6.2 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
+(function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),title:a.title?a.title:void 0,children:0,disabled:a.disabled,classes:a.className}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,title:a.title?a.title:void 0,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,group_label:null!=b?this.parsed[b].label:null,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1},AbstractChosen.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.choice_label=function(a){return this.include_group_label_in_selected&&null!=a.group_label?""+a.group_label+""+a.html:a.html},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(a){var b=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(a){var b=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return b.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f,g,h;for(b="",e=0,h=this.results_data,f=0,g=h.length;g>f&&(c=h[f],d="",d=c.group?this.result_add_group(c):this.result_add_option(c),""!==d&&(e++,b+=d),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(c))),!(e>=this.max_shown_results));f++);return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match&&this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.style.cssText=a.style,c.setAttribute("data-option-array-index",a.array_index),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.result_add_group=function(a){var b,c;return(a.search_match||a.group_match)&&a.active_options>0?(b=[],b.push("group-result"),a.classes&&b.push(a.classes),c=document.createElement("li"),c.className=b.join(" "),c.innerHTML=a.search_text,a.title&&(c.title=a.title),this.outerHTML(c)):""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.reset_single_select_options=function(){var a,b,c,d,e;for(d=this.results_data,e=[],b=0,c=d.length;c>b;b++)a=d[b],a.selected?e.push(a.selected=!1):e.push(void 0);return e},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l;for(this.no_results_clear(),d=0,f=this.get_search_text(),a=f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),i=new RegExp(a,"i"),c=this.get_search_regex(a),l=this.results_data,j=0,k=l.length;k>j;j++)b=l[j],b.search_match=!1,e=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(e=this.results_data[b.group_array_index],0===e.active_options&&e.search_match&&(d+=1),e.active_options+=1),b.search_text=b.group?b.label:b.html,(!b.group||this.group_search)&&(b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(d+=1),b.search_match?(f.length&&(g=b.search_text.search(i),h=b.search_text.substr(0,g+f.length)+""+b.search_text.substr(g+f.length),b.search_text=h.substr(0,g)+""+h.substr(g)),null!=e&&(e.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>d&&f.length?(this.update_results_content(""),this.no_results(f)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.get_search_regex=function(a){var b,c;return b=this.search_contains?"":"^",c=this.case_sensitive_search?"":"i",new RegExp(b+a,c)},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},AbstractChosen.prototype.clipboard_event_checker=function(a){var b=this;return setTimeout(function(){return b.results_search()},50)},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.prototype.search_results_touchstart=function(a){return this.touch_started=!0,this.search_results_mouseover(a)},AbstractChosen.prototype.search_results_touchmove=function(a){return this.touch_started=!1,this.search_results_mouseout(a)},AbstractChosen.prototype.search_results_touchend=function(a){return this.touch_started?this.search_results_mouseup(a):void 0},AbstractChosen.prototype.outerHTML=function(a){var b;return a.outerHTML?a.outerHTML:(b=document.createElement("div"),b.appendChild(a),b.innerHTML)},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(c){var d,e;return d=a(this),e=d.data("chosen"),"destroy"===b?void(e instanceof Chosen&&e.destroy()):void(e instanceof Chosen||d.data("chosen",new Chosen(this,b)))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("",c),this.is_multiple?this.container.html(''):this.container.html(''+this.default_text+'
'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},Chosen.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("touchstart.chosen",function(b){return a.container_mousedown(b),b.preventDefault()}),this.container.bind("touchend.chosen",function(b){return a.container_mouseup(b),b.preventDefault()}),this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.search_results.bind("touchstart.chosen",function(b){a.search_results_touchstart(b)}),this.search_results.bind("touchmove.chosen",function(b){a.search_results_touchmove(b)}),this.search_results.bind("touchend.chosen",function(b){a.search_results_touchend(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.form_field_jq.bind("chosen:close.chosen",function(b){a.input_blur(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.search_field.bind("cut.chosen",function(b){a.clipboard_event_checker(b)}),this.search_field.bind("paste.chosen",function(b){a.clipboard_event_checker(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b;return a.originalEvent&&(b=a.originalEvent.deltaY||-a.originalEvent.wheelDelta||a.originalEvent.detail),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(a){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(this.container[0].ownerDocument).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){var c;return c=a(b.target).closest(".chosen-container"),c.length&&this.container[0]===c[0]?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(a){var b;return this.form_field.tabIndex?(b=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=b):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("",{"class":"search-choice"}).html(""+this.choice_label(b)+""),b.disabled?c.addClass("search-choice-disabled"):(d=a("",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):this.reset_single_select_options(),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(this.choice_label(c)),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,a.preventDefault(),this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return a("").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a(''+this.results_none_found+' ""'),c.find("span").first().html(b),this.search_results.append(c),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:this.results_showing&&a.preventDefault();break;case 32:this.disable_search&&a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}).call(this);
\ No newline at end of file
diff --git a/javascript/chosen/chosen.min.css b/javascript/chosen/chosen.min.css
new file mode 100755
index 0000000..60b1171
--- /dev/null
+++ b/javascript/chosen/chosen.min.css
@@ -0,0 +1,3 @@
+/* Chosen v1.6.2 | (c) 2011-2016 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
+
+.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;box-shadow:0 4px 5px rgba(0,0,0,.15)}.chosen-container.chosen-with-drop .chosen-drop{left:0}.chosen-container a{cursor:pointer}.chosen-container .search-choice .group-name,.chosen-container .chosen-single .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .search-choice .group-name:after,.chosen-container .chosen-single .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),color-stop(100%,#f4f4f4));background:-webkit-linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-moz-linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:-o-linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:#fff url(chosen-sprite.png) no-repeat 100% -20px;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:-webkit-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-moz-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:-o-linear-gradient(#3875d7 20%,#2a62bc 90%);background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(#eee 1%,#fff 15%);background-image:-moz-linear-gradient(#eee 1%,#fff 15%);background-image:-o-linear-gradient(#eee 1%,#fff 15%);background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:transparent!important;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-o-linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(20%,#eee),color-stop(80%,#fff));background-image:-webkit-linear-gradient(#eee 20%,#fff 80%);background-image:-moz-linear-gradient(#eee 20%,#fff 80%);background-image:-o-linear-gradient(#eee 20%,#fff 80%);background-image:linear-gradient(#eee 20%,#fff 80%);box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:0;background:transparent}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single-nosearch .chosen-search,.chosen-rtl .chosen-drop{left:9999px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:0}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:#fff url(chosen-sprite.png) no-repeat -30px -20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-rtl .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-container-single .chosen-search input[type=text],.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
\ No newline at end of file
diff --git a/templates/BootstrapDropdownField.ss b/templates/BootstrapDropdownField.ss
deleted file mode 100644
index 593b71a..0000000
--- a/templates/BootstrapDropdownField.ss
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
\ No newline at end of file