|
Author: hansbak
Date: Fri Sep 9 08:37:21 2011 New Revision: 1167042 URL: http://svn.apache.org/viewvc?rev=1167042&view=rev Log: be able to change the HR tree with the right mouse button adding orginazations, positions and employees, contribution of kookai Added: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml (with props) ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl (with props) ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl (with props) ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl (with props) ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl (with props) ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl (with props) Modified: ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml ofbiz/trunk/applications/humanres/webapp/humanres/humanres/category/CategoryTree.ftl ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml Added: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml?rev=1167042&view=auto ============================================================================== --- ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml (added) +++ ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml Fri Sep 9 08:37:21 2011 @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd"> + <simple-method method-name="createInternalOrg" short-description=""> + <set field="internalCtx.partyIdFrom" from-field="parameters.headpartyId"/> + <set field="internalCtx.partyIdTo" from-field="parameters.partyId"/> + <set field="internalCtx.partyRelationshipTypeId" value="GROUP_ROLLUP"/> + <set field="internalCtx.roleTypeIdFrom" value="INTERNAL_ORGANIZATIO"/> + <set field="internalCtx.roleTypeIdTo" value="INTERNAL_ORGANIZATIO"/> + <call-service service-name="createPartyRelationship" in-map-name="internalCtx"></call-service> + </simple-method> + <simple-method method-name="removeEmlpPosition" short-description=""> + <entity-and list="emplPositionFulfillment" entity-name="EmplPositionFulfillment"> + <field-map field-name="emplPositionId" from-field="parameters.emplPositionId"/> + <field-map field-name="partyId" from-field="parameters.partyId"/> + </entity-and> + <if-not-empty field="emplPositionFulfillment"> + <set field="parameters.fromDate" from-field="emplPositionFulfillment[0].fromDate"/> + <set-service-fields service-name="deleteEmplPositionFulfillment" to-map="delFullfillCtx" map="parameters"/> + <call-service service-name="deleteEmplPositionFulfillment" in-map-name="delFullfillCtx"></call-service> + </if-not-empty> + + <set-service-fields service-name="deleteEmplPosition" to-map="delEmlpCtx" map="parameters"/> + <call-service service-name="deleteEmplPosition" in-map-name="delEmlpCtx"></call-service> + </simple-method> + <simple-method method-name="removeInternalOrg" short-description=""> + <entity-and list="partyRelationship" entity-name="PartyRelationship"> + <field-map field-name="partyIdTo" from-field="parameters.partyId"/> + <field-map field-name="partyIdFrom" from-field="parameters.parentpartyId"/> + </entity-and> + <if-not-empty field="partyRelationship"> + <set field="fromDate" from-field="partyRelationship[0].fromDate"/> + </if-not-empty> + <set field="orgRelCtx.partyIdTo" from-field="parameters.partyId"/> + <set field="orgRelCtx.partyIdFrom" from-field="parameters.parentpartyId"/> + <set field="orgRelCtx.fromDate" from-field="fromDate"/> + <call-service service-name="deletePartyRelationship" in-map-name="orgRelCtx"></call-service> + </simple-method> +</simple-methods> \ No newline at end of file Propchange: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResEvents.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java?rev=1167042&r1=1167041&r2=1167042&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java (original) +++ ofbiz/trunk/applications/humanres/src/org/ofbiz/humanres/HumanResEvents.java Fri Sep 9 08:37:21 2011 @@ -54,6 +54,61 @@ public class HumanResEvents { List categoryList = FastList.newInstance(); List<GenericValue> childOfComs; + //check employee position + try { + List<GenericValue> isEmpl = delegator.findByAnd("EmplPosition", UtilMisc.toMap( + "emplPositionId", partyId)); + if (UtilValidate.isNotEmpty(isEmpl)) { + String emplId = partyId; + List<GenericValue> emlpfillCtxs = EntityUtil.filterByDate(delegator.findByAnd("EmplPositionFulfillment", UtilMisc.toMap( + "emplPositionId", emplId))); + if (UtilValidate.isNotEmpty(emlpfillCtxs)) { + for (GenericValue emlpfillCtx : emlpfillCtxs ) { + String memberId = emlpfillCtx.getString("partyId"); + GenericValue memCtx = delegator.findByPrimaryKey("Person" ,UtilMisc.toMap("partyId", memberId)); + String title = null; + if (UtilValidate.isNotEmpty(memCtx)) { + String firstname = (String) memCtx.get("firstName"); + String lastname = (String) memCtx.get("lastName"); + if (UtilValidate.isEmpty(lastname)) { + lastname = ""; + } + if (UtilValidate.isEmpty(firstname)) { + firstname = ""; + } + title = firstname +" "+ lastname; + } + GenericValue memGroupCtx = delegator.findByPrimaryKey("PartyGroup" ,UtilMisc.toMap("partyId", memberId)); + if (UtilValidate.isNotEmpty(memGroupCtx)) { + title = memGroupCtx.getString("groupName"); + } + + Map josonMap = FastMap.newInstance(); + Map dataMap = FastMap.newInstance(); + Map dataAttrMap = FastMap.newInstance(); + Map attrMap = FastMap.newInstance(); + + dataAttrMap.put("onClick", onclickFunction + "('" + memberId + additionParam + "')"); + + String hrefStr = hrefString + memberId; + if (UtilValidate.isNotEmpty(hrefString2)) { + hrefStr = hrefStr + hrefString2; + } + dataAttrMap.put("href", hrefStr); + dataMap.put("attr", dataAttrMap); + attrMap.put("id", memberId); + josonMap.put("attr",attrMap); + dataMap.put("title", title); + josonMap.put("data", dataMap); + + categoryList.add(josonMap); + } + toJsonObjectList(categoryList,response); + } + } + } catch (Exception e) { + e.printStackTrace(); + } try { GenericValue partyGroup = delegator.findByPrimaryKey("PartyGroup" ,UtilMisc.toMap("partyId", partyId)); @@ -85,7 +140,10 @@ public class HumanResEvents { //Check child existing List<GenericValue> childOfSubComs = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", UtilMisc.toMap( "partyIdFrom", catId, "partyRelationshipTypeId", "GROUP_ROLLUP"))); - if (UtilValidate.isNotEmpty(childOfSubComs)) { + //check employee position + List<GenericValue> isPosition = delegator.findByAnd("EmplPosition", UtilMisc.toMap( + "partyId", catId)); + if (UtilValidate.isNotEmpty(childOfSubComs) || UtilValidate.isNotEmpty(isPosition)) { josonMap.put("state", "closed"); } @@ -113,6 +171,7 @@ public class HumanResEvents { dataMap.put("attr", dataAttrMap); + attrMap.put("rel", "Y"); attrMap.put("id", catId); josonMap.put("attr",attrMap); dataMap.put("title", title); @@ -120,8 +179,47 @@ public class HumanResEvents { categoryList.add(josonMap); } - toJsonObjectList(categoryList,response); + + } + + List<GenericValue> childOfEmpls = delegator.findByAnd("EmplPosition", UtilMisc.toMap( + "partyId", partyId)); + if (UtilValidate.isNotEmpty(childOfEmpls)) { + for (GenericValue childOfEmpl : childOfEmpls ) { + Map emplMap = FastMap.newInstance(); + Map emplAttrMap = FastMap.newInstance(); + Map empldataMap = FastMap.newInstance(); + Map emplDataAttrMap = FastMap.newInstance(); + + String emplId = (String) childOfEmpl.get("emplPositionId"); + String typeId = (String) childOfEmpl.get("emplPositionTypeId"); + //check child + List<GenericValue> emlpfCtxs = EntityUtil.filterByDate(delegator.findByAnd("EmplPositionFulfillment", UtilMisc.toMap( + "emplPositionId", emplId))); + if (UtilValidate.isNotEmpty(emlpfCtxs)) { + emplMap.put("state", "closed"); + } + + GenericValue emplContext = delegator.findByPrimaryKey("EmplPositionType" ,UtilMisc.toMap("emplPositionTypeId", typeId)); + String title = null; + if (UtilValidate.isNotEmpty(emplContext)) { + title = (String) emplContext.get("description") + " " +"["+ emplId +"]"; + } + String hrefStr = "emplPositionView?emplPositionId=" + emplId; + empldataMap.put("title", title); + emplAttrMap.put("href", hrefStr); + emplAttrMap.put("onClick", "callEmplDocument" + "('" + emplId + "')"); + empldataMap.put("attr", emplAttrMap); + emplMap.put("data", empldataMap); + emplDataAttrMap.put("id", emplId); + emplDataAttrMap.put("rel", "N"); + emplMap.put("attr",emplDataAttrMap); + emplMap.put("title",title); + categoryList.add(emplMap); + } } + + toJsonObjectList(categoryList,response); } } catch (Exception e) { e.printStackTrace(); Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy?rev=1167042&r1=1167041&r2=1167042&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy (original) +++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy Fri Sep 9 08:37:21 2011 @@ -38,6 +38,7 @@ import java.util.List; completedTree = FastList.newInstance(); completedTreeContext = FastList.newInstance(); existParties = FastList.newInstance(); +subtopLists = FastList.newInstance(); //internalOrg list partyRelationships = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", [partyIdFrom : partyId, partyRelationshipTypeId : "GROUP_ROLLUP"])); @@ -55,33 +56,14 @@ if (partyRelationships) { partyGroupMap.put("partyId", partyGroup.getString("partyId")); partyGroupMap.put("groupName", partyGroup.getString("groupName")); completedTreeContext.add(partyGroupMap); + + subtopLists.addAll(partyRelationship.getString("partyIdTo")); } partyRootMap.put("child", completedTreeContext); completedTree.add(partyRootMap); - + } // The complete tree list for the category tree context.completedTree = completedTree; -//Filter Existing parties -existPartiesContexts = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", [partyIdFrom : partyId])); -if (existPartiesContexts) { - for(existPartiesContext in existPartiesContexts) { - partyGroup = delegator.findByPrimaryKey("PartyGroup", [partyId : existPartiesContext.getString("partyIdTo")]); - if (partyGroup) { - partyGroupMap = FastMap.newInstance(); - partyGroupMap.put("partyId", partyGroup.getString("partyId")); - partyGroupMap.put("name", partyGroup.getString("groupName")); - existParties.add(partyGroupMap); - } - person = delegator.findByPrimaryKey("Person", [partyId : existPartiesContext.getString("partyIdTo")]); - if (person) { - personMap = FastMap.newInstance(); - personMap.put("partyId", person.getString("partyId")); - personMap.put("name", person.getString("firstName")); - existParties.add(personMap); - } - } -} -context.existParties = existParties; -println'=============================================== existParties : '+existParties; +context.subtopLists = subtopLists; Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml?rev=1167042&r1=1167041&r2=1167042&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/controller.xml Fri Sep 9 08:37:21 2011 @@ -1059,6 +1059,56 @@ under the License. <event type="java" path="org.ofbiz.humanres.HumanResEvents" invoke="getChildHRCategoryTree"/> <response name="success" type="none"/> </request-map> + <request-map uri="createInternalOrg"> + <security https="true" auth="true"/> + <event type="simple" path="component://humanres/script/org/ofbiz/humanres/HumanResEvents.xml" invoke="createInternalOrg"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="main"/> + </request-map> + <request-map uri="removeEmlpPosition"> + <security https="true" auth="true"/> + <event type="simple" path="component://humanres/script/org/ofbiz/humanres/HumanResEvents.xml" invoke="removeEmlpPosition"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="main"/> + </request-map> + <request-map uri="removeInternalOrg"> + <security https="true" auth="true"/> + <event type="simple" path="component://humanres/script/org/ofbiz/humanres/HumanResEvents.xml" invoke="removeInternalOrg"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="main"/> + </request-map> + <request-map uri="EditEmlPositionFtl"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditEmlPositionFtl"/> + </request-map> + <request-map uri="EditInternalOrgFtl"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditInternalOrgFtl"/> + </request-map> + <request-map uri="RemoveEmlPositionFtl"> + <security https="true" auth="true"/> + <response name="success" type="view" value="RemoveEmlPositionFtl"/> + </request-map> + <request-map uri="RemoveInternalOrgFtl"> + <security https="true" auth="true"/> + <response name="success" type="view" value="RemoveInternalOrgFtl"/> + </request-map> + <request-map uri="EditPerson"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditPerson"/> + </request-map> + <request-map uri="createEmplPositionFtl"> + <security https="true" auth="true"/> + <event type="service" invoke="createEmplPosition"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="EditEmplPosition"/> + </request-map> + <request-map uri="createEmplPositionFulfillmentFtl"> + <security https="true" auth="true"/> + <event type="service" invoke="createEmplPositionFulfillment"/> + <response name="success" type="view" value="main"/> + </request-map> + <!-- ===================Lookup Request===================== --> <request-map uri="LookupPartyName"><security auth="true" https="true"/><response name="success" type="view" value="LookupPartyName"/></request-map> <request-map uri="LookupPayment"><security auth="true" https="true"/><response name="success" type="view" value="LookupPayment"/></request-map> @@ -1167,6 +1217,11 @@ under the License. <view-map name="EditEmplLeaveReasonTypes" type="screen" page="component://humanres/widget/GlobalHRSettingScreens.xml#EditEmplLeaveReasonTypes"/> <view-map name="FindLeaveApprovals" type="screen" page="component://humanres/widget/EmplLeaveScreens.xml#FindLeaveApprovals"/> <view-map name="EditEmplLeaveStatus" type="screen" page="component://humanres/widget/EmplLeaveScreens.xml#EditEmplLeaveStatus"/> + <view-map name="EditEmlPositionFtl" type="screen" page="component://humanres/widget/EmplPositionScreens.xml#EditEmplPositionFtl"/> + <view-map name="EditInternalOrgFtl" type="screen" page="component://humanres/widget/EmplPositionScreens.xml#EditInternalOrgFtl"/> + <view-map name="RemoveEmlPositionFtl" type="screen" page="component://humanres/widget/EmplPositionScreens.xml#RemoveEmlPositionFtl"/> + <view-map name="RemoveInternalOrgFtl" type="screen" page="component://humanres/widget/EmplPositionScreens.xml#RemoveInternalOrgFtl"/> + <view-map name="EditPerson" type="screen" page="component://humanres/widget/EmplPositionScreens.xml#EditPerson"/> <!-- ==================Recruitment View Map===================== --> <view-map name="FindJobRequisitions" type="screen" page="component://humanres/widget/RecruitmentScreens.xml#FindJobRequisitions"/> Modified: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/category/CategoryTree.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/humanres/category/CategoryTree.ftl?rev=1167042&r1=1167041&r2=1167042&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/humanres/category/CategoryTree.ftl (original) +++ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/category/CategoryTree.ftl Fri Sep 9 08:37:21 2011 @@ -36,7 +36,7 @@ var rawdata = [ <#list rootCat as root> { "data": {"title" : unescapeHtmlText("<#if root.groupName?exists>${root.groupName?js_string} [${root.partyId}]<#else>${root.partyId?js_string}</#if>"), "attr": {"href" : "<@ofbizUrl>/viewprofile?partyId=${root.partyId}</@ofbizUrl>","onClick" : "callDocument('${root.partyId}');"}}, - "attr": {"id" : "${root.partyId}", "rel" : "root"} + "attr": {"id" : "${root.partyId}", "rel" : "Y"} <#if root.child?exists> ,"state" : "closed" </#if> @@ -58,7 +58,7 @@ var rawdata = [ jQuery("#tree").jstree({ "core" : { "initially_open" : [ "${partyId}" ] }, - "plugins" : [ "themes", "json_data","ui" ,"cookies", "types", "crrm"], + "plugins" : [ "themes", "json_data","ui" ,"cookies", "types", "crrm", "contextmenu"], "json_data" : { "data" : rawdata, "ajax" : { "url" : "<@ofbizUrl>getHRChild</@ofbizUrl>", "type" : "POST", @@ -82,7 +82,8 @@ var rawdata = [ } } } - } + }, + "contextmenu": {items: customMenu} }); }); } @@ -106,6 +107,117 @@ var rawdata = [ }); } -</script> + function callEmplDocument(id,type) { + //jQuerry Ajax Request + var dataSet = {}; + URL = 'emplPositionView'; + dataSet = {"emplPositionId" : id, "ajaxUpdateEvent" : "Y"}; + + jQuery.ajax({ + url: URL, + type: 'POST', + data: dataSet, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('div.contentarea').html(msg); + } + }); + } + + function customMenu(node) { + // The default set of all items + if(node.attr('rel')=='Y'){ + var items = { + EmpPosition: { + label: "Add Employee Position", + action: function (NODE, TREE_OBJ) { + var dataSet = {}; + dataSet = {"partyId" : NODE.attr("id")}; + jQuery.ajax({ + type: "GET", + url: "EditEmlPositionFtl", + data: dataSet, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('#dialog').html(msg); + } + }); + } + }, + AddIntOrg: { + label: "Add Internal Organization", + action: function (NODE, TREE_OBJ) { + var dataSet = {}; + dataSet = {"headpartyId" : NODE.attr("id")}; + jQuery.ajax({ + type: "GET", + url: "EditInternalOrgFtl", + data: dataSet, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('#dialog').html(msg); + } + }); + } + }, + RemoveIntOrg: { + label: "Remove Internal Organization", + action: function (NODE, TREE_OBJ) { + var dataSet = {}; + dataSet = {"partyId" : NODE.attr("id"),"parentpartyId" : $.jstree._focused()._get_parent(node).attr("id")}; + jQuery.ajax({ + type: "GET", + url: "RemoveInternalOrgFtl", + data: dataSet, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('#dialog').html(msg); + } + }); + } + } + };} + if(node.attr('rel')=='N'){ + var items = { + AddPerson: { + label: "Add Person", + action: function (NODE, TREE_OBJ) { + var dataSet = {}; + dataSet = {"emplPositionId" : NODE.attr("id")}; + jQuery.ajax({ + type: "GET", + url: "EditPerson", + data: dataSet, + error: function(msg) { + alert("An error occured loading content! : " + msg); + }, + success: function(msg) { + jQuery('#dialog').html(msg); + } + }); + } + } + } + } + if ($(node).hasClass("folder")) { + // Delete the "delete" menu item + delete items.deleteItem; + } + + return items; +} + + +</script> +<div id="dialog" title="Basic dialog"> +</div> <div id="tree"></div> Added: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl?rev=1167042&view=auto ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl (added) +++ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl Fri Sep 9 08:37:21 2011 @@ -0,0 +1,54 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#emplposition" ).dialog({ autoOpen: true, width: 450}); + }); +</script> +<div id="emplposition" title="Add Employee Position"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#EditEmplPositionOnlyForm")} +</div> +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#emplposition" ).dialog({ autoOpen: true, width: 450}); + }); +</script> +<div id="emplposition" title="Add Employee Position"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#EditEmplPositionOnlyForm")} +</div> \ No newline at end of file Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl?rev=1167042&view=auto ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl (added) +++ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl Fri Sep 9 08:37:21 2011 @@ -0,0 +1,27 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#person" ).dialog({ autoOpen: true, width: 450}); + }); +</script> +<div id="person" title="Add Person"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#EditEmplPositionFulfillmentsFtl")} +</div> \ No newline at end of file Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/editperson.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl?rev=1167042&view=auto ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl (added) +++ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl Fri Sep 9 08:37:21 2011 @@ -0,0 +1,54 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#rmvemplposition" ).dialog({ autoOpen: true, width: 900}); + }); +</script> +<div id="rmvemplposition" title="Remove Employee Position"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#RemoveEmplPositionOnlyForm")} +</div> +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#rmvemplposition" ).dialog({ autoOpen: true, width: 900}); + }); +</script> +<div id="rmvemplposition" title="Remove Employee Position"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#RemoveEmplPositionOnlyForm")} +</div> \ No newline at end of file Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl?rev=1167042&view=auto ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl (added) +++ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl Fri Sep 9 08:37:21 2011 @@ -0,0 +1,54 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#internalOrg" ).dialog({ autoOpen: true, width: 350}); + }); +</script> +<div id="internalOrg" title="Add Internal Organization"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#EditInternalOrgOnlyForm")} +</div> +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<script type="text/javascript"> + $("#dialog").dialog('open'); + $(function() { + $( "#internalOrg" ).dialog({ autoOpen: true, width: 350}); + }); +</script> +<div id="internalOrg" title="Add Internal Organization"> + ${screens.render("component://humanres/widget/EmplPositionScreens.xml#EditInternalOrgOnlyForm")} +</div> \ No newline at end of file Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl?rev=1167042&view=auto ============================================================================== --- ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl (added) +++ ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl Fri Sep 9 08:37:21 2011 @@ -0,0 +1,74 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<#assign partyGroup = delegator.findOne("PartyGroup", {"partyId" : parameters.partyId?if_exists}, true)/> +<#if partyGroup?has_content> + <#assign partyname = partyGroup.groupName?if_exists/> +</#if> +<script type="text/javascript"> + <!-- + var answer = confirm ("Are you sure you want to remove '<#if partyname?exists>${partyname}<#else>${parameters.partyId?if_exists}</#if>'?") + if (answer) + document.removeInternalOrg.submit(); + else + window.close(); + // --> +</script> +<div id="rmvinternalorg" title="Remove Internal Organization"> + <form name="removeInternalOrg" method="post" action="<@ofbizUrl>removeInternalOrg</@ofbizUrl>"> + <input type="hidden" name="partyId" value="${parameters.partyId?if_exists}"/> + <input type="hidden" name="parentpartyId" value="${parameters.parentpartyId?if_exists}"/> + </form> +</div> +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<#assign partyGroup = delegator.findOne("PartyGroup", {"partyId" : parameters.partyId?if_exists}, true)/> +<#if partyGroup?has_content> + <#assign partyname = partyGroup.groupName?if_exists/> +</#if> +<script type="text/javascript"> + <!-- + var answer = confirm ("Are you sure you want to remove '<#if partyname?exists>${partyname}<#else>${parameters.partyId?if_exists}</#if>'?") + if (answer) + document.removeInternalOrg.submit(); + else + window.close(); + // --> +</script> +<div id="rmvinternalorg" title="Remove Internal Organization"> + <form name="removeInternalOrg" method="post" action="<@ofbizUrl>removeInternalOrg</@ofbizUrl>"> + <input type="hidden" name="partyId" value="${parameters.partyId?if_exists}"/> + <input type="hidden" name="parentpartyId" value="${parameters.parentpartyId?if_exists}"/> + </form> +</div> \ No newline at end of file Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml?rev=1167042&r1=1167041&r2=1167042&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml (original) +++ ofbiz/trunk/applications/humanres/widget/EmplPositionScreens.xml Fri Sep 9 08:37:21 2011 @@ -301,4 +301,100 @@ </widgets> </section> </screen> + <screen name="EditEmplPositionFtl"> + <section> + <widgets> + <platform-specific><html><html-template location="component://humanres/webapp/humanres/humanres/emplposition/editemplposition.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + <screen name="EditEmplPositionOnlyForm"> + <section> + <actions> + <set field="titleProperty" value="PageTitleEditEmplPosition"/> + <set field="tabButtonItem" value="EditEmplPosition"/> + <set field="emplPositionId" from-field="parameters.emplPositionId"/> + <property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <entity-one entity-name="EmplPosition" value-field="emplPosition"/> + </actions> + <widgets> + <include-form name="EditEmplPositionFtl" location="component://humanres/widget/forms/EmplPositionForms.xml"/> + </widgets> + </section> + </screen> + <screen name="EditInternalOrgFtl"> + <section> + <actions> + </actions> + <widgets> + <platform-specific><html><html-template location="component://humanres/webapp/humanres/humanres/internalorg/editinternalorg.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + <screen name="EditInternalOrgOnlyForm"> + <section> + <actions> + <set field="titleProperty" value="PageTitleEditInternalOrg"/> + <set field="tabButtonItem" value="EditInternalOrg"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <entity-one entity-name="PartyRole" value-field="partyRole"/> + </actions> + <widgets> + <include-form name="ListInternalOrg" location="component://humanres/widget/forms/EmplPositionForms.xml"/> + </widgets> + </section> + </screen> + <screen name="RemoveEmlPositionFtl"> + <section> + <widgets> + <platform-specific><html><html-template location="component://humanres/webapp/humanres/humanres/emplposition/removeemplposition.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + <screen name="RemoveEmplPositionOnlyForm"> + <section> + <actions> + <set field="titleProperty" value="PageTitleRemoveEmplPosition"/> + <set field="tabButtonItem" value="RemoveEmplPosition"/> + <property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <entity-one entity-name="EmplPosition" value-field="emplPosition"/> + </actions> + <widgets> + <include-form name="ListEmplPositionsFtl" location="component://humanres/widget/forms/EmplPositionForms.xml"/> + </widgets> + </section> + </screen> + <screen name="RemoveInternalOrgFtl"> + <section> + <widgets> + <platform-specific><html><html-template location="component://humanres/webapp/humanres/humanres/internalorg/removeinternalorg.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> + <screen name="EditEmplPositionFulfillmentsFtl"> + <section> + <actions> + <set field="titleProperty" value="PageTitleListEmplPositionFulfillments"/> + <set field="tabButtonItem" value="EditEmplPositionFulfillments"/> + <property-map resource="HumanResUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/> + <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/> + <set field="emplPositionId" from-field="parameters.emplPositionId"/> + </actions> + <widgets> + <screenlet id="AddEmplPositionFulfillmentPanel"> + <include-form name="AddEmplPositionFulfillmentFtl" location="component://humanres/widget/forms/EmplPositionForms.xml"/> + </screenlet> + </widgets> + </section> + </screen> + <screen name="EditPerson"> + <section> + <widgets> + <platform-specific><html><html-template location="component://humanres/webapp/humanres/humanres/emplposition/editperson.ftl"/></html></platform-specific> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml?rev=1167042&r1=1167041&r2=1167042&view=diff ============================================================================== --- ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml (original) +++ ofbiz/trunk/applications/humanres/widget/forms/EmplPositionForms.xml Fri Sep 9 08:37:21 2011 @@ -98,6 +98,9 @@ under the License. <field name="submitButton" use-when="emplPosition==null" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field> <field name="submitButton" use-when="emplPosition!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field> </form> + <form name="EditEmplPositionFtl" type="single" extends="EditEmplPosition"> + <alt-target use-when="emplPosition==null" target="createEmplPositionFtl"/> + </form> <form name="ListEmplPositionFulfillments" type="list" target="updateEmplPositionFulfillment" title="" paginate-target="findEmplPositionFulfillments" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> <actions> @@ -329,4 +332,48 @@ under the License. <auto-fields-service service-name="updateEmplPositionReportingStruct" default-field-type="display"/> <field name="emplPositionIdReportingTo"><hidden/></field> </form> + <form name="ListInternalOrg" type="single" target="createInternalOrg" default-map-name="partyRole" + header-row-style="header-row" default-table-style="basic-table"> + <field name="headpartyId" parameter-name="headpartyId"><hidden /></field> + <field name="partyId"> + <drop-down allow-empty="false"> + <entity-options description="${partyId}" entity-name="PartyRole" key-field-name="partyId"> + <entity-constraint name="roleTypeId" value="INTERNAL_ORGANIZATIO"/> + <entity-order-by field-name="partyId"/> + </entity-options> + </drop-down> + </field> + <field name="dummy1" title="${uiLabelMap.CommonEmptyHeader}" position="1"><display/></field> + <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field> + </form> + <form name="ListEmplPositionsFtl" extends="ListEmplPositions"> + <field name="salaryFlag"><hidden/></field> + <field name="exemptFlag"><hidden/></field> + <field name="fulltimeFlag"><hidden/></field> + <field name="temporaryFlag"><hidden/></field> + <field name="actualFromDate"><hidden/></field> + <field name="actualThruDate"><hidden/></field> + <field name="removeButton" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext"> + <hyperlink description="${uiLabelMap.CommonRemove}" target="removeEmlpPosition"> + <parameter param-name="emplPositionId"/> + <parameter param-name="partyId"/> + </hyperlink> + </field> + </form> + <form name="AddEmplPositionFulfillmentFtl" type="single" target="createEmplPositionFulfillmentFtl" + header-row-style="header-row" default-table-style="basic-table"> + <auto-fields-service service-name="createEmplPositionFulfillment"/> + <field name="partyId" tooltip="${uiLabelMap.CommonRequired}"> + <drop-down allow-empty="false" > + <entity-options description="${partyId}" entity-name="PartyRole" key-field-name="partyId"> + <entity-constraint name="roleTypeId" value="EMPLOYEE"/> + <entity-order-by field-name="partyId"/> + </entity-options> + </drop-down> + </field> + <field name="emplPositionId"><hidden /></field> + <field name="fromDate" title="${uiLabelMap.CommonFromDate}" tooltip="${uiLabelMap.CommonRequired}"/> + <field name="dummy1" title="${uiLabelMap.CommonEmptyHeader}" position="1"><display/></field> + <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="buttontext"><submit button-type="text-link"/></field> + </form> </forms> |
| Free forum by Nabble | Edit this page |
