Files
odoo_source/addons/website/views/snippets/s_alert.xml
T
Julien Mougenot 3e3dce0eb8 [REF] *: rename assets 'glob' to 'path'
Rationale:
The majority of cases where an ir.asset is manually declared
outside of manifest files is to specifically add a single asset file.
This means developers are specifying a single asset *path*, and not a
glob expression. In this context, it seems better to name the filepath
field `path`, and document that it can be specified with a glob
expression when (seldom) needed, rather than making the exception appear
to be the norm - possibly puzzling many developers (What's a glob and
why do I need one?)

The doc is updated as well, and some spell-checking and wording
improvements were done too.

This required some adaptations to the existing `ir.asset` declarations:
- odoo/enterprise#17465
- odoo/design-themes#459

closes odoo/odoo#68695

Related: odoo/upgrade#2348
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-04-07 20:39:10 +00:00

49 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_alert" name="Alert">
<div class="s_alert s_alert_md alert-info w-100 clearfix">
<i class="fa fa-2x fa-info-circle s_alert_icon"/>
<div class="s_alert_content">
<p>Explain the benefits you offer. <br/>Don't write about products or services here, write about solutions.</p>
</div>
</div>
</template>
<template id="s_alert_options" inherit_id="website.snippet_options">
<xpath expr="//div[@id='so_width']" position="before">
<div data-selector=".s_alert" data-js="Alert">
<we-select string="Type" data-apply-to=".fa.s_alert_icon" data-trigger="alert_colorpicker_opt">
<we-button data-select-class="fa-user-circle" data-trigger-value="primary">Primary</we-button>
<we-button data-select-class="fa-user-circle-o" data-trigger-value="secondary">Secondary</we-button>
<we-button data-select-class="fa-info-circle" data-trigger-value="info">Info</we-button>
<we-button data-select-class="fa-check-circle" data-trigger-value="success">Success</we-button>
<we-button data-select-class="fa-exclamation-triangle" data-trigger-value="warning">Warning</we-button>
<we-button data-select-class="fa-exclamation-circle" data-trigger-value="danger">Danger</we-button>
</we-select>
</div>
</xpath>
<!-- Keep those options in separate xpath for options order -->
<xpath expr="//div[@id='so_width']" position="after">
<div data-selector=".s_alert">
<we-select string="Size">
<we-button data-select-class="s_alert_sm">Small</we-button>
<we-button data-select-class="s_alert_md">Medium</we-button>
<we-button data-select-class="s_alert_lg">Large</we-button>
</we-select>
<we-colorpicker string="Color" data-name="alert_colorpicker_opt"
data-select-style="true"
data-css-property="background-color"
data-color-prefix="alert-"/>
</div>
</xpath>
</template>
<record id="website.s_alert_000_scss" model="ir.asset">
<field name="name">Alert 000 SCSS</field>
<field name="bundle">web.assets_frontend</field>
<field name="path">website/static/src/snippets/s_alert/000.scss</field>
</record>
</odoo>