Author: hansbak
Date: Thu Mar 12 03:32:06 2009 New Revision: 752760 URL: http://svn.apache.org/viewvc?rev=752760&view=rev Log: some improvement on the change default organization partyId Modified: ofbiz/trunk/applications/commonext/script/changeOrgPartyId.groovy ofbiz/trunk/applications/commonext/widget/CommonScreens.xml ofbiz/trunk/framework/common/webcommon/includes/insertDropDown.ftl Modified: ofbiz/trunk/applications/commonext/script/changeOrgPartyId.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/script/changeOrgPartyId.groovy?rev=752760&r1=752759&r2=752760&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/script/changeOrgPartyId.groovy (original) +++ ofbiz/trunk/applications/commonext/script/changeOrgPartyId.groovy Thu Mar 12 03:32:06 2009 @@ -18,20 +18,6 @@ */ import org.ofbiz.base.util.*; -//last Parameters -requestParameters.remove("userPrefGroupTypeId"); -requestParameters.remove("userPrefTypeId"); -requestParameters.remove("userPrefValue"); -lastParameters = requestParameters.toString().replaceAll(",","&").replaceAll(" ",""); -if(lastParameters.length() > 2){ - lastParameters = lastParameters.toString().substring(1,lastParameters.toString().length()-1); - globalContext.lastParameters = lastParameters; -} -setPreferenceMain=""; -if(!parameters.targetRequestUri.toString().equals("/setUserPreference")){ - setPreferenceMain= "setUserPreference"; -} -globalContext.setPreferenceMain = setPreferenceMain; //partyAcctgPrefAndGroupList partyAcctgPrefAndGroupList = []; partyAcctgPrefAndGroup = delegator.findAll("PartyAcctgPrefAndGroup"); @@ -43,7 +29,7 @@ globalContext.PartyAcctgPrefAndGroupList = partyAcctgPrefAndGroupList; //hiddenFileds hiddenFields = []; -hiddenFields.add([name:"userPrefTypeId", value:"ORGANIZATION_PARTY"]); -hiddenFields.add([name:"userPrefGroupTypeId", value:"GLOBAL_PREFERENCES"]); +hiddenFields.add([name : "userPrefTypeId", value : "ORGANIZATION_PARTY"]); +hiddenFields.add([name : "userPrefGroupTypeId", value : "GLOBAL_PREFERENCES"]); globalContext.hiddenFields = hiddenFields; Modified: ofbiz/trunk/applications/commonext/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/CommonScreens.xml?rev=752760&r1=752759&r2=752760&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/CommonScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/CommonScreens.xml Thu Mar 12 03:32:06 2009 @@ -44,8 +44,7 @@ <set field="layoutSettings.topLines[]" from-field="line" global="true"/> <script location="component://commonext/script/changeOrgPartyId.groovy"/> <set field="dropdown.hiddenFieldList" from-field="hiddenFields" global="true"/> - <set field="dropdown.formName" value="changeOrganization"/> - <set field="dropdown.action" value="setUserPreference?${lastParameters}"/> + <set field="dropdown.action" value="setUserPreference"/> <set field="dropdown.textBegin" value="${uiLabelMap.CommonDefaultOrganizationPartyId} :"/> <set field="dropdown.dropDownList" from-field="PartyAcctgPrefAndGroupList"/> <set field="dropdown.selectionName" value="userPrefValue"/> Modified: ofbiz/trunk/framework/common/webcommon/includes/insertDropDown.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/insertDropDown.ftl?rev=752760&r1=752759&r2=752760&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/insertDropDown.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/insertDropDown.ftl Thu Mar 12 03:32:06 2009 @@ -18,7 +18,7 @@ under the License. --> -<form method="post" action="<@ofbizUrl>${StringUtil.wrapString(topLine.action?if_exists)}</@ofbizUrl>" onSubmit="javascript:submitFormDisableSubmits(this)" name="${topLine.formName?if_exists}" id="${topLine.formName?if_exists}"> +<form method="post" action="<@ofbizUrl>${topLine.action}</@ofbizUrl>" onSubmit="javascript:submitFormDisableSubmits(this)" name="${topLine.action}" id="${topLine.action}"> ${StringUtil.wrapString(topLine.textBegin?if_exists)} <#assign listSize = topLine.dropDownList.size()> <#if topLine.dropDownList.size() gt 1> @@ -27,7 +27,7 @@ <input type="hidden" name="${field.name}" value="${field.value}"/> </#list> </#if> - <select name="${topLine.selectionName?if_exists}" onChange="javascript:document.${topLine.formName?if_exists}.submit();"> + <select name="${topLine.selectionName?if_exists}" onChange="javascript:document.${topLine.action}.submit();"> <#list topLine.dropDownList as option> <option <#if option.key == topLine.selectedKey >selected="selected"</#if> value="${option.key?if_exists}">${option.value?if_exists}</option> </#list> |
Free forum by Nabble | Edit this page |