Author: jleroux
Date: Fri Nov 12 12:24:05 2010
New Revision: 1034371
URL:
http://svn.apache.org/viewvc?rev=1034371&view=revLog:
Remove useless calls to change event
In fieldlookup.js (was inappropriate code)
In selectall.js, as I suspected it can't be used in the jQuery branch: we get caught in a loop. I have used
// after the description is set; the text field may have been updated
// just in case, call change again
// Only trigger if needed
var events = textField.data('events');
if (events && events.change) {
textField.change();
}
Modified:
ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js
ofbiz/branches/jquery/framework/images/webapp/images/selectall.js
Modified: ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js?rev=1034371&r1=1034370&r2=1034371&view=diff==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/fieldlookup.js Fri Nov 12 12:24:05 2010
@@ -633,9 +633,6 @@ function set_value (value) {
write_value(value, target);
field = jQuery("#" + target.attr('id'));
field.trigger("lookup:changed");
- if (field.change != null) {
- field.click().change()
- }
closeLookup();
}
Modified: ofbiz/branches/jquery/framework/images/webapp/images/selectall.js
URL:
http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/selectall.js?rev=1034371&r1=1034370&r2=1034371&view=diff==============================================================================
--- ofbiz/branches/jquery/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/branches/jquery/framework/images/webapp/images/selectall.js Fri Nov 12 12:24:05 2010
@@ -456,14 +456,7 @@ function setLookDescription(textFieldId,
tooltipElement.html(description);
lookupWrapperEl.append(tooltipElement);
}
-
- // after the description is set; the text field may have been updated
- // just in case, call onchange again
- // JLR to be checked, thanks to Andrew explanations
-/* if ($(textFieldId).onchange != null) {
- $(textFieldId).onchange();
- }
-*/}
+}
/** Enable auto-completion for drop-down elements.*/