mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-27 02:48:41 -06:00
[IMP] attachment_preview: fix _onPreviewAttachment and remove class o_attachment_preview
This commit is contained in:
parent
96a866592f
commit
411822d443
@ -14,13 +14,13 @@ Preview attachments
|
|||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
|
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
|
||||||
:target: https://github.com/OCA/knowledge/tree/12.0/attachment_preview
|
:target: https://github.com/OCA/knowledge/tree/15.0/attachment_preview
|
||||||
:alt: OCA/knowledge
|
:alt: OCA/knowledge
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||||
:target: https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-attachment_preview
|
:target: https://translation.odoo-community.org/projects/knowledge-15-0/knowledge-15-0-attachment_preview
|
||||||
:alt: Translate me on Weblate
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||||
:target: https://runbot.odoo-community.org/runbot/118/12.0
|
:target: https://runbot.odoo-community.org/runbot/118/15.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
@ -64,7 +64,7 @@ Bug Tracker
|
|||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
|
Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_preview%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_preview%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||||
|
|
||||||
Do not contact contributors directly about support or help with technical issues.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
@ -104,6 +104,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
promote its widespread use.
|
||||||
|
|
||||||
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/12.0/attachment_preview>`_ project on GitHub.
|
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/15.0/attachment_preview>`_ project on GitHub.
|
||||||
|
|
||||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||||
|
@ -6,8 +6,6 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 15.0\n"
|
"Project-Id-Version: Odoo Server 15.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2022-08-23 14:25+0000\n"
|
|
||||||
"PO-Revision-Date: 2022-08-23 14:25+0000\n"
|
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -36,8 +34,8 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -10,6 +10,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2022-08-23 14:27+0000\n"
|
"PO-Revision-Date: 2022-08-23 14:27+0000\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
"Language: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: \n"
|
||||||
@ -36,8 +37,7 @@ msgstr "Vorschau"
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Vorschau %s"
|
msgstr "Vorschau %s"
|
||||||
|
@ -26,8 +26,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Previsualizar %s"
|
msgstr "Previsualizar %s"
|
||||||
|
@ -26,8 +26,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Anteprima %s"
|
msgstr "Anteprima %s"
|
||||||
|
@ -25,8 +25,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Voorbeeld %s"
|
msgstr "Voorbeeld %s"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * attachment_preview
|
# * attachment_preview
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -21,8 +21,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -26,8 +26,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Antever %s"
|
msgstr "Antever %s"
|
||||||
|
@ -28,8 +28,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Predogled %s"
|
msgstr "Predogled %s"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Translation of Odoo Server.
|
# Translation of Odoo Server.
|
||||||
# This file contains the translation of the following modules:
|
# This file contains the translation of the following modules:
|
||||||
# * attachment_preview
|
# * attachment_preview
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -23,8 +23,21 @@ msgstr "Ek"
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "%s Önizle"
|
msgstr "%s Önizle"
|
||||||
|
@ -10,6 +10,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2022-08-23 14:29+0000\n"
|
"PO-Revision-Date: 2022-08-23 14:29+0000\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
|
"Language: \n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: \n"
|
"Content-Transfer-Encoding: \n"
|
||||||
@ -36,8 +37,7 @@ msgstr "Xem trước"
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.js:0
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "Xem trước %s"
|
msgstr "Xem trước %s"
|
||||||
|
@ -26,8 +26,21 @@ msgstr ""
|
|||||||
|
|
||||||
#. module: attachment_preview
|
#. module: attachment_preview
|
||||||
#. openerp-web
|
#. openerp-web
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:188
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
#: code:addons/attachment_preview/static/src/js/attachment_preview.js:216
|
#, python-format
|
||||||
|
msgid "Open in new page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/xml/attachment_preview.xml:0
|
||||||
|
#, python-format
|
||||||
|
msgid "Preview"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: attachment_preview
|
||||||
|
#. openerp-web
|
||||||
|
#: code:addons/attachment_preview/static/src/js/components/chatter/chatter.esm.js:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Preview %s"
|
msgid "Preview %s"
|
||||||
msgstr "预览 %s"
|
msgstr "预览 %s"
|
||||||
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
|||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/knowledge/tree/12.0/attachment_preview"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/knowledge-12-0/knowledge-12-0-attachment_preview"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/118/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/knowledge/tree/15.0/attachment_preview"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/knowledge-15-0/knowledge-15-0-attachment_preview"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/118/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This addon allows to preview attachments supported by <a class="reference external" href="http://viewerjs.org">http://viewerjs.org</a>.</p>
|
<p>This addon allows to preview attachments supported by <a class="reference external" href="http://viewerjs.org">http://viewerjs.org</a>.</p>
|
||||||
<p>Currently, that’s most Libreoffice files and PDFs.</p>
|
<p>Currently, that’s most Libreoffice files and PDFs.</p>
|
||||||
<img alt="Screenshot of split form view" src="https://raw.githubusercontent.com/attachment_preview/static/description/screenshot-split.png" style="width: 100%;" />
|
<img alt="Screenshot of split form view" src="https://raw.githubusercontent.com/attachment_preview/static/description/screenshot-split.png" style="width: 100%;" />
|
||||||
@ -409,7 +409,7 @@ next to the navigational buttons you can open the preview in a separate window.<
|
|||||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/knowledge/issues">GitHub Issues</a>.
|
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/knowledge/issues">GitHub Issues</a>.
|
||||||
In case of trouble, please check there if your issue has already been reported.
|
In case of trouble, please check there if your issue has already been reported.
|
||||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||||
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_preview%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20attachment_preview%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<div class="section" id="credits">
|
||||||
@ -444,7 +444,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/12.0/attachment_preview">OCA/knowledge</a> project on GitHub.</p>
|
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/15.0/attachment_preview">OCA/knowledge</a> project on GitHub.</p>
|
||||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -205,12 +205,17 @@ odoo.define("attachment_preview.chatter", function (require) {
|
|||||||
attachment_title,
|
attachment_title,
|
||||||
split_screen
|
split_screen
|
||||||
) {
|
) {
|
||||||
|
if (!canPreview(attachment_extension)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var url = getUrl(
|
var url = getUrl(
|
||||||
attachment_id,
|
attachment_id,
|
||||||
attachment_url,
|
attachment_url,
|
||||||
attachment_extension,
|
attachment_extension,
|
||||||
attachment_title
|
attachment_title
|
||||||
);
|
);
|
||||||
|
|
||||||
if (split_screen) {
|
if (split_screen) {
|
||||||
this.trigger("onAttachmentPreview", {url: url});
|
this.trigger("onAttachmentPreview", {url: url});
|
||||||
} else {
|
} else {
|
||||||
|
@ -242,34 +242,23 @@ odoo.define("attachment_preview.attachment_card", function (require) {
|
|||||||
$target = $(event.currentTarget),
|
$target = $(event.currentTarget),
|
||||||
split_screen = $target.attr("data-target") !== "new",
|
split_screen = $target.attr("data-target") !== "new",
|
||||||
attachment_id = this.attachment.id,
|
attachment_id = this.attachment.id,
|
||||||
attachment_extension = "pdf",
|
|
||||||
attachment_title = this.attachment.filename,
|
attachment_title = this.attachment.filename,
|
||||||
attachment_url = this.attachment.defaultSource;
|
attachment_url = this.attachment.defaultSource;
|
||||||
active_attachment_id = attachment_id;
|
active_attachment_id = attachment_id;
|
||||||
|
|
||||||
if (attachment_extension) {
|
rpc.query({
|
||||||
|
model: "ir.attachment",
|
||||||
|
method: "get_attachment_extension",
|
||||||
|
args: [attachment_id],
|
||||||
|
}).then(function (extension) {
|
||||||
self._showPreview(
|
self._showPreview(
|
||||||
attachment_id,
|
attachment_id,
|
||||||
attachment_url,
|
attachment_url,
|
||||||
attachment_extension,
|
extension,
|
||||||
attachment_title,
|
attachment_title,
|
||||||
split_screen
|
split_screen
|
||||||
);
|
);
|
||||||
} else {
|
});
|
||||||
rpc.query({
|
|
||||||
model: "ir.attachment",
|
|
||||||
method: "get_attachment_extension",
|
|
||||||
args: [attachment_id],
|
|
||||||
}).then(function (extension) {
|
|
||||||
self.showPreview(
|
|
||||||
attachment_id,
|
|
||||||
attachment_url,
|
|
||||||
extension,
|
|
||||||
null,
|
|
||||||
split_screen
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
t-if="attachmentCard.attachment.downloadUrl"
|
t-if="attachmentCard.attachment.downloadUrl"
|
||||||
class="o_AttachmentCard_asideItem d-flex justify-content-center align-items-center ml4 o_attachment_preview"
|
class="o_AttachmentCard_asideItem d-flex justify-content-center align-items-center ml4"
|
||||||
t-att-data-id="attachmentCard.attachment.id"
|
t-att-data-id="attachmentCard.attachment.id"
|
||||||
t-att-data-url="attachmentCard.attachment.defaultSource"
|
t-att-data-url="attachmentCard.attachment.defaultSource"
|
||||||
t-on-click="attachmentCard._onPreviewAttachment"
|
t-on-click="attachmentCard._onPreviewAttachment"
|
||||||
@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
t-if="attachmentCard.attachment.downloadUrl"
|
t-if="attachmentCard.attachment.downloadUrl"
|
||||||
class="o_AttachmentCard_asideItem d-flex justify-content-center align-items-center ml4 o_attachment_preview o_attachment_preview_new_tab"
|
class="o_AttachmentCard_asideItem d-flex justify-content-center align-items-center ml4 o_attachment_preview_new_tab"
|
||||||
data-target="new"
|
data-target="new"
|
||||||
t-att-data-id="attachmentCard.attachment.id"
|
t-att-data-id="attachmentCard.attachment.id"
|
||||||
t-att-data-url="attachmentCard.attachment.defaultSource"
|
t-att-data-url="attachmentCard.attachment.defaultSource"
|
||||||
|
Loading…
Reference in New Issue
Block a user