File: s_countdown.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (95 lines) | stat: -rw-r--r-- 10,292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?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 d-flex justify-content-center">
                <div class="s_countdown_canvas_flex" style="width: 25%; max-width: 175px;">
                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="175" height="175" class="w-100" viewBox="0 0 175 175"><defs></defs><g><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="43.75px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="87.5" text-anchor="middle" dominant-baseline="central">2</text><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="14.583333333333334px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="116.66666666666667" text-anchor="middle" dominant-baseline="central">Days</text><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 166.25 87.5 A 78.75 78.75 0 1 1 166.24996062500327 87.42125001312495" stroke-miterlimit="10" stroke-width="5" stroke-opacity="0.2" stroke-dasharray=""></path><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 87.5 8.75 A 78.75 78.75 0 0 1 146.0226550063448 34.80596474923991" stroke-miterlimit="10" stroke-width="5" stroke-dasharray=""></path></g></svg>
                </div>
                <div class="s_countdown_canvas_flex" style="width: 25%; max-width: 175px;">
                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="175" height="175" class="w-100" viewBox="0 0 175 175"><defs></defs><g><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="43.75px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="87.5" text-anchor="middle" dominant-baseline="central">16</text><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="14.583333333333334px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="116.66666666666667" text-anchor="middle" dominant-baseline="central">Hours</text><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 166.25 87.5 A 78.75 78.75 0 1 1 166.24996062500327 87.42125001312495" stroke-miterlimit="10" stroke-width="5" stroke-opacity="0.2" stroke-dasharray=""></path><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 87.5 8.75 A 78.75 78.75 0 1 1 19.30049945197547 126.87500000000003" stroke-miterlimit="10" stroke-width="5" stroke-dasharray=""></path></g></svg>
                </div>
                <div class="s_countdown_canvas_flex" style="width: 25%; max-width: 175px;">
                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="175" height="175" class="w-100" viewBox="0 0 175 175"><defs></defs><g><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="43.75px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="87.5" text-anchor="middle" dominant-baseline="central">30</text><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="14.583333333333334px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="116.66666666666667" text-anchor="middle" dominant-baseline="central">Minutes</text><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 166.25 87.5 A 78.75 78.75 0 1 1 166.24996062500327 87.42125001312495" stroke-miterlimit="10" stroke-width="5" stroke-opacity="0.2" stroke-dasharray=""></path><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 87.5 8.75 A 78.75 78.75 0 0 1 87.5 166.25" stroke-miterlimit="10" stroke-width="5" stroke-dasharray=""></path></g></svg>
                </div>
                <div class="s_countdown_canvas_flex" style="width: 25%; max-width: 175px;">
                    <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="175" height="175" class="w-100" viewBox="0 0 175 175"><defs></defs><g><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="43.75px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="87.5" text-anchor="middle" dominant-baseline="central">45</text><text fill="var(--o-color-1)" stroke="none" font-family="Arial" font-size="14.583333333333334px" font-style="normal" font-weight="normal" text-decoration="normal" x="87.5" y="116.66666666666667" text-anchor="middle" dominant-baseline="central">Seconds</text><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 166.25 87.5 A 78.75 78.75 0 1 1 166.24996062500327 87.42125001312495" stroke-miterlimit="10" stroke-width="5" stroke-opacity="0.2" stroke-dasharray=""></path><path fill="none" stroke="var(--o-color-1)" paint-order="fill stroke markers" d=" M 87.5 8.75 A 78.75 78.75 0 1 1 8.75 87.50000000000001" stroke-miterlimit="10" stroke-width="5" stroke-dasharray=""></path></g></svg>
                </div>
            </div>
        </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="0" data-attribute-name="endTime"/>
            <we-row>
                <we-select string="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_no_countdown">Show Message and hide countdown</we-button>
                    <we-button data-end-action="message">Show Message and keep countdown</we-button>
                </we-select>
                <we-button class="align-self-end toggle-edit-message" title="The message will be visible once the countdown ends">
                    <i class="fa fa-fw fa-eye"/>
                </we-button>
            </we-row>
            <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>

<record id="website.s_countdown_000_js" model="ir.asset">
    <field name="name">Countdown 000 JS</field>
    <field name="bundle">web.assets_frontend</field>
    <field name="path">website/static/src/snippets/s_countdown/000.js</field>
</record>

<record id="website.s_countdown_000_xml" model="ir.asset">
    <field name="name">Countdown 000 XML</field>
    <field name="bundle">web.assets_frontend</field>
    <field name="path">website/static/src/snippets/s_countdown/000.xml</field>
</record>

</odoo>