You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by de...@apache.org on 2015/08/25 15:43:13 UTC

svn commit: r1697674 - in /ofbiz/trunk: applications/party/widget/partymgr/PartyForms.xml framework/images/webapp/images/selectall.js

Author: deepak
Date: Tue Aug 25 13:43:12 2015
New Revision: 1697674

URL: http://svn.apache.org/r1697674
Log:
(OFBIZ-6563) Fixed lookup party search form, used correct name for groupName field. Fix the focus-field-name from partyName to partyId as partyName is not a valid field on lookup party form. Used correct jQuery.each method in for paginationMenus. Now lookup party is working fine.

Modified:
    ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
    ofbiz/trunk/framework/images/webapp/images/selectall.js

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1697674&r1=1697673&r2=1697674&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Tue Aug 25 13:43:12 2015
@@ -21,7 +21,7 @@ under the License.
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
 
-    <form name="lookupparty" type="single" target="findparty" focus-field-name="partyName">
+    <form name="lookupparty" type="single" target="findparty" focus-field-name="partyId">
         <actions>
             <set field="states" value="${groovy: org.ofbiz.common.CommonWorkers.getStateList(delegator)}"/>
             <!-- Here is some alternate code to get states limited to a region
@@ -43,7 +43,7 @@ under the License.
         <field name="userLoginId"><text size="15" /></field>
         <field name="lastName"><text size="15"/></field>
         <field name="firstName"><text size="15"/></field>
-        <field name="partyGroupName" title="${uiLabelMap.PartyGroupName}"><text size="15"/></field>
+        <field name="groupName" title="${uiLabelMap.PartyGroupName}"><text size="15"/></field>
         <field name="roleTypeId">
             <drop-down allow-empty="true">
                 <entity-options entity-name="RoleType" key-field-name="roleTypeId">
@@ -94,7 +94,7 @@ under the License.
             <sort-field name="userLoginId"/>
             <sort-field name="lastName"/>
             <sort-field name="firstName"/>
-            <sort-field name="partyGroupName"/>
+            <sort-field name="groupName"/>
             <sort-field name="roleTypeId"/>
             <sort-field name="partyTypeId"/>
             <field-group title="${uiLabelMap.PartyPartyIdentification}" initially-collapsed="true">

Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=1697674&r1=1697673&r2=1697674&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Tue Aug 25 13:43:12 2015
@@ -643,17 +643,19 @@ function toggleScreenlet(link, areaId, s
        }
    }
    var paginationMenus = jQuery('div.nav-pager');
-   jQuery.each(paginationMenus, function(menu) {
+   jQuery.each(paginationMenus, function(index, menu) {
        if (menu) {
-           var childElements = menu.getElementsByTagName('a');
+           var childElements = jQuery(menu).find('a');
            for (var i = 0; i < childElements.length; i++) {
                if (childElements[i].href.indexOf("http") == 0) {
                    childElements[i].href = replaceQueryParam(childElements[i].href, currentParam, newParam);
                }
            }
-           childElements = menu.getElementsByTagName('select');
+           childElements = jQuery(menu).find('select');
            for (i = 0; i < childElements.length; i++) {
-               if (childElements[i].href.indexOf("location.href") >= 0) {
+             //FIXME: Not able to understand the purpose of below line, as href is not valid attribute of select element.
+             //if (childElements[i].href.indexOf("location.href") >= 0) {
+               if (childElements[i].value.indexOf("location.href") >= 0) {
                    Element.extend(childElements[i]);
                    childElements[i].writeAttribute("onchange", replaceQueryParam(childElements[i].readAttribute("onchange"), currentParam, newParam));
                }