unbind for click to prevent multiple click binds

This commit is contained in:
Andy 2016-10-12 16:39:51 +02:00
parent 6d8e3c2530
commit c516c82045

View File

@ -126,6 +126,7 @@ openerp.attachment_preview = function(instance)
{
return;
}
$elements.unbind("click")
$elements.click(function(e)
{
e.stopPropagation();
@ -212,6 +213,7 @@ openerp.attachment_preview = function(instance)
var $element = self.$el.find('.oe-binary-preview');
if(openerp.attachment_preview.can_preview(extension))
{
$element.unbind("click")
$element.click(function()
{
openerp.attachment_preview.show_preview(