合并企业版代码(未测试,先提交到测试分支)
This commit is contained in:
29
web_enterprise/static/src/views/pivot/pivot_renderer.js
Normal file
29
web_enterprise/static/src/views/pivot/pivot_renderer.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { PivotRenderer } from "@web/views/pivot/pivot_renderer";
|
||||
|
||||
const { useEffect, useRef } = owl;
|
||||
|
||||
patch(PivotRenderer.prototype, "web_enterprise.PivotRendererMobile", {
|
||||
setup() {
|
||||
this._super();
|
||||
this.root = useRef("root");
|
||||
if (this.env.isSmall) {
|
||||
useEffect(() => {
|
||||
const tooltipElems = this.root.el.querySelectorAll("*[data-tooltip]");
|
||||
for (const el of tooltipElems) {
|
||||
el.removeAttribute("data-tooltip");
|
||||
el.removeAttribute("data-tooltip-position");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getPadding(cell) {
|
||||
if (this.env.isSmall) {
|
||||
return 5 + cell.indent * 5;
|
||||
}
|
||||
return this._super(...arguments);
|
||||
},
|
||||
});
|
||||
27
web_enterprise/static/src/views/pivot/pivot_renderer.scss
Normal file
27
web_enterprise/static/src/views/pivot/pivot_renderer.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
@include media-breakpoint-down(md) {
|
||||
.o_pivot {
|
||||
height: 100%;
|
||||
|
||||
.dropdown.show {
|
||||
> .dropdown-toggle::after {
|
||||
@include o-caret-down;
|
||||
}
|
||||
}
|
||||
|
||||
th > .o_group_by_menu > .dropdown-menu {
|
||||
.dropdown-item {
|
||||
// caret centered vertically
|
||||
.dropdown-toggle::after{
|
||||
top: 12px;
|
||||
}
|
||||
|
||||
// nested dropdown should be *under* the parent, not on its side
|
||||
.dropdown-menu {
|
||||
top: initial !important;
|
||||
left: 5% !important;
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
web_enterprise/static/src/views/pivot/pivot_renderer.xml
Normal file
10
web_enterprise/static/src/views/pivot/pivot_renderer.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-inherit="web.PivotRenderer" t-inherit-mode="extension">
|
||||
<xpath expr="//div[hasclass('o_pivot')]" position="attributes">
|
||||
<attribute name="t-ref">root</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
Reference in New Issue
Block a user