[IMP] Improved code for red button bounce effect when click on non-editable status bars

bzr revid: pan@tinyerp.com-20121019111739-3snflq85acs4nxt6
This commit is contained in:
Anand Patel (OpenERP)
2012-10-19 16:47:39 +05:30
parent 4755454c2a
commit ba2697d344
+5 -4
View File
@@ -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("<span style='margin:0;float:left;white-space:nowrap'>");
$(".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();