Unsplash API requirements does not directly allow to store their images on our server (We should use hotlinking unless the image is edited (cropped etc)). Still, they have the `Image Beacon Alternative` to allow to store their images on our server if we really need it with our use case. With the Beacon Alternative, we should ping Unsplash server to notify an image view. To do so, we need to be able to recognize Unsplash imagesin the DOM, this is why we are now using /unsplash/ in the URL. The Unsplash image name should be the image ID as it will be the identifier needed to ping their server. This commit also adds credit to Unsplash in the media dialog next to the unsplash input search. It also add the `w-100` on the media dialog card as we lost that UI behavior from BS3 to BS4. opw-35060 closes odoo/odoo#27377
16 lines
855 B
XML
16 lines
855 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="web_unsplash_assets" inherit_id="web_editor.assets_editor" name="Unsplash Images Editor Assets">
|
|
<xpath expr="." position="inside">
|
|
<link rel="stylesheet" type="text/scss" href="/web_unsplash/static/src/scss/unsplash.scss"/>
|
|
<script type="text/javascript" src="/web_unsplash/static/src/js/unsplashapi.js"></script>
|
|
<script type="text/javascript" src="/web_unsplash/static/src/js/unsplash_image_widget.js"></script>
|
|
</xpath>
|
|
</template>
|
|
<template id="assets_common" inherit_id="web_editor.assets_common" name="Unsplash Images Common Assets">
|
|
<xpath expr="." position="inside">
|
|
<script type="text/javascript" src="/web_unsplash/static/src/js/unsplash_beacon.js"></script>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|