mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 19:27:07 +00:00
[Search] Hide tree
The tree is hidden when there are search results.
This commit is contained in:
parent
f4d34a2a9c
commit
7d495f6389
@ -28,13 +28,14 @@
|
||||
>
|
||||
<mct-representation key="'create-button'" mct-object="navigatedObject">
|
||||
</mct-representation>
|
||||
<div class='search-holder'>
|
||||
<div class='holder search-holder abs'>
|
||||
<mct-include key="'search'"
|
||||
mct-object="domainObject"
|
||||
ng-model="treeModel">
|
||||
</mct-include>
|
||||
</div>
|
||||
<div class='holder tree-holder abs'>
|
||||
<div class='holder tree-holder abs'
|
||||
ng-hide="treeModel.filter">
|
||||
<mct-representation key="'tree'"
|
||||
mct-object="domainObject"
|
||||
ng-model="treeModel">
|
||||
|
@ -23,15 +23,14 @@
|
||||
ng-controller="SearchController as controller">
|
||||
<!-- Search bar input -->
|
||||
<div>
|
||||
<!--input class="search-input"
|
||||
<input class="search-input"
|
||||
id="searchbarinput"
|
||||
type="text"
|
||||
value=""
|
||||
ng-keyup="controller.search('searchbarinput')" /-->
|
||||
a
|
||||
<mct-control key="searchbar"
|
||||
ng-keyup="controller.search('searchbarinput')" />
|
||||
<!--mct-control key="searchbar"
|
||||
ng-keyup="controller.search('searchbarinput')">asdf
|
||||
</mct-control>
|
||||
</mct-control-->
|
||||
</div>
|
||||
|
||||
<!-- This div exists to determine scroll bar location -->
|
||||
|
@ -56,6 +56,13 @@ define(function () {
|
||||
// We got the latest results now (and done loading)
|
||||
loading = false;
|
||||
$scope.results = searchService.getLatestResults(0, numResults);
|
||||
|
||||
// Update whether the file tree should be displayed
|
||||
if ($scope.results.length === 0) {
|
||||
$scope.ngModel.filter = false;
|
||||
} else {
|
||||
$scope.ngModel.filter = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
waitForLatest();
|
||||
|
Loading…
Reference in New Issue
Block a user