You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Aditya Sharma (JIRA)" <ji...@apache.org> on 2018/05/12 07:36:00 UTC

[jira] [Commented] (OFBIZ-9846) Replace Inline js with External js in renderFormClose macro

    [ https://issues.apache.org/jira/browse/OFBIZ-9846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472964#comment-16472964 ] 

Aditya Sharma commented on OFBIZ-9846:
--------------------------------------

Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the form.
Used attribute selector to find elements and set focus on the particular field.

Added "requireValidation" class to all the forms with required fields.

Used the class selector to find such forms & attached Validator plugin to it.

Steps to verify:

Add ProdCatalog page: [#https://localhost:8443/catalog/control/EditProdCatalog] 

Dialogs: 
New Example dialog on Find Example page https://localhost:8443/example/control/FindExample
 # Go to Find Example page (https://localhost:8443/example/control/FindExample)
 # Click on New Example button
 # Validations should work in dialog on form submit.

Additional Changes:

Link for dialog in HtmlMenuMacroLibrary still had the inline code. Replaced the code with external js code.

Validations on forms rendered with renderSubmitField macro from HtmlFormMacroLibrary.ftl seems not working [#https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee], will create a separate ticket for it. 

I observed that HtmlMenuMacroLibrary.ftl for rainbowstone is redundant at path themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl and themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl. The file at is themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl is not used and can be removed.

> Replace Inline js with External js in renderFormClose macro
> -----------------------------------------------------------
>
>                 Key: OFBIZ-9846
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9846
>             Project: OFBiz
>          Issue Type: Sub-task
>    Affects Versions: Trunk
>            Reporter: Aditya Sharma
>            Assignee: Aditya Sharma
>            Priority: Minor
>         Attachments: OFBIZ-9846.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)