Use "resource_path" TALES extension to get resource URL
authorThierry Florac <thierry.florac@onf.fr>
Tue, 16 May 2017 11:06:31 +0200
changeset 79 5726318eeb90
parent 78 70361525c66b
child 80 bebdf1365369
Use "resource_path" TALES extension to get resource URL
src/pyams_content/shared/imagemap/zmi/templates/summary.pt
src/pyams_content/shared/imagemap/zmi/templates/widget-input.pt
--- a/src/pyams_content/shared/imagemap/zmi/templates/summary.pt	Tue May 16 11:05:57 2017 +0200
+++ b/src/pyams_content/shared/imagemap/zmi/templates/summary.pt	Tue May 16 11:06:31 2017 +0200
@@ -3,7 +3,7 @@
 		<legend class="inner" i18n:translate="">Image areas preview</legend>
 		<div class="padding-y-5"
 			 data-ams-plugins="pyams_content"
-			 data-ams-plugin-pyams_content-src="/--static--/pyams_content/js/pyams_content{MyAMS.devext}.js">
+			 tal:attributes="data-ams-plugin-pyams_content-src extension:resource_path('pyams_content.skin:pyams_content')">
 			<img usemap="#imagemap_preview"
 				 tal:define="image i18n:context.image"
 				 tal:attributes="src extension:absolute_url(image);"
--- a/src/pyams_content/shared/imagemap/zmi/templates/widget-input.pt	Tue May 16 11:05:57 2017 +0200
+++ b/src/pyams_content/shared/imagemap/zmi/templates/widget-input.pt	Tue May 16 11:06:31 2017 +0200
@@ -1,5 +1,5 @@
 <label data-ams-plugins="pyams_content"
-	   data-ams-plugin-pyams_content-src="/--static--/pyams_content/js/pyams_content{MyAMS.devext}.js">
+	   tal:attributes="data-ams-plugin-pyams_content-src extension:resource_path('pyams_content.skin:pyams_content')">
 	<input type="hidden"
 		   tal:attributes="id view/id;
 						   name view/name;