Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(facet): revert to make copy&paste work again
Browse files Browse the repository at this point in the history
- facet free text no longer goes red when no results
Closes #1098, #1100
  • Loading branch information
Christine Yu committed Jul 22, 2015
1 parent 6d25be4 commit dbe4744
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions app/scripts/components/facets/facets.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,8 @@ module ngApp.components.facets.controllers {
}
}

autoComplete() {
this.FacetService.autoComplete(this.$scope.entity, this.query, this.$scope.field)
.then((response) => {
this.results = response;
});
autoComplete(query: string): ng.IPromise<any> {
return this.FacetService.autoComplete(this.$scope.entity, query, this.$scope.field);
}

remove(term: string): void {
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/components/facets/templates/facets-free-text.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
</span>
</p>

<div class="input-group search-input" data-ng-if="!ftc.collapsed"
data-ng-class="{ 'has-error': !ftc.results.length && ftc.query }">
<div>
</div>
<div class="input-group search-input" data-ng-if="!ftc.collapsed">
<span class="fa fa-search"></span>
<input type="text" data-ng-model="ftc.query"
<input type="text" data-ng-model="ftc.searchTerm"
placeholder="{{ 'Search for' | translate }} {{ placeholder | translate }}"
data-typeahead="id for id in ftc.results | limitTo: 10"
data-typeahead="id for id in ftc.autoComplete($viewValue) | limitTo: 10"
data-typeahead-on-select="ftc.termSelected()"
data-typeahead-min-length="2"
data-ng-change="ftc.autoComplete()"
maxlength="100"
id="{{ 'autocomplete-' + title }}"
typeahead-template-url="{{ template }}"
Expand Down

0 comments on commit dbe4744

Please sign in to comment.