From 24425766adc6a7b71ee50adebb51f08d9cb69de8 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 17 Jun 2013 18:28:27 +0200 Subject: [PATCH] [REVERT] of revision 3746 because it caused in bug of high priority lp bug: https://launchpad.net/bugs/1187381 fixed bzr revid: nicolas.vanhoren@openerp.com-20130617162827-01gm5gvoycf3kz3p --- addons/web/static/src/js/view_form.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index c87922937a2..e75036d617a 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -213,9 +213,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM } }); //bounce effect on red button when click on statusbar. - this.$el.on('click', '.oe_form_field_status:not(.oe_form_status_clickable)', function (e) { - if(self.get("actual_mode") == "view") { - var $button = self.$el.find(".oe_highlight:not(.oe_form_invisible)").css({'float':'left','margin-left':'3px','margin-right':'2px','white-space':'nowrap'}); + 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'}); $button.openerpBounce(); e.stopPropagation(); } @@ -4769,13 +4769,13 @@ instance.web.form.AbstractFormPopup = instance.web.Widget.extend({ this.dataset.index = null; } var options = _.clone(self.options.form_view_options) || {}; + if (this.row_id !== null) { + options.initial_mode = this.options.readonly ? "view" : "edit"; + } _.extend(options, { $buttons: this.$buttonpane, }); this.view_form = new instance.web.FormView(this, this.dataset, this.options.view_id || false, options); - if (this.row_id !== null) { - options.initial_mode = this.options.readonly ? "view" : this.view_form.options.initial_mode; - } if (this.options.alternative_form_view) { this.view_form.set_embedded_view(this.options.alternative_form_view); }