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

Commit 9994f68

Browse files
committed
chore(refactor): split code into multiple directives
1 parent 55ae88b commit 9994f68

12 files changed

+785
-712
lines changed

src/bootstrap/match-multiple.tpl.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
tabindex="-1"
66
type="button"
77
ng-disabled="$select.disabled"
8-
ng-click="$select.activeMatchIndex = $index;"
9-
ng-class="{'btn-primary':$select.activeMatchIndex === $index, 'select-locked':$select.isLocked(this, $index)}"
8+
ng-click="$selectMultiple.activeMatchIndex = $index;"
9+
ng-class="{'btn-primary':$selectMultiple.activeMatchIndex === $index, 'select-locked':$select.isLocked(this, $index)}"
1010
ui-select-sort="$select.selected">
11-
<span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$select.removeChoice($index)">&nbsp;&times;</span>
11+
<span class="close ui-select-match-close" ng-hide="$select.disabled" ng-click="$selectMultiple.removeChoice($index)">&nbsp;&times;</span>
1212
<span uis-transclude-append></span>
1313
</span>
1414
</span>

src/bootstrap/select-multiple.tpl.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
autocapitalize="off"
88
spellcheck="false"
99
class="ui-select-search input-xs"
10-
placeholder="{{$select.getPlaceholder()}}"
10+
placeholder="{{$selectMultiple.getPlaceholder()}}"
1111
ng-disabled="$select.disabled"
1212
ng-hide="$select.disabled"
1313
ng-click="$select.activate()"

src/common.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ body > .select2-container {
100100
border-bottom-right-radius: 0;
101101
}
102102

103-
.ui-select-bootstrap > .ui-select-match {
103+
.ui-select-bootstrap > .ui-select-match > .btn{
104104
/* Instead of center because of .btn */
105-
text-align: left;
105+
text-align: left !important;
106106
}
107107

108108
.ui-select-bootstrap > .ui-select-match > .caret {

src/select2/match-multiple.tpl.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
-->
66
<span class="ui-select-match">
77
<li class="ui-select-match-item select2-search-choice" ng-repeat="$item in $select.selected"
8-
ng-class="{'select2-search-choice-focus':$select.activeMatchIndex === $index, 'select2-locked':$select.isLocked(this, $index)}"
8+
ng-class="{'select2-search-choice-focus':$selectMultiple.activeMatchIndex === $index, 'select2-locked':$select.isLocked(this, $index)}"
99
ui-select-sort="$select.selected">
1010
<span uis-transclude-append></span>
11-
<a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$select.removeChoice($index)" tabindex="-1"></a>
11+
<a href="javascript:;" class="ui-select-match-close select2-search-choice-close" ng-click="$selectMultiple.removeChoice($index)" tabindex="-1"></a>
1212
</li>
1313
</span>

src/select2/select-multiple.tpl.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
aria-label="{{ $select.baseTitle }}"
1717
aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}"
1818
class="select2-input ui-select-search"
19-
placeholder="{{$select.getPlaceholder()}}"
19+
placeholder="{{$selectMultiple.getPlaceholder()}}"
2020
ng-disabled="$select.disabled"
2121
ng-hide="$select.disabled"
2222
ng-model="$select.search"

src/uiSelectChoicesDirective.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
uis.directive('uiSelectChoices',
2-
['uiSelectConfig', 'RepeatParser', 'uiSelectMinErr', '$compile',
2+
['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile',
33
function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile) {
44

55
return {

0 commit comments

Comments
 (0)