mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-24 17:38:42 -06:00
unbind for click to prevent multiple click binds
This commit is contained in:
parent
6d8e3c2530
commit
c516c82045
@ -126,6 +126,7 @@ openerp.attachment_preview = function(instance)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$elements.unbind("click")
|
||||||
$elements.click(function(e)
|
$elements.click(function(e)
|
||||||
{
|
{
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -212,6 +213,7 @@ openerp.attachment_preview = function(instance)
|
|||||||
var $element = self.$el.find('.oe-binary-preview');
|
var $element = self.$el.find('.oe-binary-preview');
|
||||||
if(openerp.attachment_preview.can_preview(extension))
|
if(openerp.attachment_preview.can_preview(extension))
|
||||||
{
|
{
|
||||||
|
$element.unbind("click")
|
||||||
$element.click(function()
|
$element.click(function()
|
||||||
{
|
{
|
||||||
openerp.attachment_preview.show_preview(
|
openerp.attachment_preview.show_preview(
|
||||||
|
Loading…
Reference in New Issue
Block a user