[ofbiz-framework] branch release17.12 updated: Fixed: Form to add an employee position doesn't function properly when invoked from Humanres tree (OFBIZ-11684) 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 loade [...]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release17.12 updated: Fixed: Form to add an employee position doesn't function properly when invoked from Humanres tree (OFBIZ-11684) 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 loade [...]

adityasharma
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/release17.12 by this push:
     new d75ef82  Fixed: Form to add an employee position doesn't function properly when invoked from Humanres tree  (OFBIZ-11684) 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 Glob [...]
d75ef82 is described below

commit d75ef8212d378db1de8d5760761df2f10cdc7daf
Author: Aditya Sharma <[hidden email]>
AuthorDate: Sat Mar 27 20:19:22 2021 +0530

    Fixed: Form to add an employee position doesn't function properly when invoked from Humanres tree  (OFBIZ-11684)
    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 b7ee8ee..601ef80 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: {