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

Commit 57a5db6

Browse files
committed
Add bootstrap template
1 parent 6cfc28b commit 57a5db6

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

src/bootstrap/match-multiple.tpl.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<span class="ui-select-match">
2+
<span ng-repeat="$item in $select.selected">
3+
<button
4+
class="btn btn-default btn-xs"
5+
tabindex="-1"
6+
ng-disabled="$select.disabled"
7+
ng-click="$select.activeMatchIndex = $index;"
8+
ng-class="{'btn-primary':$select.activeMatchIndex === $index}">
9+
<span class="close" ng-hide="$select.disabled" ng-click="$select.removeChoice($index)">&nbsp;&times;</span>
10+
<span transinject></span>
11+
</button>
12+
</span>
13+
</span>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<div class="ui-select-multiple ui-select-bootstrap dropdown form-control" ng-class="{open: $select.open}">
2+
<div>
3+
<div>
4+
<div class="ui-select-match"></div>
5+
<input type="text"
6+
autocomplete="off"
7+
autocorrect="off"
8+
autocapitalize="off"
9+
spellcheck="false"
10+
class="ui-select-search input-xs"
11+
placeholder="{{$select.getPlaceholder()}}"
12+
ng-disabled="$select.disabled"
13+
ng-hide="$select.disabled"
14+
ng-click="$select.activate()"
15+
ng-model="$select.search">
16+
</div>
17+
</div>
18+
<div class="ui-select-choices"></div>
19+
</div>

src/select.css

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,31 @@
8888
right: 15px;
8989
}
9090

91-
.ui-select-bootstrap > .ui-select-choices {
92-
width: 100%;
93-
}
94-
9591
/* See Scrollable Menu with Bootstrap 3 http://stackoverflow.com/questions/19227496 */
9692
.ui-select-bootstrap > .ui-select-choices {
93+
width: 100%;
9794
height: auto;
9895
max-height: 200px;
9996
overflow-x: hidden;
10097
}
10198

99+
.ui-select-multiple.ui-select-bootstrap {
100+
height: auto;
101+
padding: .3em;
102+
}
103+
104+
.ui-select-multiple.ui-select-bootstrap input.ui-select-search {
105+
background-color: transparent !important; /* To prevent double background when disabled */
106+
border: none;
107+
outline: none;
108+
height: 1.666666em;
109+
}
110+
111+
.ui-select-multiple.ui-select-bootstrap .ui-select-match .close {
112+
font-size: 1.6em;
113+
line-height: 0.75;
114+
}
115+
102116
.ui-select-bootstrap .ui-select-choices-row>a {
103117
display: block;
104118
padding: 3px 20px;

0 commit comments

Comments
 (0)