ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adityasha...@apache.org
Subject [ofbiz-framework] branch release18.12 updated: Fixed: Form to add an employee position doesn't function properly when invoked from Humanres tree (OFBIZ-11684) (#289)
Date Tue, 30 Mar 2021 05:28:13 GMT
This is an automated email from the ASF dual-hosted git repository.

adityasharma pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 7c1d9bf  Fixed: Form to add an employee position doesn't function properly when invoked
from Humanres tree  (OFBIZ-11684) (#289)
7c1d9bf is described below

commit 7c1d9bfded3b65194a643caad62c7d0f3a8b18f1
Author: Aditya Sharma <adityasharma@apache.org>
AuthorDate: Tue Mar 30 10:58:00 2021 +0530

    Fixed: Form to add an employee position doesn't function properly when invoked from Humanres
tree  (OFBIZ-11684) (#289)
    
    Replaced logic to ajaxify the response from EditEmplPosition with navigating user to EditEmplPosition
page.
    When we are getting the entire page and updating it into the DOM, it would be better if
we navigate user to the page.
    Issue with the current approach is current page and the EditEmplPosition page both have
GlobalActions decorator all the js files in GlobalActions are loaded twice. Either we should
ajaxify a section of page or we should navigate user to the EditEmplPosition page.
    
    Thanks Pierre Smits for reporting the issue and Sebastian Berg, Michael Brohl, & Jacques
Le Roux for the discussion and efforts
---
 applications/humanres/template/category/CategoryTree.ftl | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/applications/humanres/template/category/CategoryTree.ftl b/applications/humanres/template/category/CategoryTree.ftl
index 10a08ac..7bcb7f6 100644
--- a/applications/humanres/template/category/CategoryTree.ftl
+++ b/applications/humanres/template/category/CategoryTree.ftl
@@ -121,19 +121,7 @@ var rawdata = [
         EmpPosition: { 
             label: "Add Employee Position",
             action: function (NODE, TREE_OBJ) {
-                var dataSet = {};
-                dataSet = {"partyId" : NODE.attr("id")};
-                jQuery.ajax({
-                    type: "GET",
-                    url: "EditEmplPosition",
-                    data: dataSet,
-                    error: function(msg) {
-                        alert("An error occurred loading content! : " + msg);
-                    },
-                    success: function(msg) {
-                        jQuery('div.page-container').html(msg);
-                    }
-                });
+                window.location.href = "EditEmplPosition?partyId=" + NODE.attr("id");
             }
         },
         AddIntOrg: { 

Mime
View raw message