*: web_editor, website_blog Unfortunately, this feature revealed a new batch of flaws in the editor widgets system so some hacks were made to make it work. We will always have the time to improve the pure technical side later. This commit also separates the notion of color filter from the notion of parallax. A color filter can now be applied independantly, when there is either a background image or a background video. Applying a color filter on top of a background video is actually a new feature. Applying a color filter on top of a background image is actually now achievable by two different ways: this new color filter layer or by applying the color transformation on the image itself via the related option. Depending on the user case, both could make sense at the same time, but more importantly: having a CSS color filter is useful for using those for default Odoo content (e.g. like the current contact us page where we use a cover banner with an image with a black filter on top of it: doing that without CSS color filter would mean to alter the image directly which would not be ok when the user changes the image). Also, sometimes you want the unfiltered image on a page and the exact same one but filtered on another (for example: forum images). Note: this commit also "fixes" an issue: the optimization feature for images when parallax was enabled was not available before. Part of https://github.com/odoo/odoo/pull/47313 task-46147
70 lines
4.2 KiB
XML
70 lines
4.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template name="Google Map" id="s_google_map">
|
|
<section class="s_google_map pt256 pb256" data-map-type="ROADMAP" data-map-color="" data-map-zoom="12" data-map-gps="(50.854975,4.3753899)" data-pin-style="flat">
|
|
<div class="map_container"/>
|
|
</section>
|
|
</template>
|
|
|
|
<!-- Snippet's Options -->
|
|
<template id="s_google_map_options" inherit_id="website.snippet_options">
|
|
<xpath expr="//div[@data-js='Box']" position="before">
|
|
<div data-js="GoogleMap" data-selector=".s_google_map">
|
|
<we-gpspicker string="Address"
|
|
data-select-data-attribute="" data-attribute-name="mapGps"
|
|
data-set-formatted-address=""
|
|
placeholder="e.g. De Brouckere, Brussels, Belgium"
|
|
data-no-preview="true"/>
|
|
<we-select string="Marker style" data-attribute-name="pinStyle">
|
|
<we-button data-select-data-attribute="">Default</we-button>
|
|
<we-button data-select-data-attribute="flat">Flat</we-button>
|
|
</we-select>
|
|
<we-select string="Type" data-no-preview="true" data-reset-map-color="" data-attribute-name="mapType">
|
|
<we-button data-name="roadmap_opt" data-select-data-attribute="ROADMAP">RoadMap</we-button>
|
|
<we-button data-select-data-attribute="TERRAIN">Terrain</we-button>
|
|
<we-button data-select-data-attribute="SATELLITE">Satellite</we-button>
|
|
<we-button data-select-data-attribute="HYBRID">Hybrid</we-button>
|
|
</we-select>
|
|
<we-select string="⌙ Style" data-dependencies="roadmap_opt" data-no-preview="true" data-attribute-name="mapColor">
|
|
<we-button data-select-data-attribute=""
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-default.jpg"/>
|
|
<we-button data-select-data-attribute="lightMonoMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-lightMono.jpg"/>
|
|
<we-button data-select-data-attribute="cupertinoMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-cupertino.jpg"/>
|
|
<we-button data-select-data-attribute="retroMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-retro.jpg"/>
|
|
<we-button data-select-data-attribute="cobaltMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-cobalt.jpg"/>
|
|
<we-button data-select-data-attribute="flatMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-flat.jpg"/>
|
|
<we-button data-select-data-attribute="blueMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-blue.jpg"/>
|
|
<we-button data-select-data-attribute="lillaMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-lilla.jpg"/>
|
|
<we-button data-select-data-attribute="carMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-caramello.jpg"/>
|
|
<we-button data-select-data-attribute="bwMap"
|
|
data-img="/website/static/src/snippets/s_google_map/img/thumbs/map-bw.jpg"/>
|
|
</we-select>
|
|
<we-input string="Zoom" data-select-data-attribute="12" data-no-preview="true" data-attribute-name="mapZoom" data-step="1"/>
|
|
<we-checkbox string="Description" data-no-preview="true" data-show-description="true"/>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="assets_snippet_s_google_map_css_000" inherit_id="website.assets_frontend">
|
|
<xpath expr="//link[last()]" position="after">
|
|
<link rel="stylesheet" type="text/scss" href="/website/static/src/snippets/s_google_map/000.scss"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="assets_snippet_s_google_map_js_000" inherit_id="website.assets_frontend">
|
|
<xpath expr="//script[last()]" position="after">
|
|
<script type="text/javascript" src="/website/static/src/snippets/s_google_map/000.js"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|