*: mass_mailing, website, website_sale Before this commit, it was impossible to add `fa-fw` directly on a `we-button` as it would make the icon half invisible, since the whole `we-button` would have the font-awesome `.fa-fw` css rule applied on it; width: ~1.28em. Then, one would need to insert a `<i/>` tag inside the `we-button` for it to work. This commit improves that behavior by handling automatically such cases, and will preserve the purpose of the `fa-fw` class which is to have a fixed width for those icons. Note that the util class introduced in [1] (o_we_button_icon renamed here in o_we_icon_button) is still useful to handle the case of svg images, they are not allowed to shrink, the same way the fa buttons are. [1]: https://github.com/odoo/odoo/commit/e4233643b93b521454cc146c6a2ae876781fb9ba Related to task-2172311 closes odoo/odoo#77980 X-original-commit: e8ab9d76b802e80bb386812e4c8566825cbc2c92 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Co-authored-by: Younn Olivier <yol@odoo.com> Co-authored-by: qsm-odoo <qsm@odoo.com>
37 lines
1.6 KiB
XML
37 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template name="Embed Code" id="s_embed_code">
|
|
<section class="s_embed_code o_half_screen_height text-center">
|
|
<div class="s_embed_code_embedded container o_not_editable">
|
|
<div class="text-monospace pt8 bg-light"> Replace this with your own HTML code </div>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<!-- Snippet's Options -->
|
|
<template id="s_embed_code_options" inherit_id="website.snippet_options">
|
|
<xpath expr="//div[@data-js='Box']" position="before">
|
|
<div data-js="EmbedCode" data-selector=".s_embed_code">
|
|
<we-row string="Code">
|
|
<we-button data-edit-code="" data-no-preview="true"
|
|
class="o_we_edit_code o_we_no_toggle o_we_bg_success active"
|
|
title="Edit embedded code">Edit</we-button>
|
|
</we-row>
|
|
<we-button-group string="Alignment">
|
|
<we-button class="fa fa-fw fa-align-left" title="Left" data-select-class="text-left"/>
|
|
<we-button class="fa fa-fw fa-align-center" title="Center" data-select-class="text-center"/>
|
|
<we-button class="fa fa-fw fa-align-right" title="Right" data-select-class="text-right"/>
|
|
</we-button-group>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<record id="website.s_embed_code_000_scss" model="ir.asset">
|
|
<field name="name">Embed Code 000 SCSS</field>
|
|
<field name="bundle">web.assets_frontend</field>
|
|
<field name="path">website/static/src/snippets/s_embed_code/000.scss</field>
|
|
</record>
|
|
|
|
</odoo>
|