Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit f16aa49

Browse files
author
Axel Peter
committed
fix(oui-select): fix ui-select templates override
1 parent 21dd9cf commit f16aa49

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/oui-select/src/ui-select.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var latestId = 0;
111111
var uis = angular.module('oui.ui-select', [])
112112

113113
.constant('ouiUiSelectConfig', {
114-
theme: 'bootstrap',
114+
theme: 'oui.ui-select',
115115
searchEnabled: true,
116116
sortable: false,
117117
placeholder: '', // Empty by default, like HTML tag <select>
@@ -2470,10 +2470,10 @@ uis.service('ouiUisRepeatParser', ['ouiUiSelectMinErr','$parse', function(ouiUiS
24702470
}());
24712471
angular.module("oui.ui-select")
24722472
.run(["$templateCache", function($templateCache) {
2473-
$templateCache.put("bootstrap/choices.tpl.html", require("./templates/choices.html"));
2474-
$templateCache.put("bootstrap/match-multiple.tpl.html","<span class=\"ui-select-match\"><span ng-repeat=\"$item in $select.selected track by $index\"><span class=\"ui-select-match-item btn btn-default btn-xs\" tabindex=\"-1\" type=\"button\" ng-disabled=\"$select.disabled\" ng-click=\"$selectMultiple.activeMatchIndex = $index;\" ng-class=\"{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}\" oui-ui-select-sort=\"$select.selected\"><span class=\"close ui-select-match-close\" ng-hide=\"$select.disabled\" ng-click=\"$selectMultiple.removeChoice($index)\">&nbsp;&times;</span> <span oui-uis-transclude-append=\"\"></span></span></span></span>");
2475-
$templateCache.put("bootstrap/match.tpl.html", require("./templates/match.html"));
2476-
$templateCache.put("bootstrap/no-choice.tpl.html","<ul class=\"ui-select-no-choice dropdown-menu\" ng-show=\"$select.items.length == 0\"><li ng-transclude=\"\"></li></ul>");
2477-
$templateCache.put("bootstrap/select-multiple.tpl.html","<div class=\"ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control\" ng-class=\"{open: $select.open}\"><div><div class=\"ui-select-match\"></div><input type=\"search\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search input-xs\" placeholder=\"{{$selectMultiple.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-click=\"$select.activate()\" ng-model=\"$select.search\" role=\"combobox\" aria-expanded=\"{{$select.open}}\" aria-label=\"{{$select.baseTitle}}\" ng-class=\"{\'spinner\': $select.refreshing}\" ondrop=\"return false;\"></div><div class=\"ui-select-choices\"></div><div class=\"ui-select-no-choice\"></div></div>");
2478-
$templateCache.put("bootstrap/select.tpl.html", require("./templates/select.html"));
2473+
$templateCache.put("oui.ui-select/choices.tpl.html", require("./templates/choices.html"));
2474+
$templateCache.put("oui.ui-select/match-multiple.tpl.html","<span class=\"ui-select-match\"><span ng-repeat=\"$item in $select.selected track by $index\"><span class=\"ui-select-match-item btn btn-default btn-xs\" tabindex=\"-1\" type=\"button\" ng-disabled=\"$select.disabled\" ng-click=\"$selectMultiple.activeMatchIndex = $index;\" ng-class=\"{\'btn-primary\':$selectMultiple.activeMatchIndex === $index, \'select-locked\':$select.isLocked(this, $index)}\" oui-ui-select-sort=\"$select.selected\"><span class=\"close ui-select-match-close\" ng-hide=\"$select.disabled\" ng-click=\"$selectMultiple.removeChoice($index)\">&nbsp;&times;</span> <span oui-uis-transclude-append=\"\"></span></span></span></span>");
2475+
$templateCache.put("oui.ui-select/match.tpl.html", require("./templates/match.html"));
2476+
$templateCache.put("oui.ui-select/no-choice.tpl.html","<ul class=\"ui-select-no-choice dropdown-menu\" ng-show=\"$select.items.length == 0\"><li ng-transclude=\"\"></li></ul>");
2477+
$templateCache.put("oui.ui-select/select-multiple.tpl.html","<div class=\"ui-select-container ui-select-multiple ui-select-bootstrap dropdown form-control\" ng-class=\"{open: $select.open}\"><div><div class=\"ui-select-match\"></div><input type=\"search\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" class=\"ui-select-search input-xs\" placeholder=\"{{$selectMultiple.getPlaceholder()}}\" ng-disabled=\"$select.disabled\" ng-click=\"$select.activate()\" ng-model=\"$select.search\" role=\"combobox\" aria-expanded=\"{{$select.open}}\" aria-label=\"{{$select.baseTitle}}\" ng-class=\"{\'spinner\': $select.refreshing}\" ondrop=\"return false;\"></div><div class=\"ui-select-choices\"></div><div class=\"ui-select-no-choice\"></div></div>");
2478+
$templateCache.put("oui.ui-select/select.tpl.html", require("./templates/select.html"));
24792479
}]);

0 commit comments

Comments
 (0)