[Frontend] Markup / Angular mods to Search

Fixes #1093
WIP: markup changes. Needs CSS mods effected in
#1047 as well.
This commit is contained in:
Charles Hacskaylo 2016-07-19 15:23:22 -07:00
parent 14f1a1f740
commit 9fa6184b0a

View File

@ -19,18 +19,21 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<div class="l-flex-col flex-elem grows holder holder-search" ng-controller="SearchController as controller"> <div class="angular-w" ng-controller="SearchController as controller">
<div class="search-bar flex-elem" <div class="l-flex-col flex-elem grows holder holder-search" ng-controller="SearchMenuController as menuController">
<div class="search-bar flex-elem l-flex-row"
ng-controller="ClickAwayController as toggle" ng-controller="ClickAwayController as toggle"
ng-class="{ holder: !(ngModel.input === '' || ngModel.input === undefined) }"> ng-class="{ holder: !(ngModel.input === '' || ngModel.input === undefined) }">
<div class="holder flex-elem grows">
<input class="search-input" <input class="search-input"
type="text" type="text"
ng-model="ngModel.input" ng-model="ngModel.input"
ng-keyup="controller.search()"/> ng-keyup="controller.search()"/>
<a class="clear-icon" <a class="clear-icon clear-input icon-x-in-circle"
ng-class="{show: !(ngModel.input === '' || ngModel.input === undefined)}" ng-class="{show: !(ngModel.input === '' || ngModel.input === undefined)}"
ng-click="ngModel.input = ''; controller.search()"></a> ng-click="ngModel.input = ''; controller.search()"></a>
<a class="menu-icon" <a class="menu-icon context-available"
ng-click="toggle.toggle()"></a> ng-click="toggle.toggle()"></a>
<mct-include key="'search-menu'" <mct-include key="'search-menu'"
class="menu-element search-menu-holder" class="menu-element search-menu-holder"
@ -39,12 +42,23 @@
ng-click="toggle.setState(true)"> ng-click="toggle.setState(true)">
</mct-include> </mct-include>
</div> </div>
<a class="holder s-btn flex-elem btn-cancel"
ng-show="!(ngModel.input === '' || ngModel.input === undefined)"
ng-click="ngModel.input = ''; ngModel.checkAll = true; menuController.checkAll(); controller.search()">
Cancel</a>
</div>
<div class="active-filter-display flex-elem holder" <div class="active-filter-display flex-elem holder"
ng-class="{off: ngModel.filtersString === '' || ngModel.filtersString === undefined || !ngModel.search}" ng-class="{off: ngModel.filtersString === '' || ngModel.filtersString === undefined || !ngModel.search}">
ng-controller="SearchMenuController as menuController"> <a class="clear-filters icon-x-in-circle"
<a class="clear-icon clear-filters-icon"
ng-click="ngModel.checkAll = true; menuController.checkAll()"></a>Filtered by: {{ ngModel.filtersString }} ng-click="ngModel.checkAll = true; menuController.checkAll()"></a>Filtered by: {{ ngModel.filtersString }}
</div> </div>
<div class="holder results-msg" ng-model="ngModel"
ng-show="!loading && !results.length > 0 && ngModel.search">
No results found</div>
<div class="search-results flex-elem holder grows vscroll" <div class="search-results flex-elem holder grows vscroll"
ng-class="{ off: !(loading || results.length > 0), loading: loading }"> ng-class="{ off: !(loading || results.length > 0), loading: loading }">
<mct-representation key="'search-item'" <mct-representation key="'search-item'"
@ -56,4 +70,5 @@
<a class="load-more-button s-btn vsm" ng-if="controller.areMore()" ng-click="controller.loadMore()">More Results</a> <a class="load-more-button s-btn vsm" ng-if="controller.areMore()" ng-click="controller.loadMore()">More Results</a>
</div> </div>
</div>
</div> </div>