Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
feat(typeahead): update to Bootstrap 3
Browse files Browse the repository at this point in the history
  • Loading branch information
pkozlowski-opensource committed Dec 28, 2013
1 parent 5bcff62 commit eadf934
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/typeahead/docs/demo.html
Expand Up @@ -8,14 +8,14 @@

<h4>Static arrays</h4>
<pre>Model: {{selected | json}}</pre>
<input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8">
<input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue | limitTo:8" class="form-control">

<h4>Asynchronous results</h4>
<pre>Model: {{asyncSelected | json}}</pre>
<input type="text" ng-model="asyncSelected" placeholder="Locations loaded via $http" typeahead="address for address in getLocation($viewValue) | filter:$viewValue" typeahead-loading="loadingLocations">
<i ng-show="loadingLocations" class="icon-refresh"></i>
<input type="text" ng-model="asyncSelected" placeholder="Locations loaded via $http" typeahead="address for address in getLocation($viewValue) | filter:$viewValue" typeahead-loading="loadingLocations" class="form-control">
<i ng-show="loadingLocations" class="glyphicon glyphicon-refresh"></i>

<h4>Custom templates for results</h4>
<pre>Model: {{customSelected | json}}</pre>
<input type="text" ng-model="customSelected" placeholder="Custom template" typeahead="state as state.name for state in statesWithFlags | filter:{name:$viewValue}" typeahead-template-url="customTemplate.html">
<input type="text" ng-model="customSelected" placeholder="Custom template" typeahead="state as state.name for state in statesWithFlags | filter:{name:$viewValue}" typeahead-template-url="customTemplate.html" class="form-control">
</div>
5 changes: 2 additions & 3 deletions src/typeahead/test/typeahead.spec.js
Expand Up @@ -48,7 +48,7 @@ describe('typeahead tests', function () {
};

var findDropDown = function (element) {
return element.find('ul.typeahead');
return element.find('ul.dropdown-menu');
};

var findMatches = function (element) {
Expand Down Expand Up @@ -582,8 +582,7 @@ describe('typeahead tests', function () {

});

describe('append to body', function () {

xdescribe('append to body', function () {
it('append typeahead results to body', function () {
var element = prepareInputEl("<div><input ng-model='result' typeahead='item for item in source | filter:$viewValue' typeahead-append-to-body='true'></div>");
changeInputValueTo(element, 'ba');
Expand Down
2 changes: 1 addition & 1 deletion template/typeahead/typeahead-popup.html
@@ -1,4 +1,4 @@
<ul class="typeahead dropdown-menu" ng-style="{display: isOpen()&&'block' || 'none', top: position.top+'px', left: position.left+'px'}">
<ul class="dropdown-menu" ng-style="{display: isOpen()&&'block' || 'none', top: position.top+'px', left: position.left+'px'}">
<li ng-repeat="match in matches" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)">
<div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>
</li>
Expand Down

0 comments on commit eadf934

Please sign in to comment.