From 8351473832502b236f2232e6c7d2bc2a5c663a8f Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Tue, 23 Oct 2012 12:32:06 +0530 Subject: [PATCH] [IMP]Improved code for red_button bounce effecct on statusbar click bzr revid: pan@tinyerp.com-20121023070206-a5xbxbyut3ytgrs5 --- addons/web/static/src/js/view_form.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 30415be507f..7bb25d8bc4d 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -206,10 +206,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } }); //bounce effect on red button when click on statusbar. - this.on('load_record',this,function(){ + this.on('load_record',this,function(){ + var $button = self.$el.find(".oe_button.oe_form_button.oe_highlight:not(.oe_form_invisible)").css({'margin-left':'2px','float':'left','white-space':'nowrap'}); self.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click',function (e) { if(self.get("actual_mode") == "view") { - var $button = $(".oe_button.oe_form_button.oe_highlight:not(.oe_form_invisible)").wrap(""); $button.effect('bounce', {distance:18, times: 5}, 150); e.stopImmediatePropagation(); }