Use None instead of empty strings in attributes values
authorThierry Florac <thierry.florac@onf.fr>
Wed, 11 Mar 2015 12:19:06 +0100
changeset 33 82fbc0843490
parent 32 8419f7c811e7
child 34 8b517db52592
Use None instead of empty strings in attributes values
src/pyams_skin/viewlet/toolbar/menu-item.pt
--- a/src/pyams_skin/viewlet/toolbar/menu-item.pt	Wed Mar 11 12:18:23 2015 +0100
+++ b/src/pyams_skin/viewlet/toolbar/menu-item.pt	Wed Mar 11 12:19:06 2015 +0100
@@ -1,8 +1,9 @@
 <li class="small">
 	<a tal:attributes="data-ams-click-handler view.click_handler;
-					   data-ams-click-stop-propagation 'true' if view.stop_propagation else '';
-					   data-toggle 'modal' if view.modal_target else '';
-					   data-ams-url view.get_url();">
+					   data-ams-url view.get_url();
+					   data-ams-target view.target | nothing;
+					   data-ams-stop-propagation 'true' if view.stop_propagation else None;
+					   data-toggle 'modal' if view.modal_target else None;">
 		<i tal:attributes="class view.label_css_class"></i>&nbsp;
 		<tal:var content="view.label" />
 	</a>