mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 07:08:12 +00:00
[Search] Declare UI components as templates
Declare Search UI components as templates instead of representations so that they are not removed from the DOM when no domain object is supplied. Fixes nasa/openmctweb#234
This commit is contained in:
@ -34,10 +34,9 @@
|
||||
</mct-representation>
|
||||
<div class='holder search-holder abs'
|
||||
ng-class="{active: treeModel.search}">
|
||||
<mct-representation key="'search'"
|
||||
mct-object="domainObject"
|
||||
<mct-include key="'search'"
|
||||
ng-model="treeModel">
|
||||
</mct-representation>
|
||||
</mct-include>
|
||||
</div>
|
||||
<div class='tree-holder abs mobile-tree-holder'
|
||||
ng-hide="treeModel.search">
|
||||
|
@ -27,6 +27,12 @@
|
||||
}
|
||||
],
|
||||
"representations": [
|
||||
{
|
||||
"key": "search-item",
|
||||
"templateUrl": "templates/search-item.html"
|
||||
}
|
||||
],
|
||||
"templates": [
|
||||
{
|
||||
"key": "search",
|
||||
"templateUrl": "templates/search.html"
|
||||
@ -34,10 +40,6 @@
|
||||
{
|
||||
"key": "search-menu",
|
||||
"templateUrl": "templates/search-menu.html"
|
||||
},
|
||||
{
|
||||
"key": "search-item",
|
||||
"templateUrl": "templates/search-item.html"
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
|
@ -43,7 +43,7 @@
|
||||
<a class="ui-symbol clear-icon"
|
||||
ng-class="{content: !(ngModel.input === '' || ngModel.input === undefined)}"
|
||||
ng-click="ngModel.input = ''; controller.search()">
|
||||

|
||||

|
||||
</a>
|
||||
|
||||
<!-- Menu icon/button 'v' -->
|
||||
@ -53,12 +53,12 @@
|
||||
</a>
|
||||
|
||||
<!-- Menu -->
|
||||
<mct-representation key="'search-menu'"
|
||||
<mct-include key="'search-menu'"
|
||||
class="menu-element search-menu-holder"
|
||||
ng-class="{off: !toggle.isActive()}"
|
||||
ng-model="ngModel"
|
||||
ng-click="toggle.setState(true)">
|
||||
</mct-representation>
|
||||
</mct-include>
|
||||
</div>
|
||||
|
||||
<!-- Active filter display -->
|
||||
@ -71,7 +71,7 @@
|
||||

|
||||
</a>
|
||||
|
||||
Filtered by: {{ ngModel.filtersString }}
|
||||
Filtered by: {{ ngModel.filtersString }}
|
||||
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user