You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/07/02 15:29:00 UTC

[jira] [Commented] (OFBIZ-12268) Improve js function OfbizUtil.ajaxSubmitFormUpdateAreas

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

ASF subversion and git services commented on OFBIZ-12268:
---------------------------------------------------------

Commit 2a509be3a9353aed580c21ab3fe84460ac7a7d9f in ofbiz-framework's branch refs/heads/trunk from Nicolas Malin
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2a509be ]

Improved: Improve js function OfbizUtil.ajaxSubmitFormUpdateAreas (OFBIZ-12268)

At this time the function ajaxSubmitFormUpdateAreas present on themes/common-theme/webapp/common/js/util/OfbizUtil.js take a form, submit it thought ajax and wait a success to analyse a json result for update an area with the cvsAreaString given on parameter.

I realized different improvements :

 * refactoring some js code to centralize the analyze of json result for check if the call is a success or error
 * Analyze the content-type of the response if is a json continue as before, else take the return and update first area (useful for submit search or filtering form)
 * Manage the case who the ajax call failed and we inform the user
 * Add a trigger to force the modal close on submit success

Thanks to Leila Mekika, Marie-Aline Pantais and Gil Portenseigne for looking on that.


> Improve js function OfbizUtil.ajaxSubmitFormUpdateAreas
> -------------------------------------------------------
>
>                 Key: OFBIZ-12268
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12268
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: themes
>    Affects Versions: Trunk
>            Reporter: Nicolas Malin
>            Assignee: Nicolas Malin
>            Priority: Minor
>              Labels: ajax, js, screen, theme
>         Attachments: OFBIZ-12268.patch
>
>
> At this time the function ajaxSubmitFormUpdateAreas present on themes/common-theme/webapp/common/js/util/OfbizUtil.js take a form, submit it thought ajax and wait a success to analyse a json result for update an area with the cvsAreaString given on paramater.
> I propose different imrpovements :
>  * refactoring some js code to centralize the analyze of json result for check if the call is a success or error
>  * Analyze the content-type of the response if is a json continue as before, else take the return and update first area (useful for submit search or filtering form)
>  * Manage the case who the ajax call failed and we inform the user
>  * Add a trigger to force the modal close on submit success



--
This message was sent by Atlassian Jira
(v8.3.4#803005)