[FIX] account: reconciliation widget: new line update upon typing

Properly bind the keyup event on the <input>, which can be the field widget root $el
This commit is contained in:
Arthur Maniet
2015-08-07 13:31:45 +02:00
parent c9232ce598
commit 6322c39346
@@ -568,10 +568,11 @@ var abstractReconciliationLine = Widget.extend({
field.appendTo($field_container.find("td"));
self.$(".create_form").prepend($field_container);
// now that widget's dom has been created (appendTo does that), bind events
if (field_data.field_properties.type != "many2one") {
// Triggers change:value TODO : moche bind ?
field.$el.find("input").keyup(function(e, field){ field.commit_value(); }.bind(null, null, field));
// Change field value on keypress instead of blur
if (field_data.field_properties.type !== "many2one") {
field.$el.find('input').andSelf().filter('input').keyup(function() {
this.store_dom_value();
}.bind(field));
}
// Hide the field if group not OK