Use "resource_path" TALES extension to get resource URL
authorThierry Florac <thierry.florac@onf.fr>
Tue, 16 May 2017 11:18:46 +0200
changeset 77 10d2372f54bb
parent 76 f63c594fe40c
child 78 c495f40d039e
Use "resource_path" TALES extension to get resource URL
src/pyams_security/views/templates/social-login.pt
src/pyams_security/zmi/widget/templates/ordered-list-input.pt
--- a/src/pyams_security/views/templates/social-login.pt	Tue Nov 22 21:06:58 2016 +0100
+++ b/src/pyams_security/views/templates/social-login.pt	Tue May 16 11:18:46 2017 +0200
@@ -1,7 +1,7 @@
 <div class="social">
 	<span tal:condition="view.use_popup"
 		  data-ams-plugins="pyams_security"
-		  data-ams-plugin-pyams_security-src="/--static--/pyams_security/js/security{MyAMS.devext}.js"
+		  tal:attributes="data-ams-plugin-pyams_security-src extension:resource_path('pyams_security:pyams_security')"
 		  data-ams-plugin-pyams_security-callback="PyAMS_security.init_social"></span>
 	<span>Login with: </span>
 	<tal:loop repeat="provider view.providers">
--- a/src/pyams_security/zmi/widget/templates/ordered-list-input.pt	Tue Nov 22 21:06:58 2016 +0100
+++ b/src/pyams_security/zmi/widget/templates/ordered-list-input.pt	Tue May 16 11:18:46 2017 +0200
@@ -1,9 +1,9 @@
 <table class="table table-bordered table-striped table-hover table-tight table-dnd"
 	   data-ams-tablednd-drop-target="MyAMS.container.changeOrder"
 	   data-ams-plugins="pyams_security"
-	   data-ams-plugin-pyams_security-src="/--static--/pyams_security/js/security.min.js"
 	   tal:attributes="id string:${view/field/getName}_list;
-					   data-ams-input-name view/name;">
+					   data-ams-input-name view/name;
+					   data-ams-plugin-pyams_security-src extension:resource_path('pyams_security:pyams_security');">
 	<input type="hidden"
 		   tal:attributes="id view/id;
 						   name view/name;