From 0dccaab9cb1ca01fbd713fac68cb64b1f47a0baf Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 2 Nov 2015 14:07:22 -0800 Subject: [PATCH] [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 --- platform/commonUI/browse/res/templates/browse.html | 5 ++--- platform/search/bundle.json | 10 ++++++---- platform/search/res/templates/search.html | 8 ++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/platform/commonUI/browse/res/templates/browse.html b/platform/commonUI/browse/res/templates/browse.html index 9a1be7e771..80bd994bc4 100644 --- a/platform/commonUI/browse/res/templates/browse.html +++ b/platform/commonUI/browse/res/templates/browse.html @@ -34,10 +34,9 @@
- - +
diff --git a/platform/search/bundle.json b/platform/search/bundle.json index 9e39e28d03..d8f3d93458 100644 --- a/platform/search/bundle.json +++ b/platform/search/bundle.json @@ -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": [ diff --git a/platform/search/res/templates/search.html b/platform/search/res/templates/search.html index 225df353b0..59ca65db2a 100644 --- a/platform/search/res/templates/search.html +++ b/platform/search/res/templates/search.html @@ -43,7 +43,7 @@ -  +  @@ -53,12 +53,12 @@ - - +
@@ -71,7 +71,7 @@  - Filtered by: {{ ngModel.filtersString }} + Filtered by: {{ ngModel.filtersString }}