mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 15:18: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>
|
</mct-representation>
|
||||||
<div class='holder search-holder abs'
|
<div class='holder search-holder abs'
|
||||||
ng-class="{active: treeModel.search}">
|
ng-class="{active: treeModel.search}">
|
||||||
<mct-representation key="'search'"
|
<mct-include key="'search'"
|
||||||
mct-object="domainObject"
|
|
||||||
ng-model="treeModel">
|
ng-model="treeModel">
|
||||||
</mct-representation>
|
</mct-include>
|
||||||
</div>
|
</div>
|
||||||
<div class='tree-holder abs mobile-tree-holder'
|
<div class='tree-holder abs mobile-tree-holder'
|
||||||
ng-hide="treeModel.search">
|
ng-hide="treeModel.search">
|
||||||
|
@ -27,6 +27,12 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"representations": [
|
"representations": [
|
||||||
|
{
|
||||||
|
"key": "search-item",
|
||||||
|
"templateUrl": "templates/search-item.html"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"templates": [
|
||||||
{
|
{
|
||||||
"key": "search",
|
"key": "search",
|
||||||
"templateUrl": "templates/search.html"
|
"templateUrl": "templates/search.html"
|
||||||
@ -34,10 +40,6 @@
|
|||||||
{
|
{
|
||||||
"key": "search-menu",
|
"key": "search-menu",
|
||||||
"templateUrl": "templates/search-menu.html"
|
"templateUrl": "templates/search-menu.html"
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "search-item",
|
|
||||||
"templateUrl": "templates/search-item.html"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"components": [
|
"components": [
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
<a class="ui-symbol clear-icon"
|
<a class="ui-symbol clear-icon"
|
||||||
ng-class="{content: !(ngModel.input === '' || ngModel.input === undefined)}"
|
ng-class="{content: !(ngModel.input === '' || ngModel.input === undefined)}"
|
||||||
ng-click="ngModel.input = ''; controller.search()">
|
ng-click="ngModel.input = ''; controller.search()">
|
||||||

|

|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Menu icon/button 'v' -->
|
<!-- Menu icon/button 'v' -->
|
||||||
@ -53,12 +53,12 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Menu -->
|
<!-- Menu -->
|
||||||
<mct-representation key="'search-menu'"
|
<mct-include key="'search-menu'"
|
||||||
class="menu-element search-menu-holder"
|
class="menu-element search-menu-holder"
|
||||||
ng-class="{off: !toggle.isActive()}"
|
ng-class="{off: !toggle.isActive()}"
|
||||||
ng-model="ngModel"
|
ng-model="ngModel"
|
||||||
ng-click="toggle.setState(true)">
|
ng-click="toggle.setState(true)">
|
||||||
</mct-representation>
|
</mct-include>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Active filter display -->
|
<!-- Active filter display -->
|
||||||
@ -71,7 +71,7 @@
|
|||||||

|

|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
Filtered by: {{ ngModel.filtersString }}
|
Filtered by: {{ ngModel.filtersString }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user