[IMP]improved code for page_view bounce effect

bzr revid: pan@tinyerp.com-20120912103044-y6uhukk4dlm3e8f5
This commit is contained in:
Anand Patel (OpenERP) 2012-09-12 16:00:44 +05:30
parent 0b15180d49
commit 27626a0fc4
1 changed files with 2 additions and 1 deletions

View File

@ -159,10 +159,11 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.has_been_loaded.resolve();
// Add bounce effect on button 'Edit' when click on readonly page view.
this.$el.find(".oe_form_field,label").on('click', function (e) {
this.$el.find(".oe_form_group_row,.oe_form_field,label").on('click', function (e) {
if(self.get("actual_mode") == "view") {
var $button = self.options.$buttons.find(".oe_form_button_edit");
$button.effect('bounce', {distance: 18, times: 5}, 150)
e.stopPropagation();
}
});