This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +69
-9
lines changed Expand file tree Collapse file tree 5 files changed +69
-9
lines changed Original file line number Diff line number Diff line change 20
20
21
21
< script src ="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.12/angular.js "> </ script >
22
22
23
+ < link rel ="stylesheet " href ="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.css ">
24
+
23
25
<!-- ui-select files -->
24
26
< script src ="../dist/select.js "> </ script >
25
27
< link rel ="stylesheet " href ="../dist/select.css ">
26
28
27
- < link rel ="stylesheet " href ="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.css ">
28
-
29
29
< style >
30
30
body {
31
31
padding : 15px ;
73
73
</ div >
74
74
</ div >
75
75
76
+ < div class ="form-group ">
77
+ < label class ="col-sm-3 control-label "> With a clear button</ label >
78
+ < div class ="col-sm-6 ">
79
+ < div class ="input-group ">
80
+
81
+ < ui-select ng-model ="person.selected " theme ="bootstrap ">
82
+ < match placeholder ="Select or search a person in the list... "> {{$select.selected.name}}</ match >
83
+ < choices repeat ="item in people | filter: $select.search ">
84
+ < span ng-bind-html ="trustAsHtml((item.name | highlight: $select.search)) "> </ span >
85
+ < small ng-bind-html ="trustAsHtml((item.email | highlight: $select.search)) "> </ small >
86
+ </ choices >
87
+ </ ui-select >
88
+
89
+ < span class ="input-group-btn ">
90
+ < button ng-click ="person.selected = undefined " class ="btn btn-default ">
91
+ < span class ="glyphicon glyphicon-trash "> </ span >
92
+ </ button >
93
+ </ span >
94
+
95
+ </ div >
96
+ </ div >
97
+ </ div >
98
+
76
99
< div class ="form-group ">
77
100
< label class ="col-sm-3 control-label "> Disabled</ label >
78
101
< div class ="col-sm-6 ">
Original file line number Diff line number Diff line change 1
- < ul class ="ui-select-choices ui-select-choices-content dropdown-menu " role ="menu " aria-labelledby ="dLabel ">
1
+ < ul class ="ui-select-choices ui-select-choices-content dropdown-menu "
2
+ role ="menu " aria-labelledby ="dLabel ">
2
3
< li class ="ui-select-choices-row " ng-class ="{active: $select.activeIdx == $index} ">
3
4
< a href ="javascript:void(0) " ng-transclude > </ a >
4
5
</ li >
Original file line number Diff line number Diff line change 1
- < a class ="btn btn-default ui-select-match "
2
- ng-hide ="$select.open "
3
- ng-disabled ="$select.disabled "
4
- ng-click ="$select.activate() ">
1
+ < button class ="btn btn-default form-control ui-select-match "
2
+ ng-hide ="$select.open "
3
+ ng-disabled ="$select.disabled "
4
+ ng-click ="$select.activate() ">
5
5
< span ng-hide ="$select.selected !== undefined " class ="text-muted "> {{$select.placeholder}}</ span >
6
6
< span ng-show ="$select.selected !== undefined " ng-transclude > </ span >
7
7
< span class ="caret "> </ span >
8
- </ a >
8
+ </ button >
Original file line number Diff line number Diff line change 1
- < div class ="dropdown " ng-class ="{open: $select.open} ">
1
+ < div class ="ui-select-bootstrap dropdown " ng-class ="{open: $select.open} ">
2
2
< div class ="ui-select-match "> </ div >
3
3
< input type ="text " autocomplete ="off " tabindex =""
4
4
class ="form-control ui-select-search "
Original file line number Diff line number Diff line change 3
3
font-weight : bold;
4
4
}
5
5
6
+
7
+ /* Select2 theme */
8
+
9
+
10
+ /* Selectize theme */
11
+
6
12
/* Fix input width for Selectize theme */
7
13
.selectize-control > .selectize-input > input {
8
14
width : 100% ;
12
18
.selectize-control > .selectize-dropdown {
13
19
width : 100% ;
14
20
}
21
+
22
+
23
+ /* Bootstrap theme */
24
+
25
+ /* Fix Bootstrap dropdown position when inside a input-group */
26
+ .input-group > .ui-select-bootstrap .dropdown {
27
+ /* Instead of relative */
28
+ position : static;
29
+ }
30
+
31
+ .input-group > .ui-select-bootstrap > .ui-select-search .form-control {
32
+ border-radius : 4px ; /* FIXME hardcoded value :-/ */
33
+ border-top-right-radius : 0 ;
34
+ border-bottom-right-radius : 0 ;
35
+ }
36
+
37
+ .ui-select-bootstrap > .ui-select-match {
38
+ /* Instead of center because of .btn */
39
+ text-align : left;
40
+ }
41
+
42
+ .ui-select-bootstrap > .ui-select-match > .caret {
43
+ top : 45% ;
44
+ position : absolute;
45
+ right : 17px ;
46
+ }
47
+
48
+ .ui-select-bootstrap > .ui-select-choices {
49
+ width : 100% ;
50
+ }
You can’t perform that action at this time.
0 commit comments