[Search] Results list displayed

After searching, a results list is displayed.
The list is composed of grid-items.
This commit is contained in:
shale 2015-07-10 14:46:55 -07:00
parent 6d1cb85a07
commit 2e7f23a766
3 changed files with 23 additions and 24 deletions

View File

@ -19,11 +19,9 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<!-- Based on grid-item -->
<!-- For selected, add class 'selected' to outer div -->
<div class='item' ng-click='action.perform("navigate")'>
ITEM
<!--div class="contents abs">
<!-- Same as grid-item -->
<div class='item grid-item' ng-click='action.perform("navigate")'>
<div class="contents abs">
<div class='top-bar bar abs'>
<div class='left abs'>
<mct-include key="_checkbox"></mct-include>
@ -45,5 +43,5 @@
</span>
</div>
</div>
</div-->
</div>
</div>

View File

@ -32,10 +32,11 @@
<input type="text" id="searchinput" />
</div>
-->
Search: <br>
<div style="height: 30px">Search:</div>
<input type="text"
id="searchinput"
name="searchform" />
name="searchform"
value="input search term here"/>
<!--
<div class="button">
<button type="submit">Search</button>
@ -46,26 +47,20 @@
-->
<span class="button">
<button type="button"
ng-click="controller.search()">Go</button>
ng-click="controller.search('')">Go</button>
</span>
</form>
</div>
<!-- some spacing -->
<div style="height: 20px"></div>
<div style="height: 30px"></div>
<!-- Results list -->
<ul>
<li>
<mct-representation key="'search-item'"><!--
ng-repeat="childObject in composition"
mct-object="childObject"--></mct-representation>
</li>
<li>
<mct-representation key="'search-item'"
ng-repeat="result in results"
mct-object="result"></mct-representation>
</li>
</ul>
<div ng-if="controller.areResults()"
style="height: 30px">
Results:
</div>
<mct-representation key="'search-item'"
ng-repeat="result in results"
mct-object="result"></mct-representation>
</div>

View File

@ -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;