|
8 | 8 | <div class="aside-dialog">
|
9 | 9 | <div class="aside-body bs-sidebar">
|
10 | 10 |
|
11 |
| - <form class="form-floating" novalidate="novalidate" ng-submit="startSearch(item)"> |
| 11 | + <form class="form-floating" novalidate="novalidate" ng-submit="startSearch(savedSearch)"> |
12 | 12 | <fieldset>
|
13 |
| - <legend><span ng-bind-html="item.icon"></span> {{cmd}} {{settings.singular}} search</legend> |
| 13 | + <legend><span ng-bind-html="savedSearch.icon"></span> {{cmd}} {{settings.singular}} search</legend> |
14 | 14 |
|
15 | 15 | #foreach ($attribute in $entity.nonCpkAttributes.list)
|
16 | 16 | #if (!$attribute.isInPk() && !$attribute.isInFk())
|
17 | 17 | <div class="form-group filled">
|
18 | 18 | <label class="control-label">$attribute.varUp</label>
|
19 | 19 | #if ($attribute.type == "BigDecimal" || $attribute.type == "Integer" || $attribute.type == "BigInteger")
|
20 |
| - <input type="text" class="form-control" ng-model="item.${attribute.var}" ng-disabled="!item.editing"> |
| 20 | + <input type="text" class="form-control" ng-model="savedSearch.${attribute.var}"> |
21 | 21 | #elseif ($attribute.type == "String")
|
22 |
| - <input type="text" class="form-control" ng-model="item.${attribute.var}" ng-disabled="!item.editing"> |
| 22 | + <input type="text" class="form-control" ng-model="savedSearch.${attribute.var}"> |
23 | 23 | #elseif ($attribute.type == "Date")
|
24 |
| - <input type="text" class="form-control" ng-model="item.${attribute.var}" data-autoclose="1" placeholder="{{ '${attribute.name}' | translate }}" |
25 |
| - bs-datepicker ng-disabled="!item.editing"> |
| 24 | + <input type="text" class="form-control" ng-model="savedSearch.${attribute.var}" data-autoclose="1" placeholder="{{ '${attribute.name}' | translate }}" bs-datepicker> |
26 | 25 | #else
|
27 | 26 | <p>Type [$attribute.type] not implemented yet !!!!</p>
|
28 | 27 | #end
|
|
33 | 32 | #if ($attribute.getXToOneRelation().isManyToOne())
|
34 | 33 | <div class="form-group filled">
|
35 | 34 | <label class="control-label">${attribute.getEntityIPointTo().name}</label>
|
36 |
| - <ui-select ng-model="item.${attribute.var}" theme="select2" title="Choose an $attribute.getEntityIPointTo().name.toLowerCase()" search-enabled="false" ng-disabled="!item.editing"> |
| 35 | + <ui-select ng-model="savedSearch.${attribute.var}" theme="select2" title="Choose an $attribute.getEntityIPointTo().name.toLowerCase()" search-enabled="false"> |
37 | 36 | <ui-select-match placeholder="Choose an $attribute.getEntityIPointTo().name.toLowerCase()">{{${dollar}select.selected.name}}</ui-select-match>
|
38 | 37 | <ui-select-choices repeat="item in ${attribute.getEntityIPointTo().name.toLowerCase()}s | filter: ${dollar}select.search">
|
39 | 38 | <div ng-bind-html="item.name | highlight: ${dollar}select.search"></div>
|
|
51 | 50 | #end
|
52 | 51 |
|
53 | 52 | <div class="form-group">
|
| 53 | + <button type="button" ng-click="clearSavedSearch()" class="btn btn-lg btn-primary">{{ 'CLEAR' | translate }}</button> |
54 | 54 | <button type="submit" class="btn btn-lg btn-primary">{{ 'SEARCH' | translate }}</button>
|
55 | 55 | </div>
|
56 | 56 |
|
57 | 57 | </fieldset>
|
58 | 58 | </form>
|
59 | 59 |
|
60 |
| - <form class="form-floating" novalidate="novalidate" ng-submit="startElasticSearch(item)"> |
| 60 | + <form class="form-floating" novalidate="novalidate" ng-submit="startElasticSearch(savedSearch)"> |
61 | 61 | <fieldset>
|
62 | 62 |
|
63 | 63 | <div class="form-group filled">
|
64 | 64 | <label class="control-label">{{ 'QUERY' | translate }}</label>
|
65 |
| - <input type="text" class="form-control" ng-model="item.query" required> |
| 65 | + <input type="text" class="form-control" ng-model="savedSearch.query" required> |
66 | 66 | </div>
|
67 | 67 |
|
68 | 68 | <div class="form-group">
|
|
0 commit comments