(js) Improve sg-search directive

Will now respect the "listRequiresDot" source parameter and uses
ng-messages to show an error if the minimum number of characters is not
reached.

Fixes #438, #3464
This commit is contained in:
Francis Lachapelle
2016-02-24 21:41:03 -05:00
parent 4b816677b0
commit 70fbeab27a
12 changed files with 75 additions and 31 deletions
+7 -5
View File
@@ -457,10 +457,12 @@
</md-button>
</div>
<!-- search mode -->
<div class="md-toolbar-tools sg-toolbar-secondary"
layout="row"
ng-show="list.mode.search"
sg-search="list.component.$filter(list.componentType, { value: searchText, search: searchField })">
<form class="md-toolbar-tools sg-toolbar-secondary"
name="searchForm"
layout="row"
ng-show="list.mode.search"
sg-search="list.component.$filter(list.componentType, { value: searchText, search: searchField })"
sg-allow-dot="false">
<md-button class="md-icon-button"
sg-search-cancel="list.cancelSearch()"
label:aria-label="Back">
@@ -475,7 +477,7 @@
<md-option value="entireContent"><var:string label:value="Entire content"/></md-option>
</md-select>
</md-input-container>
</div>
</form>
</md-toolbar>
<!-- multiple-selection mode -->