--- a/src/pyams_content/root/zmi/templates/dashboard.pt Tue Jun 19 17:14:27 2018 +0200
+++ b/src/pyams_content/root/zmi/templates/dashboard.pt Tue Jun 19 18:13:46 2018 +0200
@@ -25,7 +25,9 @@
<label class="input">
<button type="submit" class="icon-append fa fa-fw fa-search no-border no-padding"
data-ams-form-hide-loading="true"></button>
- <input type="text" name="query" placeholder="Quick search..." i18n:attributes="placeholder" />
+ <input type="text" name="query"
+ placeholder="Quick search..." i18n:attributes="placeholder"
+ data-ams-events-handlers='{"keyup": "MyAMS.helpers.clearSearchTarget"}' />
</label>
</div>
<div class="col-md-6">
@@ -36,7 +38,8 @@
</form>
</div>
</div>
- <div id="search_results" tal:define="global dashboard_length 0">
+ <div id="search_results"></div>
+ <tal:var define="global dashboard_length 0">
<tal:loop repeat="table view.tables">
<tal:if condition="table.values">
<tal:var content="structure table.render()" />
@@ -46,6 +49,6 @@
<div tal:condition="not:dashboard_length" class="alert alert-info" i18n:translate="">
You are not actually concerned by any content.
</div>
- </div>
+ </tal:var>
</div>
</div>
--- a/src/pyams_content/shared/common/zmi/templates/dashboard.pt Tue Jun 19 17:14:27 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/templates/dashboard.pt Tue Jun 19 18:13:46 2018 +0200
@@ -25,7 +25,9 @@
<label class="input">
<button type="submit" class="icon-append fa fa-fw fa-search no-border no-padding"
data-ams-form-hide-loading="true"></button>
- <input type="text" name="query" placeholder="Quick search..." i18n:attributes="placeholder" />
+ <input type="text" name="query"
+ placeholder="Quick search..." i18n:attributes="placeholder"
+ data-ams-events-handlers='{"keyup": "MyAMS.helpers.clearSearchTarget"}' />
</label>
</div>
<div class="col-md-6">
@@ -36,7 +38,8 @@
</form>
</div>
</div>
- <div id="search_results" tal:define="global dashboard_length 0">
+ <div id="search_results"></div>
+ <tal:var define="global dashboard_length 0">
<tal:loop repeat="table view.tables">
<tal:if condition="table.values">
<tal:var content="structure table.render()" />
@@ -46,6 +49,6 @@
<div tal:condition="not:dashboard_length" class="alert alert-info" i18n:translate="">
You are not actually concerned by any content.
</div>
- </div>
+ </tal:var>
</div>
</div>