From 2e7f23a7660312f47d9be4f584b4c38bf618e35c Mon Sep 17 00:00:00 2001 From: shale Date: Fri, 10 Jul 2015 14:46:55 -0700 Subject: [PATCH] [Search] Results list displayed After searching, a results list is displayed. The list is composed of grid-items. --- .../search/res/templates/search-item.html | 10 +++---- .../features/search/res/templates/search.html | 29 ++++++++----------- .../features/search/src/SearchController.js | 8 ++++- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/platform/features/search/res/templates/search-item.html b/platform/features/search/res/templates/search-item.html index 765a64c813..b2c9ba40ed 100644 --- a/platform/features/search/res/templates/search-item.html +++ b/platform/features/search/res/templates/search-item.html @@ -19,11 +19,9 @@ this source code distribution or the Licensing information page available at runtime from the About dialog for additional information. --> - - -
- ITEM - +
+
@@ -45,5 +43,5 @@
- +
\ No newline at end of file diff --git a/platform/features/search/res/templates/search.html b/platform/features/search/res/templates/search.html index e8125458bf..8cf10ff989 100644 --- a/platform/features/search/res/templates/search.html +++ b/platform/features/search/res/templates/search.html @@ -32,10 +32,11 @@
--> - Search:
+
Search:
+ name="searchform" + value="input search term here"/> + ng-click="controller.search('')">Go -
+
- - +
+ Results: +
+ \ No newline at end of file diff --git a/platform/features/search/src/SearchController.js b/platform/features/search/src/SearchController.js index 5a8cf831e7..bcd278ac6e 100644 --- a/platform/features/search/src/SearchController.js +++ b/platform/features/search/src/SearchController.js @@ -118,7 +118,13 @@ define(function () { $scope.results = search(); return { - search: search + search: search, + /** + * Check to see if there are any search results to display. + */ + areResults: function () { + return $scope.results.length !== 0; + } }; } return SearchController;