Skip to content

Commit b6a17ad

Browse files
authored
Merge branch 'master' into master
2 parents 7ad4ef1 + 47883ed commit b6a17ad

23 files changed

+1234
-890
lines changed

CONTRIBUTING.md

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
4242
support for markdown and templating via @ngdoc tag). To see how we document our APIs, please check
4343
out the existing ngdocs and see [this wiki page][ngDocs].
4444

45+
**Working on your first Pull Request?** You can learn how from this *free* series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
46+
4547
## <a name="commit"></a> Git Commit Guidelines
4648

4749
We have very precise rules over how our git commit messages can be formatted for maintenance of the changelog and semvar versioning. This leads to **more

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# AngularJS ui-select [![Build Status](https://travis-ci.org/angular-ui/ui-select.svg?branch=master)](https://travis-ci.org/angular-ui/ui-select) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/ui-select?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1+
# AngularJS ui-select [![Build Status](https://travis-ci.org/angular-ui/ui-select.svg?branch=master)](https://travis-ci.org/angular-ui/ui-select) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/ui-select?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
2+
23

34
AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [Selectize](http://brianreavis.github.io/selectize.js/). [http://angular-ui.github.io/ui-select/](http://angular-ui.github.io/ui-select/)
45

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<h3>Basic Header and Footer</h3>
2+
<button class="btn btn-default btn-xs" ng-click="ctrl.enable()">Enable ui-select</button>
3+
<button class="btn btn-default btn-xs" ng-click="ctrl.disable()">Disable ui-select</button>
4+
<button class="btn btn-default btn-xs" ng-click="ctrl.clear()">Clear ng-model</button>
5+
6+
<h3>Bootstrap theme <small>(remote data source)</small></h3>
7+
<p>Selected: {{ctrl.address.selected.formatted_address}}</p>
8+
<ui-select ng-model="ctrl.address.selected"
9+
theme="bootstrap"
10+
ng-disabled="ctrl.disabled"
11+
reset-search-input="false"
12+
style="width: 300px;"
13+
title="Choose an address">
14+
<ui-select-match placeholder="Enter an address...">{{$select.selected.formatted_address}}</ui-select-match>
15+
<ui-select-header>Header text</ui-select-header>
16+
<ui-select-choices repeat="address in ctrl.addresses track by $index"
17+
refresh="ctrl.refreshAddresses($select.search)"
18+
refresh-delay="0">
19+
<div ng-bind-html="address.formatted_address | highlight: $select.search"></div>
20+
</ui-select-choices>
21+
<ui-select-footer>Footer text</ui-select-footer>
22+
</ui-select>
23+
24+
<h3>Select2 theme</h3>
25+
<p>Selected: {{ctrl.person.selected}}</p>
26+
<ui-select ng-model="ctrl.person.selected" theme="select2" ng-disabled="ctrl.disabled" style="min-width: 300px;" title="Choose a person">
27+
<ui-select-match placeholder="Select a person in the list or search his name/age...">{{$select.selected.name}}</ui-select-match>
28+
<ui-select-header>Header text</ui-select-header>
29+
<ui-select-choices repeat="person in ctrl.people | propsFilter: {name: $select.search, age: $select.search}">
30+
<div ng-bind-html="person.name | highlight: $select.search"></div>
31+
<small>
32+
email: {{person.email}}
33+
age: <span ng-bind-html="''+person.age | highlight: $select.search"></span>
34+
</small>
35+
</ui-select-choices>
36+
<ui-select-footer>Footer text</ui-select-footer>
37+
</ui-select>
38+
39+
<h3>Selectize theme</h3>
40+
<p>Selected: {{ctrl.country.selected}}</p>
41+
<ui-select ng-model="ctrl.country.selected" theme="selectize" ng-disabled="ctrl.disabled" style="width: 300px;" title="Choose a country">
42+
<ui-select-match placeholder="Select or search a country in the list...">{{$select.selected.name}}</ui-select-match>
43+
<ui-select-header>Header text</ui-select-header>
44+
<ui-select-choices repeat="country in ctrl.countries | filter: $select.search">
45+
<span ng-bind-html="country.name | highlight: $select.search"></span>
46+
<small ng-bind-html="country.code | highlight: $select.search"></small>
47+
</ui-select-choices>
48+
<ui-select-footer>Footer text</ui-select-footer>
49+
</ui-select>

src/bootstrap/choices.tpl.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<ul class="ui-select-choices ui-select-choices-content ui-select-dropdown dropdown-menu"
2-
ng-show="$select.open && $select.items.length > 0">
1+
<ul class="ui-select-choices ui-select-choices-content">
32
<li class="ui-select-choices-group" id="ui-select-choices-{{ $select.generatedId }}" >
43
<div class="divider" ng-show="$select.isGrouped && $index > 0"></div>
54
<div ng-show="$select.isGrouped" class="ui-select-choices-group-label dropdown-header" ng-bind="$group.name"></div>

src/bootstrap/footer.tpl.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="ui-select-footer" ng-transclude></div>

src/bootstrap/header.tpl.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div class="ui-select-header" ng-transclude></div>

src/bootstrap/select-multiple.tpl.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
ng-class="{'spinner': $select.refreshing}"
1818
ondrop="return false;">
1919
</div>
20-
<div class="ui-select-choices"></div>
20+
<div ng-show="$select.open && $select.items.length > 0" class="ui-select-dropdown dropdown-menu">
21+
<div class="ui-select-header"></div>
22+
<div class="ui-select-choices"></div>
23+
<div class="ui-select-footer"></div>
24+
</div>
2125
<div class="ui-select-no-choice"></div>
2226
</div>

src/bootstrap/select.tpl.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
placeholder="{{$select.placeholder}}"
1111
ng-model="$select.search"
1212
ng-show="$select.open">
13-
<div class="ui-select-choices"></div>
13+
<div ng-show="$select.open && $select.items.length > 0" class="ui-select-dropdown dropdown-menu">
14+
<div class="ui-select-header"></div>
15+
<div class="ui-select-choices"></div>
16+
<div class="ui-select-footer"></div>
17+
</div>
1418
<div class="ui-select-no-choice"></div>
1519
</div>

0 commit comments

Comments
 (0)