You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2013/09/26 14:15:52 UTC

svn commit: r1526456 - /ofbiz/trunk/framework/images/webapp/images/fieldlookup.js

Author: jleroux
Date: Thu Sep 26 12:15:52 2013
New Revision: 1526456

URL: http://svn.apache.org/r1526456
Log:
A patch from Leon for "trivial errors corrections to fieldlookup.js" https://issues.apache.org/jira/browse/OFBIZ-5330

Correct following trivial issues:
1. in lookupDescriptionLoaded.prototype.update, not assign the form when try to get filed object by its name
2. in setSourceColor, variable "target" should be given parameter "src"

Modified:
    ofbiz/trunk/framework/images/webapp/images/fieldlookup.js

Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=1526456&r1=1526455&r2=1526456&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Thu Sep 26 12:15:52 2013
@@ -726,7 +726,7 @@ if (obj_caller == null && window.opener 
 }
 
 function setSourceColor(src) {
-	if (target && target != null) {
+	if (src && src != null) {
 		src.css("background-color", "yellow");
 	}
 }
@@ -847,8 +847,9 @@ lookupDescriptionLoaded.prototype.update
 	// actual server call
 	var fieldName = this.params.substring(indexOf);
 	fieldName = fieldName.substring(fieldName.indexOf("=") + 1);
-	if (jQuery("input[name=" + fieldName + "]").val()) {
-		var fieldSerialized = jQuery("input[name=" + fieldName + "]", jQuery("form[name=" + this.formName + "]")).serialize();
+	fieldObj = jQuery("input[name=" + fieldName + "]", jQuery("form[name=" + this.formName + "]"));
+	if (fieldObj.val()) {
+		var fieldSerialized = fieldObj.serialize();
 		this.allParams = this.params + '&' + fieldSerialized + '&' + 'searchType=EQUALS';
 		var _fieldId = this.fieldId;