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

Commit b46ff57

Browse files
author
Brian Feister
committed
Release 0.9.6
1 parent 81079b0 commit b46ff57

File tree

6 files changed

+48
-13
lines changed

6 files changed

+48
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui-select",
3-
"version": "0.9.5",
3+
"version": "0.9.6",
44
"homepage": "https://github.com/angular-ui/ui-select",
55
"authors": [
66
"AngularUI"

dist/select.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*!
2+
* ui-select
3+
* http://github.com/angular-ui/ui-select
4+
* Version: 0.9.6 - 2015-01-12T20:21:26.664Z
5+
* License: MIT
6+
*/
7+
8+
19
/*!
210
* ui-select
311
* http://github.com/angular-ui/ui-select
@@ -80,6 +88,17 @@
8088
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
8189
}
8290

91+
.ui-select-bootstrap .ui-select-toggle {
92+
position: relative;
93+
}
94+
95+
.ui-select-bootstrap .ui-select-toggle > .caret {
96+
position: absolute;
97+
height: 100%;
98+
top: 50%;
99+
right: 10px;
100+
margin-top: -2px;
101+
}
83102

84103
/* Fix Bootstrap dropdown position when inside a input-group */
85104
.input-group > .ui-select-bootstrap.dropdown {

dist/select.js

Lines changed: 19 additions & 8 deletions
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.5 - 2014-12-12T16:07:20.856Z
4+
* Version: 0.9.6 - 2015-01-12T20:21:26.660Z
55
* License: MIT
66
*/
77

@@ -418,7 +418,8 @@
418418
item = ctrl.tagging.fct(ctrl.search);
419419
// if item type is 'string', apply the tagging label
420420
} else if ( typeof item === 'string' ) {
421-
item = item.replace(ctrl.taggingLabel,'');
421+
// trim the trailing space
422+
item = item.replace(ctrl.taggingLabel,'').trim();
422423
}
423424
}
424425
}
@@ -439,9 +440,11 @@
439440
ctrl.selected = item;
440441
}
441442

442-
ctrl.onSelectCallback($scope, {
443+
$timeout(function(){
444+
ctrl.onSelectCallback($scope, {
443445
$item: item,
444446
$model: ctrl.parserResult.modelMapper($scope, locals)
447+
});
445448
});
446449

447450
if (!ctrl.multiple || ctrl.closeOnSelect) {
@@ -503,9 +506,12 @@
503506
ctrl.activeMatchIndex = -1;
504507
ctrl.sizeSearchInput();
505508

506-
ctrl.onRemoveCallback($scope, {
507-
$item: removedChoice,
508-
$model: ctrl.parserResult.modelMapper($scope, locals)
509+
// Give some time for scope propagation.
510+
$timeout(function(){
511+
ctrl.onRemoveCallback($scope, {
512+
$item: removedChoice,
513+
$model: ctrl.parserResult.modelMapper($scope, locals)
514+
});
509515
});
510516
};
511517

@@ -1111,8 +1117,13 @@
11111117
if (oldValue != newValue)
11121118
ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters
11131119
});
1120+
$select.firstPass = true; // so the form doesn't get dirty as soon as it loads
11141121
scope.$watchCollection('$select.selected', function() {
1115-
ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes
1122+
if (!$select.firstPass) {
1123+
ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes
1124+
} else {
1125+
$select.firstPass = false;
1126+
}
11161127
});
11171128
focusser.prop('disabled', true); //Focusser isn't needed if multiple
11181129
}else{
@@ -1314,7 +1325,7 @@
13141325

13151326
angular.module("ui.select").run(["$templateCache", function($templateCache) {$templateCache.put("bootstrap/choices.tpl.html","<ul class=\"ui-select-choices ui-select-choices-content dropdown-menu\" role=\"menu\" aria-labelledby=\"dLabel\" ng-show=\"$select.items.length > 0\"><li class=\"ui-select-choices-group\"><div class=\"divider\" ng-show=\"$select.isGrouped && $index > 0\"></div><div ng-show=\"$select.isGrouped\" class=\"ui-select-choices-group-label dropdown-header\" ng-bind-html=\"$group.name\"></div><div class=\"ui-select-choices-row\" ng-class=\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\"><a href=\"javascript:void(0)\" class=\"ui-select-choices-row-inner\"></a></div></li></ul>");
13161327
$templateCache.put("bootstrap/match-multiple.tpl.html","<span class=\"ui-select-match\"><span ng-repeat=\"$item in $select.selected\"><span style=\"margin-right: 3px;\" class=\"ui-select-match-item btn btn-default btn-xs\" tabindex=\"-1\" type=\"button\" ng-disabled=\"$select.disabled\" ng-click=\"$select.activeMatchIndex = $index;\" ng-class=\"{\'btn-primary\':$select.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}\"><span class=\"close ui-select-match-close\" ng-hide=\"$select.disabled\" ng-click=\"$select.removeChoice($index)\">&nbsp;&times;</span> <span uis-transclude-append=\"\"></span></span></span></span>");
1317-
$templateCache.put("bootstrap/match.tpl.html","<div class=\"btn-group ui-select-match btn-block\" ng-hide=\"$select.open\" ng-disabled=\"$select.disabled\" ng-class=\"{\'btn-default-focus\':$select.focus}\"><button type=\"button\" class=\"btn btn-default\" ng-class=\"{\'col-sm-8 col-md-10\': $select.allowClear && !$select.isEmpty(),\'col-sm-10 col-md-11\': !$select.allowClear || $select.isEmpty()}\" tabindex=\"-1\" ;=\"\" ng-click=\"$select.activate()\"><span ng-show=\"$select.isEmpty()\" class=\"text-muted\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" ng-transclude=\"\"></span></button> <button class=\"btn btn-default col-sm-2 col-md-1\" ng-if=\"$select.allowClear && !$select.isEmpty()\" ng-click=\"$select.select(undefined)\"><span class=\"glyphicon glyphicon-remove ui-select-toggle\"></span></button> <button class=\"btn btn-default col-sm-2 col-md-1\" ng-click=\"$select.activate()\"><span class=\"caret ui-select-toggle\" ng-click=\"$select.toggle($event)\"></span></button></div>");
1328+
$templateCache.put("bootstrap/match.tpl.html","<div class=\"ui-select-match\" ng-hide=\"$select.open\" ng-disabled=\"$select.disabled\" ng-class=\"{\'btn-default-focus\':$select.focus}\"><button type=\"button\" class=\"btn btn-default btn-block ui-select-toggle\" tabindex=\"-1\" ;=\"\" ng-disabled=\"$select.disabled\" ng-click=\"$select.activate()\"><span ng-show=\"$select.isEmpty()\" class=\"ui-select-placeholder text-muted\">{{$select.placeholder}}</span> <span ng-hide=\"$select.isEmpty()\" class=\"ui-select-match-text\" ng-class=\"{\'ui-select-allow-clear\': $select.allowClear && !$select.isEmpty()}\" ng-transclude=\"\"></span> <i class=\"caret pull-right\" ng-click=\"$select.toggle($event)\"></i></button> <button class=\"ui-select-clear\" ng-if=\"$select.allowClear && !$select.isEmpty()\" ng-click=\"$select.select(undefined)\"><i class=\"glyphicon glyphicon-remove\"></i></button></div>");
13181329
$templateCache.put("bootstrap/select-multiple.tpl.html","<div class=\"ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control\" ng-class=\"{open: $select.open}\"><div><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search input-xs\" placeholder=\"{{$select.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-hide=\"$select.disabled\" ng-click=\"$select.activate()\" ng-model=\"$select.search\"></div><div class=\"ui-select-choices\"></div></div>");
13191330
$templateCache.put("bootstrap/select.tpl.html","<div class=\"ui-select-container ui-select-bootstrap dropdown\" ng-class=\"{open: $select.open}\"><div class=\"ui-select-match\"></div><input type=\"text\" autocomplete=\"off\" tabindex=\"-1\" class=\"form-control ui-select-search\" placeholder=\"{{$select.placeholder}}\" ng-model=\"$select.search\" ng-show=\"$select.searchEnabled && $select.open\"><div class=\"ui-select-choices\"></div></div>");
13201331
$templateCache.put("select2/choices.tpl.html","<ul class=\"ui-select-choices ui-select-choices-content select2-results\"><li class=\"ui-select-choices-group\" ng-class=\"{\'select2-result-with-children\': $select.choiceGrouped($group) }\"><div ng-show=\"$select.choiceGrouped($group)\" class=\"ui-select-choices-group-label select2-result-label\" ng-bind-html=\"$group.name\"></div><ul ng-class=\"{\'select2-result-sub\': $select.choiceGrouped($group), \'select2-result-single\': !$select.choiceGrouped($group) }\"><li class=\"ui-select-choices-row\" ng-class=\"{\'select2-highlighted\': $select.isActive(this), \'select2-disabled\': $select.isDisabled(this)}\"><div class=\"select2-result-label ui-select-choices-row-inner\"></div></li></ul></li></ul>");

dist/select.min.css

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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.5",
9+
"version": "0.9.6",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"del": "~0.1.1",

0 commit comments

Comments
 (0)