Skip to content

Commit 2302165

Browse files
author
Brian Feister
committed
Don't use bootstrap columns inside buttons
1 parent e4b84dc commit 2302165

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

Diff for: src/bootstrap/match.tpl.html

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<div class="btn-group ui-select-match btn-block" ng-hide="$select.open" ng-disabled="$select.disabled" ng-class="{'btn-default-focus':$select.focus}">
2-
<button type="button" class="btn btn-default" ng-class="{'col-sm-8 col-md-10': $select.allowClear && !$select.isEmpty(),'col-sm-10 col-md-11': !$select.allowClear || $select.isEmpty()}" tabindex="-1" ;="" ng-click="$select.activate()">
3-
<span ng-show="$select.isEmpty()" class="text-muted">{{$select.placeholder}}</span>
4-
<span ng-hide="$select.isEmpty()" ng-transclude=""></span>
1+
<div class="ui-select-match" ng-hide="$select.open" ng-disabled="$select.disabled" ng-class="{'btn-default-focus':$select.focus}">
2+
<button type="button" class="btn btn-default btn-block ui-select-toggle" tabindex="-1" ;="" ng-disabled="$select.disabled" ng-click="$select.activate()">
3+
<span ng-show="$select.isEmpty()" class="ui-select-placeholder text-muted">{{$select.placeholder}}</span>
4+
<span ng-hide="$select.isEmpty()" class="ui-select-match-text" ng-class="{'ui-select-allow-clear': $select.allowClear && !$select.isEmpty()}" ng-transclude=""></span>
5+
<i class="caret pull-right" ng-click="$select.toggle($event)"></i>
56
</button>
6-
<button class="btn btn-default col-sm-2 col-md-1" ng-if="$select.allowClear && !$select.isEmpty()" ng-click="$select.select(undefined)">
7-
<span class="glyphicon glyphicon-remove ui-select-toggle"></span>
7+
<button class="ui-select-clear" ng-if="$select.allowClear && !$select.isEmpty()" ng-click="$select.select(undefined)">
8+
<i class="glyphicon glyphicon-remove"></i>
89
</button>
9-
<button class="btn btn-default col-sm-2 col-md-1" ng-click="$select.activate()">
10-
<span class="caret ui-select-toggle" ng-click="$select.toggle($event)"></span>
11-
</button>
12-
</div>
10+
</div>

Diff for: src/select.css

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*!
2+
* ui-select
3+
* http://github.com/angular-ui/ui-select
4+
* Version: 0.9.5 - 2014-12-12T16:07:20.859Z
5+
* License: MIT
6+
*/
7+
8+
19
/* Style when highlighting a search. */
210
.ui-select-highlight {
311
font-weight: bold;
@@ -72,6 +80,17 @@
7280
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
7381
}
7482

83+
.ui-select-bootstrap .ui-select-toggle {
84+
position: relative;
85+
}
86+
87+
.ui-select-bootstrap .ui-select-toggle > .caret {
88+
position: absolute;
89+
height: 100%;
90+
top: 50%;
91+
right: 10px;
92+
margin-top: -2px;
93+
}
7594

7695
/* Fix Bootstrap dropdown position when inside a input-group */
7796
.input-group > .ui-select-bootstrap.dropdown {

0 commit comments

Comments
 (0)