From ba2697d34466fc19e5be5335a960ac4d6477c32f Mon Sep 17 00:00:00 2001 From: "Anand Patel (OpenERP)" Date: Fri, 19 Oct 2012 16:47:39 +0530 Subject: [PATCH] [IMP] Improved code for red button bounce effect when click on non-editable status bars bzr revid: pan@tinyerp.com-20121019111739-3snflq85acs4nxt6 --- addons/web/static/src/js/view_form.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index d096e15b51d..19f68a575de 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -207,12 +207,13 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } }); //bounce effect on red button when click on statusbar. - this.$el.find(".oe_form_field_status:not(.oe_form_status_clickable)").on('click', function (e) { - if((self.get("actual_mode") == "view")) { - var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','clear':'none'}); + $(".oe_highlight:not(.oe_form_invisible)").wrap(""); + $(".oe_form_field_status:not(.oe_form_status_clickable)").on('click',function (e) { + // if((self.get("actual_mode") == "view")) { + var $button = $(".oe_highlight:not(.oe_form_invisible)")/*.css({'float':'left','white-space':'nowrap'})*/; $button.effect('bounce', {distance:18, times: 5}, 150); e.stopPropagation(); - } + // } }); this.trigger('form_view_loaded', data); return $.when();