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

2018-05-27 Thread Aditya Sharma (JIRA)

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

Aditya Sharma commented on OFBIZ-9846:
--

I have updated the definition of the macro and it needs to be updated in 
various other macro files which I missed out. Pardon me for any inconvenience 
caused.

Uploaded a new patch for the fix.

Executed ./gradlew testIntegration and all tests passed.

> 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
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-9846.patch, OFBIZ-9846.patch
>
>




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


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

2018-05-27 Thread Jacques Le Roux (JIRA)

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

Jacques Le Roux commented on OFBIZ-9846:


Hi Aditya,

Actually when you look at [my 
commit|http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl?r1=1832307&r2=1832306&pathrev=1832307]
 you will see that I did not add
{code}
+<#--<#if parameterList?has_content>-->
+<#--<#list parameterList as parameter>-->
+<#--<#local params += ",'${parameter.name}': 
'${parameter.value}'">-->
+<#>
+<#>
{code}
which was only in your patch ;) 

> 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: Jacques Le Roux
>Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-9846.patch
>
>




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


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

2018-05-26 Thread Aditya Sharma (JIRA)

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

Aditya Sharma commented on OFBIZ-9846:
--

Thanks Jacques :)

Actually, I just forgot to mention that the above code was already commented 
out so I kept it as it was instead of removing it. I found it quite absurd as 
for common-theme the above code is not commented and parameters are passed with 
data. 
{quote}-            <#--list parameterList as parameter>
-                 "${[parameter.name|http://parameter.name/]}": 
"${parameter.value}",
-             
{quote}
[https://markmail.org/message/ameuyjq6ik776mkg] 

Apart from that, we can remove unused 
themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl file. It may have been 
committed by mistake.

> 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: Jacques Le Roux
>Priority: Minor
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-9846.patch
>
>




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


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

2018-05-12 Thread Aditya Sharma (JIRA)

[ 
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)