|
67 | 67 | } |
68 | 68 | }; |
69 | 69 |
|
70 | | - nextUid=(function() { var counter=1; return function() { return counter++; }}()); |
| 70 | + nextUid=(function() { var counter=1; return function() { return counter++; }; }()); |
71 | 71 |
|
72 | 72 | function indexOf(value, array) { |
73 | 73 | var i = 0, l = array.length, v; |
|
518 | 518 | populate(results, 0); |
519 | 519 |
|
520 | 520 | children=container.children(); |
521 | | - if (children.length==0) { |
| 521 | + if (children.length===0) { |
522 | 522 | container.html(markup.join("")); |
523 | 523 | } else { |
524 | 524 | $(children[children.length-1]).append(markup.join("")); |
|
659 | 659 | width: width |
660 | 660 | } |
661 | 661 | if (this.opts.dropdownZIndex !== undefined) { |
662 | | - css["z-index"] = this.opts.dropdownZIndex |
| 662 | + css["z-index"] = this.opts.dropdownZIndex; |
663 | 663 | } |
664 | 664 | this.dropdown.css(css); |
665 | 665 | }, |
|
1038 | 1038 | killEvent(e); |
1039 | 1039 | } |
1040 | 1040 | })); |
1041 | | - containers.delegate(selector, "focus", function () { if (this.enabled) { containerGroup.addClass("select2-container-active"); dropdown.addClass("select2-drop-active"); }}); |
| 1041 | + containers.delegate(selector, "focus", function () { if (this.enabled) { containers.addClass("select2-container-active"); dropdown.addClass("select2-drop-active"); }}); |
1042 | 1042 | containers.delegate(selector, "blur", this.bind(function () { |
1043 | 1043 | if (clickingInside) return; |
1044 | 1044 | if (!this.opened()) this.blur(); |
|
1350 | 1350 | clearSearch: function () { |
1351 | 1351 | var placeholder = this.getPlaceholder(); |
1352 | 1352 |
|
1353 | | - if (placeholder !== undefined |
1354 | | - && this.getVal().length === 0 |
1355 | | - && this.search.hasClass("select2-focused") === false) { |
| 1353 | + if (placeholder !== undefined && this.getVal().length === 0 && this.search.hasClass("select2-focused") === false) { |
1356 | 1354 |
|
1357 | 1355 | this.search.val(placeholder).addClass("select2-default"); |
1358 | 1356 | // stretch the search box to full width of the container so as much of the placeholder is visible as possible |
|
0 commit comments