[IMP]Bounce ob image

bzr revid: vja@tinyerp.com-20130228054910-3s7mrp39y0kmkfpy
This commit is contained in:
Vishmita 2013-02-28 11:19:10 +05:30
parent 0e2dddec98
commit dff2dd0196
1 changed files with 7 additions and 0 deletions

View File

@ -4985,6 +4985,13 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
url = this.placeholder;
}
var $img = $(QWeb.render("FieldBinaryImage-img", { widget: this, url: url }));
$($img).click(function(e) {
if(self.view.get("actual_mode") == "view") {
var $button = $(".oe_form_button_edit");
$button.openerpBounce();
e.stopPropagation();
}
});
this.$el.find('> img').remove();
this.$el.prepend($img);
$img.load(function() {