This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +21
-8
lines changed Expand file tree Collapse file tree 4 files changed +21
-8
lines changed Original file line number Diff line number Diff line change 1
1
< div class ="ui-select-match " ng-hide ="$select.open " ng-disabled ="$select.disabled " ng-class ="{'btn-default-focus':$select.focus} ">
2
- < button aria-label ="{{ $select.baseTitle }} activate " type ="button " class ="btn btn-default form-control ui-select-toggle " tabindex ="-1 " ; ="" ng-disabled ="$select.disabled " ng-click ="$select.activate() ">
2
+ < span tabindex ="-1 "
3
+ class ="btn btn-default form-control ui-select-toggle "
4
+ aria-label ="{{ $select.baseTitle }} activate "
5
+ ng-disabled ="$select.disabled "
6
+ ng-click ="$select.activate() "
7
+ style ="outline: 0; ">
3
8
< 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 >
9
+ < span ng-hide ="$select.isEmpty() " class ="ui-select-match-text pull-left " ng-class ="{'ui-select-allow-clear': $select.allowClear && !$select.isEmpty()} " ng-transclude =""> </ span >
5
10
< i class ="caret pull-right " ng-click ="$select.toggle($event) "> </ i >
6
- < button aria-label ="{{ $select.baseTitle }} clear " type ="button " class ="ui-select-clear " ng-if ="$select.allowClear && !$select.isEmpty() " ng-click ="$select.select(undefined) ">
7
- < i class ="glyphicon glyphicon-remove "> </ i >
8
- </ button >
11
+ < a ng-show ="$select.allowClear && !$select.isEmpty() " aria-label ="{{ $select.baseTitle }} clear " style ="margin-right: 10px "
12
+ ng-click ="$select.clear($event) " class ="btn btn-xs btn-link pull-right ">
13
+ < i class ="glyphicon glyphicon-remove " aria-hidden ="true "> </ i >
14
+ </ a >
15
+ </ span >
9
16
</ div >
Original file line number Diff line number Diff line change 467
467
}
468
468
} ;
469
469
470
+ ctrl . clear = function ( $event ) {
471
+ ctrl . select ( undefined ) ;
472
+ $event . stopPropagation ( ) ;
473
+ ctrl . focusser [ 0 ] . focus ( ) ;
474
+ } ;
475
+
470
476
// Toggle dropdown
471
477
ctrl . toggle = function ( e ) {
472
478
if ( ctrl . open ) {
Original file line number Diff line number Diff line change 8
8
ng-click ="$select.activate() " aria-label ="{{ $select.baseTitle }} select ">
9
9
< span ng-show ="$select.isEmpty() " class ="select2-chosen "> {{$select.placeholder}}</ span >
10
10
< span ng-hide ="$select.isEmpty() " class ="select2-chosen " ng-transclude > </ span >
11
- < abbr ng-if ="$select.allowClear && !$select.isEmpty() " class ="select2-search-choice-close " ng-click ="$select.select(undefined ) "> </ abbr >
11
+ < abbr ng-if ="$select.allowClear && !$select.isEmpty() " class ="select2-search-choice-close " ng-click ="$select.clear($event ) "> </ abbr >
12
12
< span class ="select2-arrow ui-select-toggle " ng-click ="$select.toggle($event) "> < b > </ b > </ span >
13
13
</ a >
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ describe('ui-select tests', function() {
85
85
}
86
86
87
87
function getMatchLabel ( el ) {
88
- return $ ( el ) . find ( '.ui-select-match > button :first > span[ng-transclude]:not(.ng-hide)' ) . text ( ) ;
88
+ return $ ( el ) . find ( '.ui-select-match > span :first > span[ng-transclude]:not(.ng-hide)' ) . text ( ) ;
89
89
}
90
90
91
91
function clickItem ( el , text ) {
@@ -99,7 +99,7 @@ describe('ui-select tests', function() {
99
99
}
100
100
101
101
function clickMatch ( el ) {
102
- $ ( el ) . find ( '.ui-select-match > button :first' ) . click ( ) ;
102
+ $ ( el ) . find ( '.ui-select-match > span :first' ) . click ( ) ;
103
103
scope . $digest ( ) ;
104
104
}
105
105
You can’t perform that action at this time.
0 commit comments