Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ addon | version | maintainers | summary
[web_environment_ribbon](web_environment_ribbon/) | 16.0.1.0.0 | | Web Environment Ribbon
[web_export_html_as_text](web_export_html_as_text/) | 16.0.1.0.0 | | Web Export Html As Text
[web_field_numeric_formatting](web_field_numeric_formatting/) | 16.0.1.0.0 | | Allow to render float and integer fields without thousands separator
[web_field_tooltip](web_field_tooltip/) | 16.0.1.2.0 | | Displays customizable tooltips for fields
[web_field_tooltip](web_field_tooltip/) | 16.0.1.2.1 | | Displays customizable tooltips for fields
[web_font_size_report_layout](web_font_size_report_layout/) | 16.0.1.1.0 | | Adds a font size selector (pt) to the Document Layout wizard
[web_form_banner](web_form_banner/) | 16.0.1.1.0 | | Web Form Banner
[web_group_by_percentage](web_group_by_percentage/) | 16.0.1.0.1 | | Show the percentage of the total sum in group by rows
Expand Down
2 changes: 1 addition & 1 deletion web_field_tooltip/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Web Field Tooltip
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:497e93ee883ccf6a570f1bc5f936bee62f2a4d0fb695b31a31a7d6cea3cfbf4b
!! source digest: sha256:344c6f02467d70df81da2a31876bac5105348703353f7a02834160f71076719f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion web_field_tooltip/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Web Field Tooltip",
"summary": """
Displays customizable tooltips for fields""",
"version": "16.0.1.2.0",
"version": "16.0.1.2.1",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
Expand Down
2 changes: 1 addition & 1 deletion web_field_tooltip/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Web Field Tooltip</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:497e93ee883ccf6a570f1bc5f936bee62f2a4d0fb695b31a31a7d6cea3cfbf4b
!! source digest: sha256:344c6f02467d70df81da2a31876bac5105348703353f7a02834160f71076719f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_field_tooltip"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_field_tooltip"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module gives the possibility to add tooltips next to fields labels on any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export class FieldTooltip extends Component {
this.showAddHelper =
session.can_manage_tooltips && session.tooltip_show_add_helper;
this.fieldTooltip = this.props.field.field_tooltip;

this.colorMode =
this.env.services.cookie.current.color_scheme === "dark" ? "dark" : "light";
if (session.can_manage_tooltips) {
this.dialogService = useService("dialog");
}
Expand All @@ -30,6 +31,7 @@ export class FieldTooltip extends Component {
return {
title: props.field.string,
help: markup(this.tooltipText),
colorMode: this.colorMode,
};
}

Expand Down Expand Up @@ -66,7 +68,6 @@ export class FieldTooltip extends Component {
{
closeOnClickAway: true,
position: "top",
title: "title",
}
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sup.field-tooltip {

.popup-div {
min-width: 100px;
max-width: 400px;
min-height: 30px;

> * {
Expand All @@ -32,4 +33,15 @@ sup.field-tooltip {
.popover-content {
background-color: white;
}

&.popup-dark-mode {
.popover-title {
font-weight: bold;
background-color: #242733;
}

.popover-content {
background-color: unset;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
</t>

<t t-name="web_field_tooltip.FieldTooltipPopover" owl="1">
<div class="popup-div">
<div
t-attf-class="popup-div {{ props.colorMode === 'dark' ? 'popup-dark-mode' : '' }}"
>
<div class="popover-title">
<span t-esc="props.title" />
</div>
Expand Down