Files
odoo_source/addons/website/views/snippets/s_countdown.xml
T
qsm-odoo 7736cde22c [IMP] web_editor, website, *: use new color names
*: mass_mailing, website_blog, website_forum, website_hr_recruitment

Deprecate alpha, beta, gamma, delta and espilon color names and now use
a new color system: o-color-x, with x from 1 to 5.

This will allow to review the colors of all themes to have nice visuals
for the new color combinations classes, without breaking the current
uses of bg-alpha, alert-delta, etc in current websites of customers
(by keeping the old color and classes for compatibility).

This will also allow to uniformize all themes under the same conventions
to enforce BS color override:
- o-color-1 used as primary (as before, for alpha)
- o-color-2 used as secondary (as before, for beta)

Before, some themes were not following the 2 guidelines. The users
using those themes will simply have the possibility to choose o-color-1
and o-color-2 colors accordingly to restore their website without
breaking the new system features.

Another change is that those colors are defined through color palettes
and not theme color palettes. This will avoid them to generate automatic
bootstrap classes which we don't want (alert, btn) and generate the one
we want by ourself.

Note: for mass mailing, the colors and classes also have been renamed
but the system stays unchanged.

Part of https://github.com/odoo/odoo/pull/45856
task-2197038
2020-06-02 09:42:19 +00:00

79 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_countdown" name="Countdown">
<section class="s_countdown pt48 pb48"
data-display="dhms" data-end-action="nothing" data-size="175"
t-att-data-end-time="datetime.datetime.now().timestamp() + 228307"
data-layout="circle" data-layout-background="none"
data-progress-bar-style="surrounded" data-progress-bar-weight="thin"
data-text-color="o-color-1" data-layout-background-color="400" data-progress-bar-color="o-color-1">
<div class="container">
<div class="s_countdown_canvas_wrapper text-center"/>
</div>
</section>
</template>
<template id="s_countdown_options" inherit_id="website.snippet_options">
<xpath expr="." position="inside">
<div data-js="countdown" data-selector=".s_countdown">
<we-datetimepicker string="Due Date" data-select-data-attribute="" data-attribute-name="endTime"/>
<we-row>
<we-select string="What should happen at the end?" data-no-preview="true">
<we-button data-end-action="nothing" data-name="no_end_action_opt">Nothing</we-button>
<we-button data-end-action="redirect" data-name="redirect_end_action_opt">Redirect</we-button>
<we-button data-end-action="message">Show Message</we-button>
</we-select>
<we-button class="fa fa-eye fa-fw align-self-end toggle-edit-message" title="Edit Message"/>
</we-row>
<we-checkbox string="Hide countdown at the end" data-dependencies="!no_end_action_opt"
data-select-class="hide-countdown"/>
<we-urlpicker string="URL" data-dependencies="redirect_end_action_opt"
data-select-data-attribute="" placeholder="e.g. /my-awesome-page" data-attribute-name="redirectUrl"/>
<we-select string="Size" data-attribute-name="size">
<we-button data-select-data-attribute="80">Small</we-button>
<we-button data-select-data-attribute="120">Medium</we-button>
<we-button data-select-data-attribute="175">Large</we-button>
</we-select>
<we-select string="Display" data-attribute-name="display">
<we-button data-select-data-attribute="d">D</we-button>
<we-button data-select-data-attribute="dhm">D - H - M</we-button>
<we-button data-select-data-attribute="dhms">D - H - M - S</we-button>
</we-select>
<we-colorpicker string="Text Color" data-attribute-name="textColor" data-select-data-attribute=""/>
<we-select string="Layout">
<we-button data-layout="circle" data-name="circle_layout_opt">Circle</we-button>
<we-button data-layout="boxes" data-name="boxes_layout_opt">Boxes</we-button>
<we-button data-layout="clean">Clean</we-button>
<we-button data-layout="text">Text Inline</we-button>
</we-select>
<we-select string="Layout Background" data-attribute-name="layoutBackground" data-dependencies="circle_layout_opt, boxes_layout_opt">
<we-button data-select-data-attribute="inner">Inner</we-button>
<we-button data-select-data-attribute="plain">Plain</we-button>
<we-button data-select-data-attribute="none" data-name="no_background_layout_opt">None</we-button>
</we-select>
<we-colorpicker string="Layout Background Color" data-dependencies="!no_background_layout_opt"
data-attribute-name="layoutBackgroundColor" data-select-data-attribute=""/>
<we-select string="Progress Bar Style" data-attribute-name="progressBarStyle" data-dependencies="circle_layout_opt, boxes_layout_opt">
<we-button data-select-data-attribute="surrounded">Surrounded</we-button>
<we-button data-select-data-attribute="disappear">Disappearing</we-button>
<we-button data-select-data-attribute="none" data-name="no_progressbar_style_opt">None</we-button>
</we-select>
<we-select string="Progress Bar Weight" data-attribute-name="progressBarWeight" data-dependencies="!no_progressbar_style_opt">
<we-button data-select-data-attribute="thin">Thin</we-button>
<we-button data-select-data-attribute="thick">Thick</we-button>
</we-select>
<we-colorpicker string="Progress Bar Color" data-dependencies="!no_progressbar_style_opt"
data-attribute-name="progressBarColor" data-select-data-attribute=""/>
</div>
</xpath>
</template>
<template id="assets_snippet_s_countdown_js_000" inherit_id="website.assets_frontend">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/website/static/src/snippets/s_countdown/000.js"/>
</xpath>
</template>
</odoo>