Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 011105b

Browse files
author
Brian Feister
committed
(chore): build and bump version v.0.9.2
1 parent aeb9649 commit 011105b

File tree

6 files changed

+33
-12
lines changed

6 files changed

+33
-12
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui-select",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"homepage": "https://github.com/angular-ui/ui-select",
55
"authors": [
66
"AngularUI"

dist/select.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.9.1 - 2014-12-03T16:41:44.801Z
4+
* Version: 0.9.2 - 2014-12-08T14:55:46.402Z
55
* License: MIT
66
*/
77

dist/select.js

100644100755
+27-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.9.1 - 2014-12-03T16:41:44.798Z
4+
* Version: 0.9.2 - 2014-12-08T14:55:46.399Z
55
* License: MIT
66
*/
77

@@ -623,7 +623,7 @@
623623
if ( ctrl.taggingTokens.tokens[i] === KEY.MAP[e.keyCode] ) {
624624
// make sure there is a new value to push via tagging
625625
if ( ctrl.search.length > 0 ) {
626-
ctrl.select(null, true);
626+
ctrl.select(undefined, true);
627627
_searchInput.triggerHandler('tagged');
628628
}
629629
}
@@ -712,7 +712,7 @@
712712
}
713713
// verify the the tag doesn't match the value of an existing item from
714714
// the searched data set
715-
if ( stashArr.filter( function (origItem) { return origItem.toUpperCase() === ctrl.search.toUpperCase(); }).length > 0 ) {
715+
if ( _findCaseInsensitiveDupe(stashArr) ) {
716716
// if there is a tag from prev iteration, strip it / queue the change
717717
// and return early
718718
if ( hasTag ) {
@@ -724,7 +724,7 @@
724724
}
725725
return;
726726
}
727-
if ( ctrl.selected.filter( function (selection) { return selection.toUpperCase() === ctrl.search.toUpperCase(); } ).length > 0 ) {
727+
if ( _findCaseInsensitiveDupe(stashArr) ) {
728728
// if there is a tag from prev iteration, strip it
729729
if ( hasTag ) {
730730
ctrl.items = stashArr.slice(1,stashArr.length);
@@ -760,6 +760,20 @@
760760
});
761761
});
762762

763+
function _findCaseInsensitiveDupe(arr) {
764+
if ( arr === undefined || ctrl.search === undefined ) {
765+
return false;
766+
}
767+
var hasDupe = arr.filter( function (origItem) {
768+
if ( ctrl.search.toUpperCase() === undefined ) {
769+
return false;
770+
}
771+
return origItem.toUpperCase() === ctrl.search.toUpperCase();
772+
}).length > 0;
773+
774+
return hasDupe;
775+
}
776+
763777
function _findApproxDupe(haystack, needle) {
764778
var tempArr = angular.copy(haystack);
765779
var dupeIndex = -1;
@@ -845,7 +859,14 @@
845859
attrs.multiple.toLowerCase() === 'true'
846860
);
847861

848-
$select.closeOnSelect = (angular.isDefined(attrs.closeOnSelect) && attrs.closeOnSelect.toLowerCase() === 'false') ? false : uiSelectConfig.closeOnSelect;
862+
$select.closeOnSelect = function() {
863+
if (angular.isDefined(attrs.closeOnSelect)) {
864+
return $parse(attrs.closeOnSelect)();
865+
} else {
866+
return uiSelectConfig.closeOnSelect;
867+
}
868+
}();
869+
849870
$select.onSelectCallback = $parse(attrs.onSelect);
850871
$select.onRemoveCallback = $parse(attrs.onRemove);
851872

@@ -1221,7 +1242,7 @@
12211242
attrs.$observe('placeholder', function(placeholder) {
12221243
$select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder;
12231244
});
1224-
1245+
12251246
$select.allowClear = (angular.isDefined(attrs.allowClear)) ? (attrs.allowClear === '') ? true : (attrs.allowClear.toLowerCase() === 'true') : false;
12261247

12271248
if($select.multiple){

dist/select.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

100644100755
+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"repository": {
77
"url": "git://github.com/angular-ui/ui-select.git"
88
},
9-
"version": "0.9.1",
9+
"version": "0.9.2",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"del": "~0.1.1",

0 commit comments

Comments
 (0)