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

Commit a4fd087

Browse files
committed
Merge branch 'master' of https://github.com/angular-ui/ui-select into limit_multi_select
2 parents 3a7c45e + 148c06e commit a4fd087

9 files changed

+58
-58
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.12.0",
3+
"version": "0.12.1",
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.12.0 - 2015-05-28T07:44:11.364Z
4+
* Version: 0.12.1 - 2015-07-28T03:50:59.080Z
55
* License: MIT
66
*/
77

dist/select.js

+3-3
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.12.0 - 2015-05-28T07:44:11.360Z
4+
* Version: 0.12.1 - 2015-07-28T03:50:59.076Z
55
* License: MIT
66
*/
77

@@ -1021,7 +1021,7 @@ uis.directive('uiSelect',
10211021
}
10221022

10231023
// Hide the dropdown so there is no flicker until $timeout is done executing.
1024-
dropdown[0].style.visibility = 'hidden';
1024+
dropdown[0].style.opacity = 0;
10251025

10261026
// Delay positioning the dropdown until all choices have been added so its height is correct.
10271027
$timeout(function(){
@@ -1036,7 +1036,7 @@ uis.directive('uiSelect',
10361036
}
10371037

10381038
// Display the dropdown once it has been positioned.
1039-
dropdown[0].style.visibility = '';
1039+
dropdown[0].style.opacity = 1;
10401040
});
10411041
} else {
10421042
if (dropdown === null) {

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

+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.12.0",
9+
"version": "0.12.1",
1010
"devDependencies": {
1111
"bower": "~1.3",
1212
"del": "~0.1.1",

src/uiSelectDirective.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ uis.directive('uiSelect',
265265
}
266266

267267
// Hide the dropdown so there is no flicker until $timeout is done executing.
268-
dropdown[0].style.visibility = 'hidden';
268+
dropdown[0].style.opacity = 0;
269269

270270
// Delay positioning the dropdown until all choices have been added so its height is correct.
271271
$timeout(function(){
@@ -280,7 +280,7 @@ uis.directive('uiSelect',
280280
}
281281

282282
// Display the dropdown once it has been positioned.
283-
dropdown[0].style.visibility = '';
283+
dropdown[0].style.opacity = 1;
284284
});
285285
} else {
286286
if (dropdown === null) {

test/helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ beforeEach(function() {
77
return {
88
pass: pass,
99
message: "Expected '" + actual + "'" + (pass ? ' not ' : ' ') + "to have class '" + cls + "'."
10-
}
10+
};
1111
}
12-
}
12+
};
1313
}
1414
});
1515
});

test/select.spec.js

+45-45
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('ui-select tests', function() {
3232
link: function (scope, element, attrs, ctrl) {
3333

3434
}
35-
}
35+
};
3636

3737
});
3838

@@ -111,8 +111,8 @@ describe('ui-select tests', function() {
111111
if (attrs.tagging !== undefined) { attrsHtml += ' tagging="' + attrs.tagging + '"'; }
112112
if (attrs.taggingTokens !== undefined) { attrsHtml += ' tagging-tokens="' + attrs.taggingTokens + '"'; }
113113
if (attrs.title !== undefined) { attrsHtml += ' title="' + attrs.title + '"'; }
114-
if (attrs.appendToBody != undefined) { attrsHtml += ' append-to-body="' + attrs.appendToBody + '"'; }
115-
if (attrs.allowClear != undefined) { matchAttrsHtml += ' allow-clear="' + attrs.allowClear + '"';}
114+
if (attrs.appendToBody !== undefined) { attrsHtml += ' append-to-body="' + attrs.appendToBody + '"'; }
115+
if (attrs.allowClear !== undefined) { matchAttrsHtml += ' allow-clear="' + attrs.allowClear + '"';}
116116
}
117117

118118
return compileTemplate(
@@ -180,7 +180,7 @@ describe('ui-select tests', function() {
180180
var $select = el.scope().$select;
181181
$select.open = true;
182182
scope.$digest();
183-
};
183+
}
184184

185185
function closeDropdown(el) {
186186
var $select = el.scope().$select;
@@ -986,7 +986,7 @@ describe('ui-select tests', function() {
986986
scope.$digest();
987987

988988
expect(highlighted).toBe(scope.people[5]);
989-
})
989+
});
990990

991991
it('should set $item & $model correctly when invoking callback on select and no single prop. binding', function () {
992992

@@ -1223,7 +1223,7 @@ describe('ui-select tests', function() {
12231223

12241224
});
12251225

1226-
it('should format view value correctly when using single property binding and refresh funcion', function () {
1226+
it('should format view value correctly when using single property binding and refresh function', function () {
12271227

12281228
var el = compileTemplate(
12291229
'<ui-select ng-model="selection.selected"> \
@@ -1241,19 +1241,19 @@ describe('ui-select tests', function() {
12411241
scope.fetchFromServer = function(searching){
12421242

12431243
if (searching == 's')
1244-
return scope.people
1244+
return scope.people;
12451245

12461246
if (searching == 'o'){
12471247
scope.people = []; //To simulate cases were previously selected item isnt in the list anymore
12481248
}
12491249

12501250
};
12511251

1252-
setSearchText(el, 'r')
1252+
setSearchText(el, 'r');
12531253
clickItem(el, 'Samantha');
12541254
expect(getMatchLabel(el)).toBe('Samantha');
12551255

1256-
setSearchText(el, 'o')
1256+
setSearchText(el, 'o');
12571257
expect(getMatchLabel(el)).toBe('Samantha');
12581258

12591259
});
@@ -1428,7 +1428,7 @@ describe('ui-select tests', function() {
14281428

14291429
});
14301430

1431-
it('should remove hightlighted match when pressing BACKSPACE key from search and decrease activeMatchIndex', function() {
1431+
it('should remove highlighted match when pressing BACKSPACE key from search and decrease activeMatchIndex', function() {
14321432

14331433
scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole
14341434
var el = createUiSelectMultiple();
@@ -1444,7 +1444,7 @@ describe('ui-select tests', function() {
14441444

14451445
});
14461446

1447-
it('should remove hightlighted match when pressing DELETE key from search and keep same activeMatchIndex', function() {
1447+
it('should remove highlighted match when pressing DELETE key from search and keep same activeMatchIndex', function() {
14481448

14491449
scope.selection.selectedMultiple = [scope.people[4], scope.people[5], scope.people[6]]; //Wladimir, Samantha & Nicole
14501450
var el = createUiSelectMultiple();
@@ -1479,13 +1479,13 @@ describe('ui-select tests', function() {
14791479
var searchInput = el.find('.ui-select-search');
14801480

14811481
expect(isDropdownOpened(el)).toEqual(false);
1482-
triggerKeydown(searchInput, Key.Left)
1483-
triggerKeydown(searchInput, Key.Left)
1482+
triggerKeydown(searchInput, Key.Left);
1483+
triggerKeydown(searchInput, Key.Left);
14841484
expect(isDropdownOpened(el)).toEqual(false);
14851485
expect(el.scope().$selectMultiple.activeMatchIndex).toBe(el.scope().$select.selected.length - 2);
1486-
triggerKeydown(searchInput, Key.Left)
1487-
triggerKeydown(searchInput, Key.Left)
1488-
triggerKeydown(searchInput, Key.Left)
1486+
triggerKeydown(searchInput, Key.Left);
1487+
triggerKeydown(searchInput, Key.Left);
1488+
triggerKeydown(searchInput, Key.Left);
14891489
expect(el.scope().$selectMultiple.activeMatchIndex).toBe(0);
14901490

14911491
});
@@ -1496,9 +1496,9 @@ describe('ui-select tests', function() {
14961496
var el = createUiSelectMultiple();
14971497
var searchInput = el.find('.ui-select-search');
14981498

1499-
el.scope().$selectMultiple.activeMatchIndex = 3
1500-
triggerKeydown(searchInput, Key.Left)
1501-
triggerKeydown(searchInput, Key.Left)
1499+
el.scope().$selectMultiple.activeMatchIndex = 3;
1500+
triggerKeydown(searchInput, Key.Left);
1501+
triggerKeydown(searchInput, Key.Left);
15021502
expect(el.scope().$selectMultiple.activeMatchIndex).toBe(1);
15031503

15041504
});
@@ -1509,9 +1509,9 @@ describe('ui-select tests', function() {
15091509
var el = createUiSelectMultiple();
15101510
var searchInput = el.find('.ui-select-search');
15111511

1512-
el.scope().$selectMultiple.activeMatchIndex = 0
1513-
triggerKeydown(searchInput, Key.Right)
1514-
triggerKeydown(searchInput, Key.Right)
1512+
el.scope().$selectMultiple.activeMatchIndex = 0;
1513+
triggerKeydown(searchInput, Key.Right);
1514+
triggerKeydown(searchInput, Key.Right);
15151515
expect(el.scope().$selectMultiple.activeMatchIndex).toBe(2);
15161516

15171517
});
@@ -1523,7 +1523,7 @@ describe('ui-select tests', function() {
15231523
var searchInput = el.find('.ui-select-search');
15241524

15251525
expect(isDropdownOpened(el)).toEqual(false);
1526-
triggerKeydown(searchInput, Key.Down)
1526+
triggerKeydown(searchInput, Key.Down);
15271527
expect(isDropdownOpened(el)).toEqual(true);
15281528

15291529
});
@@ -1558,7 +1558,7 @@ describe('ui-select tests', function() {
15581558
var searchInput = el.find('.ui-select-search');
15591559

15601560
expect(isDropdownOpened(el)).toEqual(false);
1561-
triggerKeydown(searchInput, Key.Down)
1561+
triggerKeydown(searchInput, Key.Down);
15621562
expect(isDropdownOpened(el)).toEqual(true);
15631563

15641564
clickItem(el, 'Wladimir');
@@ -1574,7 +1574,7 @@ describe('ui-select tests', function() {
15741574
var searchInput = el.find('.ui-select-search');
15751575

15761576
expect(isDropdownOpened(el)).toEqual(false);
1577-
triggerKeydown(searchInput, Key.Down)
1577+
triggerKeydown(searchInput, Key.Down);
15781578
expect(isDropdownOpened(el)).toEqual(true);
15791579

15801580
clickItem(el, 'Wladimir');
@@ -1590,9 +1590,9 @@ describe('ui-select tests', function() {
15901590
var searchInput = el.find('.ui-select-search');
15911591

15921592
expect(isDropdownOpened(el)).toEqual(false);
1593-
triggerKeydown(searchInput, Key.Down)
1593+
triggerKeydown(searchInput, Key.Down);
15941594
expect(isDropdownOpened(el)).toEqual(true);
1595-
triggerKeydown(searchInput, Key.Escape)
1595+
triggerKeydown(searchInput, Key.Escape);
15961596
expect(isDropdownOpened(el)).toEqual(false);
15971597

15981598
});
@@ -1603,8 +1603,8 @@ describe('ui-select tests', function() {
16031603
var el = createUiSelectMultiple();
16041604
var searchInput = el.find('.ui-select-search');
16051605

1606-
triggerKeydown(searchInput, Key.Down)
1607-
triggerKeydown(searchInput, Key.Enter)
1606+
triggerKeydown(searchInput, Key.Down);
1607+
triggerKeydown(searchInput, Key.Enter);
16081608
expect(scope.selection.selectedMultiple.length).toEqual(2);
16091609

16101610
});
@@ -1616,8 +1616,8 @@ describe('ui-select tests', function() {
16161616
spyOn(jQuery.Event.prototype, 'preventDefault');
16171617
spyOn(jQuery.Event.prototype, 'stopPropagation');
16181618

1619-
triggerKeydown(searchInput, Key.Down)
1620-
triggerKeydown(searchInput, Key.Enter)
1619+
triggerKeydown(searchInput, Key.Down);
1620+
triggerKeydown(searchInput, Key.Enter);
16211621
expect(jQuery.Event.prototype.preventDefault).toHaveBeenCalled();
16221622
expect(jQuery.Event.prototype.stopPropagation).toHaveBeenCalled();
16231623

@@ -1630,8 +1630,8 @@ describe('ui-select tests', function() {
16301630
spyOn(jQuery.Event.prototype, 'preventDefault');
16311631
spyOn(jQuery.Event.prototype, 'stopPropagation');
16321632

1633-
triggerKeydown(searchInput, Key.Down)
1634-
triggerKeydown(searchInput, Key.Escape)
1633+
triggerKeydown(searchInput, Key.Down);
1634+
triggerKeydown(searchInput, Key.Escape);
16351635
expect(jQuery.Event.prototype.preventDefault).toHaveBeenCalled();
16361636
expect(jQuery.Event.prototype.stopPropagation).toHaveBeenCalled();
16371637

@@ -1644,9 +1644,9 @@ describe('ui-select tests', function() {
16441644

16451645
triggerKeydown(searchInput, Key.Down); //Open dropdown
16461646

1647-
el.scope().$select.activeIndex = 0
1648-
triggerKeydown(searchInput, Key.Down)
1649-
triggerKeydown(searchInput, Key.Down)
1647+
el.scope().$select.activeIndex = 0;
1648+
triggerKeydown(searchInput, Key.Down);
1649+
triggerKeydown(searchInput, Key.Down);
16501650
expect(el.scope().$select.activeIndex).toBe(2);
16511651

16521652
});
@@ -1658,9 +1658,9 @@ describe('ui-select tests', function() {
16581658

16591659
triggerKeydown(searchInput, Key.Down); //Open dropdown
16601660

1661-
el.scope().$select.activeIndex = 5
1662-
triggerKeydown(searchInput, Key.Up)
1663-
triggerKeydown(searchInput, Key.Up)
1661+
el.scope().$select.activeIndex = 5;
1662+
triggerKeydown(searchInput, Key.Up);
1663+
triggerKeydown(searchInput, Key.Up);
16641664
expect(el.scope().$select.activeIndex).toBe(3);
16651665

16661666
});
@@ -1713,7 +1713,7 @@ describe('ui-select tests', function() {
17131713

17141714
});
17151715

1716-
it('should format view value correctly when using single property binding and refresh funcion', function () {
1716+
it('should format view value correctly when using single property binding and refresh function', function () {
17171717

17181718
scope.selection.selectedMultiple = ['[email protected]', '[email protected]'];
17191719

@@ -1733,21 +1733,21 @@ describe('ui-select tests', function() {
17331733
scope.fetchFromServer = function(searching){
17341734

17351735
if (searching == 'n')
1736-
return scope.people
1736+
return scope.people;
17371737

17381738
if (searching == 'o'){
17391739
scope.people = []; //To simulate cases were previously selected item isnt in the list anymore
17401740
}
17411741

17421742
};
17431743

1744-
setSearchText(el, 'n')
1744+
setSearchText(el, 'n');
17451745
clickItem(el, 'Nicole');
17461746

17471747
expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text())
17481748
.toBe("Wladimir <[email protected]>Samantha <[email protected]>Nicole <[email protected]>");
17491749

1750-
setSearchText(el, 'o')
1750+
setSearchText(el, 'o');
17511751

17521752
expect(el.find('.ui-select-match-item [uis-transclude-append]:not(.ng-hide)').text())
17531753
.toBe("Wladimir <[email protected]>Samantha <[email protected]>Nicole <[email protected]>");
@@ -1801,7 +1801,7 @@ describe('ui-select tests', function() {
18011801
scope.counter = 0;
18021802
scope.onlyOnce = function(){
18031803
scope.counter++;
1804-
}
1804+
};
18051805

18061806
clickItem(el, 'Nicole');
18071807

@@ -1970,7 +1970,7 @@ describe('ui-select tests', function() {
19701970
function checkElements(els) {
19711971
for (var i = 0; i < els.length; i++) {
19721972
expect(els[i].attributes['aria-label']).toBeTruthy();
1973-
};
1973+
}
19741974
}
19751975
}
19761976
});

0 commit comments

Comments
 (0)