You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "James Yong (Jira)" <ji...@apache.org> on 2020/05/10 04:50:00 UTC
[jira] [Commented] (OFBIZ-11686) widget tag
[ https://issues.apache.org/jira/browse/OFBIZ-11686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17103648#comment-17103648 ]
James Yong commented on OFBIZ-11686:
------------------------------------
Uploaded the patch.
Also changed the following as an example:
{code:xml}
<platform-specific>
<html>
<html-template location="component://order/template/order/FindOrders.ftl"/>
</html>
</platform-specific>
{code}
to
{code:xml}
<platform-specific>
<html>
<script-template location="component://order/template/order/FindOrders.js.ftl"/>
<html-template location="component://order/template/order/FindOrders.ftl"/>
</html>
</platform-specific>
{code}
The inline script originally in FindOrders.ftl is moved to FindOrders.js.ftl.
> <script-template> widget tag
> ----------------------------
>
> Key: OFBIZ-11686
> URL: https://issues.apache.org/jira/browse/OFBIZ-11686
> Project: OFBiz
> Issue Type: Improvement
> Components: framework/widget
> Affects Versions: Upcoming Branch
> Reporter: James Yong
> Assignee: James Yong
> Priority: Minor
> Fix For: Trunk
>
> Attachments: OFBIZ-11686.patch
>
>
> Propose a new <script-template> widget tag that adds an external script after body tag.
> The external script will contain the rendered result of the specified template file location.
> e.g.
> {code:xml}
> <html>
> <script-template location="component://order/template/quote/test.ftl"/>
> {code}
> <platform-specific>
> will render as:
> {code:xml}
> </body>
> <script src=“/ordermgr/control/getJs?name=test” type="application/javascript"/></script>
> </html>
> {code}
> This will allow inline script from a freemarker file, to be rendered as external script in html.
>
> Discussion was started at [https://lists.apache.org/thread.html/r7f8db3a8f5de057c5c5ca6c00608e477acfeaf5507a20b72b8daa3a8%40%3Cdev.ofbiz.apache.org%3E]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)