Reorganized main dashboards
authorThierry Florac <thierry.florac@onf.fr>
Tue, 19 Jun 2018 18:13:46 +0200
changeset 711 ba9ae51da2a5
parent 710 c770464c85a3
child 712 e87fc8c2505e
Reorganized main dashboards
src/pyams_content/root/zmi/templates/dashboard.pt
src/pyams_content/shared/common/zmi/templates/dashboard.pt
--- 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>