diff --git a/vendor/assets/javascripts/bootstrap-select.js b/vendor/assets/javascripts/bootstrap-select.js index c88d9cf..1492999 100755 --- a/vendor/assets/javascripts/bootstrap-select.js +++ b/vendor/assets/javascripts/bootstrap-select.js @@ -5,22 +5,22 @@ * 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 (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'; @@ -1284,7 +1284,12 @@ 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()) + '")'); + $.each($searchBase, function () { + if (normalizeToBase(htmlEscape($(this).text())).indexOf(normalizeToBase(htmlEscape(that.$searchbox.val()))) > -1) + { + $searchBase= $searchBase.not($(this)) + } + }); } else { $searchBase = $searchBase.not(':' + that._searchStyle() + '("' + that.$searchbox.val() + '")'); } @@ -1730,6 +1735,6 @@ }) }); })(jQuery); - - -})); + + +}));