svn commit: r1740072 - in /ofbiz/trunk/applications/party: webapp/partymgr/static/partymgr.js widget/partymgr/PartyForms.xml

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

svn commit: r1740072 - in /ofbiz/trunk/applications/party: webapp/partymgr/static/partymgr.js widget/partymgr/PartyForms.xml

jleroux@apache.org
Author: jleroux
Date: Wed Apr 20 09:09:16 2016
New Revision: 1740072

URL: http://svn.apache.org/viewvc?rev=1740072&view=rev
Log:
A patch from Supatthra Nawicha for "party search form does not properly collapse sections when none|postal|telecom|other selected" reported by Wai at  https://issues.apache.org/jira/browse/OFBIZ-7013

Go to: /partymgr/control/findparty
Click on either none, postal, telecom,other radiobutton.
NHotice that after clicking on another radiobutton, the section that was previously expanded is not automatically collapsed.

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/static/partymgr.js
    ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml

Modified: ofbiz/trunk/applications/party/webapp/partymgr/static/partymgr.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/static/partymgr.js?rev=1740072&r1=1740071&r2=1740072&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/static/partymgr.js (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/static/partymgr.js Wed Apr 20 09:09:16 2016
@@ -31,3 +31,13 @@ function refreshInfo() {
     document.lookupparty.hideFields.value = "N";
     document.lookupparty.submit();
 }
+
+function collapseFindPartyOptions(currentOption) {
+    jQuery('.fieldgroup').each(function() {
+        var titleBar = jQuery(this).children('.fieldgroup-title-bar'), body = jQuery(this).children('.fieldgroup-body');
+        if (titleBar.children().length > 0 && body.is(':visible') != false && body.attr('id') != currentOption) {
+            toggleCollapsiblePanel(titleBar.find('a'), body.attr('id'), 'Expand', 'Collapse');
+        }
+    });
+}
+

Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1740072&r1=1740071&r2=1740072&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Wed Apr 20 09:09:16 2016
@@ -30,7 +30,7 @@ under the License.
         </actions>
         <field name="statusId"><hidden value="PARTY_ENABLED"/></field>
         <field name="noConditionFind"><hidden value="Y"/></field>
-        <field name="extInfo" event="onClick" action="javascript:$('#ListParty' + this.value +'_body').toggle(true);" title="${uiLabelMap.PartyContactInformation}">
+        <field name="extInfo" event="onClick" action="javascript:$('#ListParty' + this.value +'_body').toggle(true);collapseFindPartyOptions('ListParty' + this.value +'_body');" title="${uiLabelMap.PartyContactInformation}">
             <radio>
                 <option key="N" description="${uiLabelMap.CommonNone}"/>
                 <option key="P" description="${uiLabelMap.PartyPostal}"/>