Author: pranayp
Date: Mon May 30 13:42:21 2016
New Revision: 1746135

URL: http://svn.apache.org/viewvc?rev=1746135&view=rev
Log:
Manually applied fix from trunk revision 1746130.
---------------------------------------------------------------------

[OFBIZ-7130] Applied patch from the ticket to fix error on console when 
navigating to update party email address view.

This error occurs due to the code used for dependent drop down for country and 
state. At party email address update page, no dependent drop down used, so js 
code triggering the request with empty countryGeoId and generating console 
error. Added check in code that if drop down field is not present on page then 
no need to observe it for the change.

Thanks Amardeep Singh Jhajj for reporting the issue and providing patch.
---------------------------------------------------------------------

Modified:
    
ofbiz/branches/release13.07/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl

Modified: 
ofbiz/branches/release13.07/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl?rev=1746135&r1=1746134&r2=1746135&view=diff
==============================================================================
--- 
ofbiz/branches/release13.07/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl
 (original)
+++ 
ofbiz/branches/release13.07/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl
 Mon May 30 13:42:21 2016
@@ -19,7 +19,7 @@ under the License.
 <#assign requestName><@ofbizUrl>${requestName}</@ofbizUrl></#assign>
 <script type="text/javascript">
 jQuery(document).ready(function() {
-    if (jQuery('#${dependentForm}').length) {
+    if (jQuery('#${dependentForm}').length && 
jQuery('#${dependentForm}_${mainId}').length) {
       jQuery('#${dependentForm}_${mainId}').change(function(e, data) {
           getDependentDropdownValues('${requestName}', '${paramKey}', 
'${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', 
'${responseName}', '${dependentKeyName}', '${descName}');
       });


Reply via email to