Mohammed Shekha(Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-381610-msh into
lp:openobject-client-web.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-381610-msh/+merge/89848
Hello,
Fixed the issue of hook methods which are hooked on each ajax request stop.
Reason:- There is code in form_state.js which calls "hookAttrChange" and
"hookStateChange" on ajaxStop, so here on each ajax request completion this
methods will be called and each time fields are binded with form_onAttrChange
and "form_onStateChange" which is unnecessary.
The fields should be binded only one time when form is loaded.
So changed the code and remove the code on ajaxStop and put the code on
doLoadingSuccess.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-381610-msh/+merge/89848
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-381610-msh.
=== modified file 'addons/openerp/static/javascript/form.js'
--- addons/openerp/static/javascript/form.js 2011-12-19 08:20:25 +0000
+++ addons/openerp/static/javascript/form.js 2012-01-24 10:14:25 +0000
@@ -881,7 +881,7 @@
var menu_width = $menu.width();
var body_width = jQuery(document.body).width();
if (parseInt($menu.css("left")) + menu_width > body_width) {
- $menu.offset({ left: body_width - menu_width - 10 });
+ $menu.css({left: body_width - menu_width - 10 + 'px'});
}
showContextMenu();
});
=== modified file 'addons/openerp/static/javascript/form_state.js'
--- addons/openerp/static/javascript/form_state.js 2011-10-11 12:52:43 +0000
+++ addons/openerp/static/javascript/form_state.js 2012-01-24 10:14:25 +0000
@@ -407,7 +407,4 @@
form_hookContextMenu();
form_hookStateChange();
form_hookAttrChange();
-}).ajaxStop(function () {
- form_hookStateChange();
- form_hookAttrChange();
});
=== modified file 'addons/openerp/static/javascript/openerp/openerp.base.js'
--- addons/openerp/static/javascript/openerp/openerp.base.js 2011-11-23 08:38:45 +0000
+++ addons/openerp/static/javascript/openerp/openerp.base.js 2012-01-24 10:14:25 +0000
@@ -158,6 +158,8 @@
if (jQuery('#_terp_id').val() == 'False') {
initial_onchange_triggers();
}
+ form_hookStateChange();
+ form_hookAttrChange();
};
}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp