[Search] Search icon

Search icon now is not visible when text is
entered in the search bar, even when the bar
is not in focus.
This commit is contained in:
slhale
2015-08-11 13:18:05 -07:00
parent 11a45e4db0
commit 23bc246a48
4 changed files with 37 additions and 18 deletions

View File

@@ -30,7 +30,8 @@
ng-model="ngModel.input"
ng-keyup="controller.search()"
id="searchInput" />
<div class="ui-symbol search-icon">
<div class="ui-symbol search-icon"
ng-class="{content: controller.hasInput()}">
M
</div>
<!--mct-control key="textfield"

View File

@@ -110,6 +110,14 @@ define(function () {
} else {
$scope.results = fullResults.hits.slice(0, numResults);
}
},
/**
* Determines if the search bar has any text inputted into it.
* Used as a helper for CSS styling.
*/
hasInput: function () {
return !($scope.ngModel.input === "" || $scope.ngModel.input === undefined);
}
};
}