[FIX] web: no edit bounce effect if bootstrap element

Bootstrap bind on document to do an element, in some case the bounce effect
on the edit button might cancel the bootstrap action.

e.g in the crm.claim form view, the `group` tag arround a notebook element
break the tab change on the notebook.

opw-646012

note: in 8.0 the issue didn't happen since the tab change was done by
jquery ui which happened before the bounce effect.
This commit is contained in:
Nicolas Lempereur
2015-07-28 11:42:57 +02:00
parent 064570cca2
commit 51040b6d60
+1 -1
View File
@@ -209,7 +209,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
// Add bounce effect on button 'Edit' when click on readonly page view.
this.$el.find(".oe_form_group_row,.oe_form_field,label,h1,.oe_title,.oe_notebook_page, .oe_list_content").on('click', function (e) {
if(self.get("actual_mode") == "view") {
if(self.get("actual_mode") == "view" && !$(e.target).is('[data-toggle]')) {
var $button = self.options.$buttons.find(".oe_form_button_edit");
$button.openerpBounce();
e.stopPropagation();