mirror of
https://github.com/bringout/oca-ocb-hr.git
synced 2026-04-24 17:32:05 +02:00
Initial commit: Hr packages
This commit is contained in:
commit
62531cd146
2820 changed files with 1432848 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
/** @odoo-module */
|
||||
|
||||
import { registry } from '@web/core/registry';
|
||||
|
||||
import { ImageField } from '@web/views/fields/image/image_field';
|
||||
|
||||
export class BackgroundImageField extends ImageField {}
|
||||
BackgroundImageField.template = 'hr.BackgroundImage';
|
||||
|
||||
registry.category("fields").add("background_image", BackgroundImageField);
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
div.o_field_widget.o_field_background_image {
|
||||
display: inline-block;
|
||||
|
||||
> div {
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
<t t-name="hr.BackgroundImage" owl="1">
|
||||
<div
|
||||
t-att-data-tooltip-template="hasTooltip and tooltipAttributes.template"
|
||||
t-att-data-tooltip-info="hasTooltip and tooltipAttributes.info"
|
||||
t-att-data-tooltip-delay="hasTooltip and props.zoomDelay"
|
||||
t-attf-style="background-image: url('#{getUrl(props.previewImage or props.name)}');"/>
|
||||
</t>
|
||||
</templates>
|
||||
Loading…
Add table
Add a link
Reference in a new issue