|
@@ -1,5 +1,5 @@
|
|
|
/*!
|
|
/*!
|
|
|
- * Bootstrap-select v1.12.3 (http://silviomoreto.github.io/bootstrap-select)
|
|
|
|
|
|
|
+ * Bootstrap-select v1.12.4 (http://silviomoreto.github.io/bootstrap-select)
|
|
|
*
|
|
*
|
|
|
* Copyright 2013-2017 bootstrap-select
|
|
* Copyright 2013-2017 bootstrap-select
|
|
|
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
|
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
|
@@ -164,12 +164,22 @@
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
var changed_arguments = null;
|
|
var changed_arguments = null;
|
|
|
|
|
+
|
|
|
|
|
+ var EventIsSupported = (function() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ new Event('change');
|
|
|
|
|
+ return true;
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ })();
|
|
|
|
|
+
|
|
|
$.fn.triggerNative = function (eventName) {
|
|
$.fn.triggerNative = function (eventName) {
|
|
|
var el = this[0],
|
|
var el = this[0],
|
|
|
event;
|
|
event;
|
|
|
|
|
|
|
|
if (el.dispatchEvent) { // for modern browsers & IE9+
|
|
if (el.dispatchEvent) { // for modern browsers & IE9+
|
|
|
- if (typeof Event === 'function') {
|
|
|
|
|
|
|
+ if (EventIsSupported) {
|
|
|
// For modern browsers
|
|
// For modern browsers
|
|
|
event = new Event(eventName, {
|
|
event = new Event(eventName, {
|
|
|
bubbles: true
|
|
bubbles: true
|
|
@@ -327,7 +337,7 @@
|
|
|
this.init();
|
|
this.init();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- Selectpicker.VERSION = '1.12.3';
|
|
|
|
|
|
|
+ Selectpicker.VERSION = '1.12.4';
|
|
|
|
|
|
|
|
// part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
|
|
// part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
|
|
|
Selectpicker.DEFAULTS = {
|
|
Selectpicker.DEFAULTS = {
|
|
@@ -369,7 +379,7 @@
|
|
|
tickIcon: 'glyphicon-ok',
|
|
tickIcon: 'glyphicon-ok',
|
|
|
showTick: false,
|
|
showTick: false,
|
|
|
template: {
|
|
template: {
|
|
|
- caret: ''
|
|
|
|
|
|
|
+ caret: '<span class="caret"></span>'
|
|
|
},
|
|
},
|
|
|
maxOptions: false,
|
|
maxOptions: false,
|
|
|
mobile: false,
|
|
mobile: false,
|
|
@@ -444,9 +454,7 @@
|
|
|
|
|
|
|
|
if (that.$element[0].hasAttribute('required')) {
|
|
if (that.$element[0].hasAttribute('required')) {
|
|
|
this.$element.on('invalid', function () {
|
|
this.$element.on('invalid', function () {
|
|
|
- that.$button
|
|
|
|
|
- .addClass('bs-invalid')
|
|
|
|
|
- .focus();
|
|
|
|
|
|
|
+ that.$button.addClass('bs-invalid');
|
|
|
|
|
|
|
|
that.$element.on({
|
|
that.$element.on({
|
|
|
'focus.bs.select': function () {
|
|
'focus.bs.select': function () {
|
|
@@ -464,6 +472,11 @@
|
|
|
that.$element.off('rendered.bs.select');
|
|
that.$element.off('rendered.bs.select');
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ that.$button.on('blur.bs.select', function() {
|
|
|
|
|
+ that.$element.focus().blur();
|
|
|
|
|
+ that.$button.off('blur.bs.select');
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -511,6 +524,7 @@
|
|
|
'<div class="btn-group bootstrap-select' + showTick + inputGroup + '">' +
|
|
'<div class="btn-group bootstrap-select' + showTick + inputGroup + '">' +
|
|
|
'<button type="button" class="' + this.options.styleBase + ' dropdown-toggle" data-toggle="dropdown"' + autofocus + ' role="button">' +
|
|
'<button type="button" class="' + this.options.styleBase + ' dropdown-toggle" data-toggle="dropdown"' + autofocus + ' role="button">' +
|
|
|
'<span class="filter-option pull-left"></span> ' +
|
|
'<span class="filter-option pull-left"></span> ' +
|
|
|
|
|
+ '<span class="bs-caret">' +
|
|
|
this.options.template.caret +
|
|
this.options.template.caret +
|
|
|
'</span>' +
|
|
'</span>' +
|
|
|
'</button>' +
|
|
'</button>' +
|