Skip to content

Commit 8b2b4b7

Browse files
committed
Merge branch 'master' of github.com:angular-ui/ui-select
2 parents 7f58709 + 3e25a48 commit 8b2b4b7

File tree

3 files changed

+5
-60
lines changed

3 files changed

+5
-60
lines changed

src/common.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -317,17 +317,10 @@ body > .ui-select-bootstrap.open {
317317
}
318318

319319
/* Spinner */
320-
.ui-select-refreshing {
320+
.ui-select-refreshing.glyphicon {
321321
position: absolute;
322322
right: 0;
323323
padding: 8px 27px;
324-
top: 1px;
325-
display: inline-block;
326-
font-family: 'Glyphicons Halflings';
327-
font-style: normal;
328-
font-weight: normal;
329-
line-height: 1;
330-
-webkit-font-smoothing:antialiased;
331324
}
332325

333326
@-webkit-keyframes ui-select-spin {

src/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ var uis = angular.module('ui.select', [])
108108
},
109109
appendToBody: false,
110110
spinnerEnabled: false,
111-
spinnerClass: 'glyphicon-refresh ui-select-spin',
111+
spinnerClass: 'glyphicon glyphicon-refresh ui-select-spin',
112112
backspaceReset: true
113113
})
114114

test/select.spec.js

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
describe('ui-select tests', function() {
4-
var scope, $rootScope, $compile, $timeout, $injector, $q,uisRepeatParser, $exceptionHandler;
4+
var scope, $rootScope, $compile, $timeout, $injector, $q,uisRepeatParser;
55

66
var Key = {
77
Enter: 13,
@@ -78,14 +78,13 @@ describe('ui-select tests', function() {
7878
});
7979
});
8080

81-
beforeEach(inject(function(_$rootScope_, _$compile_, _$timeout_, _$injector_,_$q_ , _uisRepeatParser_, _$exceptionHandler_) {
81+
beforeEach(inject(function(_$rootScope_, _$compile_, _$timeout_, _$injector_,_$q_ , _uisRepeatParser_){
8282
$rootScope = _$rootScope_;
8383
scope = $rootScope.$new();
8484
$compile = _$compile_;
8585
$timeout = _$timeout_;
8686
$injector = _$injector_;
8787
$q = _$q_;
88-
$exceptionHandler = _$exceptionHandler_;
8988
uisRepeatParser = _uisRepeatParser_;
9089
scope.selection = {};
9190

@@ -1111,53 +1110,6 @@ describe('ui-select tests', function() {
11111110
});
11121111
});
11131112

1114-
1115-
it('should throw when no ui-select-choices found', function() {
1116-
compileTemplate(
1117-
'<ui-select ng-model="selection.selected"> \
1118-
<ui-select-match></ui-select-match> \
1119-
</ui-select>'
1120-
);
1121-
var lastError = $exceptionHandler.errors[$exceptionHandler.errors.length-1];
1122-
var expectedError = new Error('[ui.select:transcluded] Expected 1 .ui-select-choices but got \'0\'.');
1123-
expect(lastError).toEqual(expectedError);
1124-
});
1125-
1126-
it('should throw when no repeat attribute is provided to ui-select-choices', function() {
1127-
compileTemplate(
1128-
'<ui-select ng-model="selection.selected"> \
1129-
<ui-select-match></ui-select-match> \
1130-
<ui-select-choices></ui-select-choices> \
1131-
</ui-select>'
1132-
);
1133-
var lastError = $exceptionHandler.errors[$exceptionHandler.errors.length-1];
1134-
var expectedError = new Error('[ui.select:repeat] Expected \'repeat\' expression.');
1135-
expect(lastError).toEqual(expectedError);
1136-
});
1137-
1138-
it('should throw when repeat attribute has incorrect format ', function() {
1139-
compileTemplate(
1140-
'<ui-select ng-model="selection.selected"> \
1141-
<ui-select-match></ui-select-match> \
1142-
<ui-select-choices repeat="incorrect format people"></ui-select-choices> \
1143-
</ui-select>'
1144-
);
1145-
var lastError = $exceptionHandler.errors[$exceptionHandler.errors.length-1];
1146-
var expectedError = new Error('[ui.select:iexp] Expected expression in form of \'_item_ in _collection_[ track by _id_]\' but got \'incorrect format people\'.');
1147-
expect(lastError).toEqual(expectedError);
1148-
});
1149-
1150-
it('should throw when no ui-select-match found', function() {
1151-
compileTemplate(
1152-
'<ui-select ng-model="selection.selected"> \
1153-
<ui-select-choices repeat="item in items"></ui-select-choices> \
1154-
</ui-select>'
1155-
);
1156-
var lastError = $exceptionHandler.errors[$exceptionHandler.errors.length-1];
1157-
var expectedError = new Error('[ui.select:transcluded] Expected 1 .ui-select-match but got \'0\'.');
1158-
expect(lastError).toEqual(expectedError);
1159-
});
1160-
11611113
it('should format the model correctly using alias', function() {
11621114
var el = compileTemplate(
11631115
'<ui-select ng-model="selection.selected"> \
@@ -3189,7 +3141,7 @@ describe('ui-select tests', function() {
31893141

31903142
it('should have a default value of glyphicon-refresh ui-select-spin', function () {
31913143
var control = createUiSelect();
3192-
expect(control.scope().$select.spinnerClass).toEqual('glyphicon-refresh ui-select-spin');
3144+
expect(control.scope().$select.spinnerClass).toEqual('glyphicon glyphicon-refresh ui-select-spin');
31933145
});
31943146

31953147
it('should have set a custom class value of randomclass', function () {

0 commit comments

Comments
 (0)