~unifield-team/unifield-web/web_aio_28

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/form_state.js

  • Committer: Xavier ALT
  • Date: 2012-07-19 13:16:48 UTC
  • mfrom: (4847.1.2 6.0-opw-381610-msh)
  • Revision ID: xal@openerp.com-20120719131648-5huanrwwczt69pex
[MERGE] OPW 381610: web: fix exponential calls to form_onAttrChange(), add unrequired multiple on_change() calls

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
                    // events disconnected during hook_onStateChange,
144
144
                    // don't redisconnect or may break onStateChange
145
145
                    var $field = jQuery(field).bind('onAttrChange', partial(form_onAttrChange, container, widget, attr, attrs[attr], $this));
146
 
                    $field.change(function () {
147
 
                        jQuery(this).trigger('onAttrChange');
148
 
                    });
 
146
                    $field.change(partial(form_onAttrChange, container, widget, attr, attrs[attr], $this));
149
147
                }
150
148
            });
151
149
        }
429
427
    form_hookContextMenu();
430
428
    form_hookStateChange();
431
429
    form_hookAttrChange();
432
 
}).ajaxStop(function () {
433
 
    form_hookStateChange();
434
 
    form_hookAttrChange();
435
430
});