Skip to content

Commit

Permalink
Release v1.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Dec 11, 2018
1 parent b6f2788 commit 88d13e5
Show file tree
Hide file tree
Showing 170 changed files with 807 additions and 461 deletions.
54 changes: 48 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# v1.13.4 (2018-12-11)

### Bug Fixes
- [#1710]: When listening for keydown event on .bs-searchbox, ensure it is a child of .bootstrap-select
- [#1943]: Option dropdownAlignRight auto doesn't work
- [#2034]: Uncaught TypeError: Cannot read property '0' of undefined
- [#2082]: button vertical alignment
- [#2105]: Dynamically added picker causes resize JS error
- [#2118]: Memory leak: getPlacement resize & scroll
- [#2140]: data-hidden broken in v1.13.0
- [#2151]: This plugins broken when the version of IE below 10

### Documentation
- [#2125]: add styleBase option to documentation

### New Features
- [#767], [#1876], [#2026]: Improve/expand liveSearchNormalize
- [#2120], [#2121], [#2152] - replace JSHint with ESLint (clean up code)
- [#1910]: Amharic locale
- [#1926]: Latvian locale

[#767]: https://github.com/snapappointments/bootstrap-select/issues/767
[#1876]: https://github.com/snapappointments/bootstrap-select/issues/1876
[#2026]: https://github.com/snapappointments/bootstrap-select/issues/2026
[#1710]: https://github.com/snapappointments/bootstrap-select/issues/1710
[#1943]: https://github.com/snapappointments/bootstrap-select/issues/1943
[#2034]: https://github.com/snapappointments/bootstrap-select/issues/2034
[#2082]: https://github.com/snapappointments/bootstrap-select/issues/2082
[#2105]: https://github.com/snapappointments/bootstrap-select/issues/2105
[#2118]: https://github.com/snapappointments/bootstrap-select/issues/2118
[#2140]: https://github.com/snapappointments/bootstrap-select/issues/2140
[#2151]: https://github.com/snapappointments/bootstrap-select/issues/2151
[#2125]: https://github.com/snapappointments/bootstrap-select/issues/2125

[#1910]: https://github.com/snapappointments/bootstrap-select/pull/1910
[#1926]: https://github.com/snapappointments/bootstrap-select/pull/1926
[#2120]: https://github.com/snapappointments/bootstrap-select/pull/2120
[#2121]: https://github.com/snapappointments/bootstrap-select/pull/2121
[#2152]: https://github.com/snapappointments/bootstrap-select/pull/2152

-------------------

# v1.13.3 (2018-10-15)

### Bug Fixes
Expand All @@ -8,12 +50,12 @@
- [#2092]: Cannot read property 'className' of undefined
- [#2101]: Extra tick mark when using livesearch in Bootstrap 4

[#1425]: https://github.com/snapappointments/bootstrap-select/issues/#1425
[#1828]: https://github.com/snapappointments/bootstrap-select/issues/#1828
[#2045]: https://github.com/snapappointments/bootstrap-select/issues/#2045
[#2086]: https://github.com/snapappointments/bootstrap-select/issues/#2086
[#2092]: https://github.com/snapappointments/bootstrap-select/issues/#2092
[#2101]: https://github.com/snapappointments/bootstrap-select/issues/#2101
[#1425]: https://github.com/snapappointments/bootstrap-select/issues/1425
[#1828]: https://github.com/snapappointments/bootstrap-select/issues/1828
[#2045]: https://github.com/snapappointments/bootstrap-select/issues/2045
[#2086]: https://github.com/snapappointments/bootstrap-select/issues/2086
[#2092]: https://github.com/snapappointments/bootstrap-select/issues/2092
[#2101]: https://github.com/snapappointments/bootstrap-select/issues/2101

-------------------

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Bootstrap-select requires jQuery v1.9.1+, Bootstrap’s dropdown.js component, a

Several quick start options are available:

- [Download the latest release.](https://github.com/snapappointments/bootstrap-select/archive/v1.13.3.zip)
- [Download the latest release.](https://github.com/snapappointments/bootstrap-select/archive/v1.13.4.zip)
- Clone the repo: `git clone https://github.com/snapappointments/bootstrap-select.git`
- Install with [npm](https://www.npmjs.com/package/bootstrap-select): `npm install bootstrap-select`
- Install with [yarn](https://yarn.pm/bootstrap-select): `yarn add bootstrap-select`
Expand All @@ -54,13 +54,13 @@ Several quick start options are available:

```html
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.3/css/bootstrap-select.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.4/css/bootstrap-select.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.3/js/bootstrap-select.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.4/js/bootstrap-select.min.js"></script>

<!-- (Optional) Latest compiled and minified JavaScript translation files -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.3/js/i18n/defaults-*.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.4/js/i18n/defaults-*.min.js"></script>
```
> The CDN is updated after the release is made public, which means that there is a delay between the publishing of a release and its availability on the CDN.
Expand Down
2 changes: 1 addition & 1 deletion dist/css/bootstrap-select.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap-select.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 75 additions & 15 deletions dist/js/bootstrap-select.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand All @@ -25,6 +25,57 @@
(function ($) {
'use strict';

// Polyfill for browsers with no classList support
// Remove in v2
if (!('classList' in document.createElement('_'))) {
(function (view) {
if (!('Element' in view)) return;

var classListProp = 'classList',
protoProp = 'prototype',
elemCtrProto = view.Element[protoProp],
objCtr = Object,
classListGetter = function () {
var $elem = $(this);

return {
add: function (classes) {
return $elem.addClass(classes);
},
remove: function (classes) {
return $elem.removeClass(classes);
},
toggle: function (classes, force) {
return $elem.toggleClass(classes, force);
},
contains: function (classes) {
return $elem.hasClass(classes);
}
}
};

if (objCtr.defineProperty) {
var classListPropDesc = {
get: classListGetter,
enumerable: true,
configurable: true
};
try {
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
} catch (ex) { // IE 8 doesn't support enumerable:true
// adding undefined to fight this issue https://github.com/eligrey/classList.js/issues/36
// modernie IE8-MSW7 machine has IE8 8.0.6001.18702 and is affected
if (ex.number === undefined || ex.number === -0x7FF5EC54) {
classListPropDesc.enumerable = false;
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
}
}
} else if (objCtr[protoProp].__defineGetter__) {
elemCtrProto.__defineGetter__(classListProp, classListGetter);
}
}(window));
}

var testElement = document.createElement('_');

testElement.classList.toggle('c3', false);
Expand All @@ -43,6 +94,8 @@
};
}

testElement = null;

// shallow array comparison
function isEqual (array1, array2) {
return array1.length === array2.length && array1.every(function (element, index) {
Expand Down Expand Up @@ -547,7 +600,7 @@
this.init();
};

Selectpicker.VERSION = '1.13.3';
Selectpicker.VERSION = '1.13.4';

Selectpicker.BootstrapVersion = version.major;

Expand Down Expand Up @@ -1013,6 +1066,7 @@
createLi: function () {
var that = this,
mainElements = [],
hiddenOptions = {},
widestOption,
availableOptionsCount = 0,
widestOptionLength = 0,
Expand Down Expand Up @@ -1217,7 +1271,7 @@

var parentData = $parent.data();

if (thisData.hidden === true || (that.options.hideDisabled && ((isDisabled && !isOptgroup) || isOptgroupDisabled))) {
if ((thisData.hidden === true || this.hidden) || (that.options.hideDisabled && (isDisabled || isOptgroupDisabled))) {
// set prevHiddenIndex - the index of the first hidden option in a group of hidden options
// used to determine whether or not a divider should be placed after an optgroup if there are
// hidden options between the optgroup and the first visible option
Expand All @@ -1226,6 +1280,11 @@

liIndex--;

hiddenOptions[index] = {
type: 'hidden',
data: thisData
}

// if previous element is not an optgroup
if (!showDivider) {
if (prevHiddenIndex !== undefined) {
Expand Down Expand Up @@ -1269,9 +1328,16 @@
}
}

var optGroupClass = ' ' + parent.className || '';
var optGroupClass = ' ' + parent.className || '',
previousOption = this.previousElementSibling;

prevHiddenIndex = thisData.prevHiddenIndex;

if (prevHiddenIndex !== undefined) {
previousOption = $selectOptions[prevHiddenIndex].previousElementSibling;
}

if (!this.previousElementSibling) { // Is it the first option of the optgroup?
if (!previousOption) { // Is it the first option of the optgroup?
optID += 1;

// Get the opt group label
Expand Down Expand Up @@ -1313,11 +1379,6 @@
headerIndex = liIndex - 1;
}

if (that.options.hideDisabled && (isDisabled || thisData.hidden === true)) {
liIndex--;
return;
}

textElement = generateText({
text: text,
optionContent: optionContent,
Expand Down Expand Up @@ -1424,6 +1485,7 @@

this.selectpicker.main.elements = mainElements;
this.selectpicker.main.data = mainData;
this.selectpicker.main.hidden = hiddenOptions;

this.selectpicker.current = this.selectpicker.main;

Expand All @@ -1445,17 +1507,15 @@

this.tabIndex();

for (var i = 0, len = this.selectpicker.main.elements.length; i < len; i++) {
var index = this.selectpicker.main.map.originalIndex[i],
for (var index = 0, len = $selectOptions.length; index < len; index++) {
var i = that.selectpicker.main.map.newIndex[index],
option = $selectOptions[index];

if (option && option.selected) {
selectedItems.push(option);

if ((selectedItemsInTitle.length < 100 && that.options.selectedTextFormat !== 'count') || selectedItems.length === 1) {
if (that.options.hideDisabled && (option.disabled || (option.parentNode.tagName === 'OPTGROUP' && option.parentNode.disabled))) return;

var thisData = this.selectpicker.main.data[i].data,
var thisData = (that.selectpicker.main.data[i] || that.selectpicker.main.hidden[index]).data,
icon = thisData.icon && that.options.showIcon ? '<i class="' + that.options.iconBase + ' ' + thisData.icon + '"></i> ' : '',
subtext,
titleItem;
Expand Down
2 changes: 1 addition & 1 deletion dist/js/bootstrap-select.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/bootstrap-select.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-am_ET.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-am_ET.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-ar_AR.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-ar_AR.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-bg_BG.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-bg_BG.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-cs_CZ.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-cs_CZ.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-da_DK.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-da_DK.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-de_DE.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-de_DE.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-en_US.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-en_US.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-es_CL.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-es_CL.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion dist/js/i18n/defaults-es_ES.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap-select v1.13.3 (https://developer.snapappointments.com/bootstrap-select)
* Bootstrap-select v1.13.4 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2018 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
Expand Down
Loading

0 comments on commit 88d13e5

Please sign in to comment.