[IMP] improve code for bounce effect on non editable form view.
bzr revid: pan@tinyerp.com-20120709104218-tot71riz8bww6itp
This commit is contained in:
parent
16eef6db4a
commit
9b936e7e29
|
@ -287,12 +287,14 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
on_invalidclick : function (){
|
||||
var self = this;
|
||||
var div = $("<div />", {id:"bounce"});
|
||||
this.$element.find(".oe_form_field").click(function () {
|
||||
this.$element.find(".oe_form_field, .oe_form_group_cell").click(function (e) {
|
||||
$(".oe_form_button_edit").wrap(div);
|
||||
$("#bounce").addClass('oe_bounce_button_left');
|
||||
var val_bounce = $(".oe_form_button_edit");
|
||||
self.do_bounce(val_bounce);
|
||||
e.stopImmediatePropagation();
|
||||
});
|
||||
|
||||
},
|
||||
on_record_loaded: function(record) {
|
||||
var self = this, set_values = [];
|
||||
|
@ -338,6 +340,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
}
|
||||
self.$element.add(self.$buttons).removeClass('oe_form_dirty');
|
||||
});
|
||||
|
||||
},
|
||||
on_form_changed: function() {
|
||||
this.trigger("view_content_has_changed");
|
||||
|
@ -599,6 +602,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
|||
self.set({mode: "view"});
|
||||
self.on_invalidclick();
|
||||
});
|
||||
|
||||
},
|
||||
on_button_cancel: function(event) {
|
||||
if (this.can_be_discarded()) {
|
||||
|
|
Loading…
Reference in New Issue