Browse Source

Merge pull request #72 from yelizariev/10.0-merge-b4a3ad2

10.0 merge b4a3ad2
pull/74/head
Ivan Yelizariev 8 years ago
committed by GitHub
parent
commit
ebf810fa25
  1. 2
      mail_attachment_popup/__openerp__.py
  2. 4
      mail_attachment_popup/static/src/xml/mail_attachment_popup.xml

2
mail_attachment_popup/__openerp__.py

@ -23,6 +23,6 @@
"static/src/xml/mail_attachment_popup.xml", "static/src/xml/mail_attachment_popup.xml",
], ],
"installable": False,
"installable": True,
'auto_install': False, 'auto_install': False,
} }

4
mail_attachment_popup/static/src/xml/mail_attachment_popup.xml

@ -2,7 +2,7 @@
<template> <template>
<t t-extend="mail.Attachment"> <t t-extend="mail.Attachment">
<t t-jquery="div[t-att-title='attachment.name'] .o_image" t-operation="replace"> <t t-jquery="div[t-att-title='attachment.name'] .o_image" t-operation="replace">
<t t-if="attachment.mimetype == 'image/png'">
<t t-if="attachment.mimetype and attachment.mimetype.search('image/') !== -1">
<span class="m-dotted" t-attf-onclick="$('#ImageModal{{ attachment.id }}').arcticmodal()"> <span class="m-dotted" t-attf-onclick="$('#ImageModal{{ attachment.id }}').arcticmodal()">
<div class="o_image" target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80"> <div class="o_image" target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80">
<span class='o_attachment_name'><t t-esc='attachment.name'/></span> <span class='o_attachment_name'><t t-esc='attachment.name'/></span>
@ -19,7 +19,7 @@
</div> </div>
</div> </div>
</t> </t>
<t t-if="attachment.mimetype != 'image/png'">
<t t-if="! (attachment.mimetype and attachment.mimetype.search('image/') !== -1)">
<a class="o_image" t-att-href='attachment.url' target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80"> <a class="o_image" t-att-href='attachment.url' target="_blank" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/100x80">
<span class='o_attachment_name'><t t-esc='attachment.name'/></span> <span class='o_attachment_name'><t t-esc='attachment.name'/></span>
</a> </a>

Loading…
Cancel
Save