Author: jleroux
Date: Sun Sep 26 10:51:21 2010
New Revision: 1001410
URL:
http://svn.apache.org/viewvc?rev=1001410&view=revLog:
Did not know about one(), exactly what I needed
Modified:
ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl
Modified: ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl?rev=1001410&r1=1001409&r2=1001410&view=diff==============================================================================
--- ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl (original)
+++ ofbiz/branches/jquery/framework/common/webcommon/includes/setMultipleSelectJs.ftl Sun Sep 26 10:51:21 2010
@@ -38,8 +38,10 @@ jQuery(document).ready(function() {
// track possible relatedField changes
// on initial focus (focus-field-name must be asm_relatedField) or if the field value changes, select related multi values.
typeValue = jQuery('#${asm_typeField}').val();
- selectMultipleRelatedValues('${asm_requestName}', '${asm_paramKey}', '${asm_relatedField}', '${asm_multipleSelect}', '${asm_type}', typeValue, '${asm_responseName}');
- jQuery("#${asm_relatedField}").bind('change focus', function() {
+ jQuery("#${asm_relatedField}").one('focus', function() {
+ selectMultipleRelatedValues('${asm_requestName}', '${asm_paramKey}', '${asm_relatedField}', '${asm_multipleSelect}', '${asm_type}', typeValue, '${asm_responseName}');
+ });
+ jQuery("#${asm_relatedField}").bind('change', function() {
selectMultipleRelatedValues('${asm_requestName}', '${asm_paramKey}', '${asm_relatedField}', '${asm_multipleSelect}', '${asm_type}', typeValue, '${asm_responseName}');
});
</#if>