* website, website_sale The design will be deeply reviewed in a future update. This commit is just about unifying it and making sure no element is cut/overflowing. -> All items are now inline automatically -> If there is no enough space, it becomes full-width over two lines automatically (this can be forced with the o_we_fw class) -> Force to stay on one line with the o_we_force_inline class closes odoo/odoo#44142 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
79 lines
4.1 KiB
XML
79 lines
4.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="s_chart" name="Chart">
|
|
<div class="s_chart" data-type="bar" data-legend-position="top" data-tooltip-display="true" data-stacked="false" data-border-width="2"
|
|
data-data="{
|
|
"labels":["First","Second","Third","Fourth","Fifth"],
|
|
"datasets":[
|
|
{
|
|
"label":"One",
|
|
"data":["12","24","18","17","10"],
|
|
"backgroundColor":"alpha",
|
|
"borderColor":"alpha"
|
|
}
|
|
]
|
|
}">
|
|
<h2>A Chart Title</h2>
|
|
<canvas/>
|
|
</div>
|
|
</template>
|
|
|
|
<template id="s_chart_options" inherit_id="website.snippet_options">
|
|
<xpath expr="." position="inside">
|
|
<div data-js="InnerChart" string="Chart"
|
|
data-selector=".s_chart">
|
|
<we-colorpicker string="Background Color"
|
|
data-select-style="true"
|
|
data-css-property="background-color"
|
|
data-color-prefix="bg-"/>
|
|
<we-select string="Type" data-attribute-name="type" data-attribute-default-value="bar" data-no-preview="true">
|
|
<we-button data-select-data-attribute="bar" data-name="bar_chart_opt">Bar Vertical</we-button>
|
|
<we-button data-select-data-attribute="horizontalBar" data-name="horizontal_bar_chart_opt">Bar Horizontal</we-button>
|
|
<we-button data-select-data-attribute="line">Line</we-button>
|
|
<we-button data-select-data-attribute="pie">Pie</we-button>
|
|
<we-button data-select-data-attribute="doughnut">Doughnut</we-button>
|
|
<we-button data-select-data-attribute="radar">Radar</we-button>
|
|
</we-select>
|
|
<we-checkbox string="Stacked" data-name="stacked_chart_opt" data-dependencies="bar_chart_opt, horizontal_bar_chart_opt"
|
|
data-select-data-attribute="false|true" data-attribute-name="stacked" data-no-preview="true"/>
|
|
<we-select string="Legend" data-attribute-name="legendPosition" data-attribute-default-value="top" data-no-preview="true">
|
|
<we-button data-select-data-attribute="none">None</we-button>
|
|
<we-button data-select-data-attribute="top">Top</we-button>
|
|
<we-button data-select-data-attribute="left">Left</we-button>
|
|
<we-button data-select-data-attribute="bottom">Bottom</we-button>
|
|
<we-button data-select-data-attribute="right">Right</we-button>
|
|
</we-select>
|
|
<we-checkbox string="Tooltip" data-select-data-attribute="false|true" data-attribute-name="tooltipDisplay" data-no-preview="true"/>
|
|
<we-matrix>
|
|
<table>
|
|
<tr>
|
|
<th/>
|
|
<th><we-button class="fa fa-fw fa-plus add_column"/></th>
|
|
</tr>
|
|
<tr>
|
|
<th><we-button class="fa fa-fw fa-plus add_row"/></th>
|
|
</tr>
|
|
</table>
|
|
</we-matrix>
|
|
<we-colorpicker string="Background" data-name="chart_bg_color_opt"
|
|
data-color-change=""
|
|
data-attribute-name="backgroundColor"
|
|
data-no-preview="true"/>
|
|
<we-colorpicker string="Border" data-name="chart_border_color_opt"
|
|
data-color-change=""
|
|
data-attribute-name="borderColor"
|
|
data-no-preview="true"/>
|
|
<we-input string="Border Width" data-select-data-attribute="2px" data-attribute-name="borderWidth" data-unit="px"/>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
<template id="assets_snippet_s_chart_js_000" inherit_id="website.assets_frontend">
|
|
<xpath expr="//script[last()]" position="after">
|
|
<script type="text/javascript" src="/website/static/src/snippets/s_chart/000.js"/>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|