合并企业版代码(未测试,先提交到测试分支)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// = Dashboard View
|
||||
// ============================================================================
|
||||
// No CSS hacks, variables overrides only
|
||||
|
||||
.o_dashboard_view {
|
||||
--DashboardView-background-color: #{$o-gray-100};
|
||||
--DashboardView__controlPanel-background-color: transparent;
|
||||
--DashboardView__pieChart-background-color: transparent;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// = Image Field
|
||||
// ============================================================================
|
||||
// No CSS hacks, variables overrides only
|
||||
|
||||
.o_field_image {
|
||||
--ImageField-background-color: #{$o-gray-900};
|
||||
}
|
||||
15
web_enterprise/static/src/views/gantt/web_gantt.dark.scss
Normal file
15
web_enterprise/static/src/views/gantt/web_gantt.dark.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
// = Gantt View
|
||||
// ============================================================================
|
||||
// No CSS hacks, variables overrides only
|
||||
|
||||
.o_web_client {
|
||||
// Since the component's design is defined in assets_common, scope variables
|
||||
// declarations within `o_web_client` selector.
|
||||
|
||||
.o_gantt_view {
|
||||
--Gant__DayOff-background-color: rgba(255, 255, 255, .05);
|
||||
// Mix between $gantt-highlight-today-bg and $o-view-background-color
|
||||
// to simulate the superposition of these two colors
|
||||
--Gant__DayOffToday-background-color: #553F3A;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// = Gantt View Variables
|
||||
// ============================================================================
|
||||
// No CSS hacks, variables overrides only
|
||||
|
||||
$gantt-highlight-today-border: rgba($o-warning, 0.5) !default;
|
||||
$gantt-highlight-today-bg: rgba($o-warning, 0.15)!default;
|
||||
$gantt-highlight-hover-row: rgba($o-brand-primary, .1) !default;
|
||||
$gantt-row-open-bg: $o-gray-100 !default;
|
||||
$gantt-unavailability-bg: $o-gray-200 !default;
|
||||
@@ -0,0 +1,8 @@
|
||||
// = Kanban Rendered
|
||||
// ============================================================================
|
||||
// No CSS hacks, variables overrides only
|
||||
|
||||
.o_kanban_renderer {
|
||||
--KanbanGroup-grouped-bg: #{$o-view-background-color};
|
||||
--KanbanRecord__image-bg-color: #{$o-gray-900};
|
||||
}
|
||||
14
web_enterprise/static/src/views/kanban/kanban_view.scss
Normal file
14
web_enterprise/static/src/views/kanban/kanban_view.scss
Normal file
@@ -0,0 +1,14 @@
|
||||
.o_kanban_view {
|
||||
|
||||
.o_column_quick_create .o_kanban_quick_create {
|
||||
input {
|
||||
&, &:focus, &:hover {
|
||||
background: transparent;
|
||||
border-bottom: 1px solid map-get($grays, '600');
|
||||
}
|
||||
}
|
||||
.input-group-append, .input-group-prepend {
|
||||
border-left: 10px solid map-get($grays, '200');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
.o_list_renderer {
|
||||
--ListRenderer-thead-bg-color: #{$o-view-background-color};
|
||||
--ListRenderer-thead-border-end-color: transparent;
|
||||
|
||||
// Standalone list views
|
||||
.o_list_view & {
|
||||
--ListRenderer-thead-padding-v: 1rem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { isMobileOS } from "@web/core/browser/feature_detection";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { ListRenderer } from "@web/views/list/list_renderer";
|
||||
import { PromoteStudioDialog } from "@web_enterprise/webclient/promote_studio_dialog/promote_studio_dialog";
|
||||
|
||||
export const patchListRendererDesktop = {
|
||||
setup() {
|
||||
this._super(...arguments);
|
||||
this.userService = useService("user");
|
||||
|
||||
const { actionId, actionType } = this.env.config;
|
||||
const list = this.props.list;
|
||||
this.isStudioEditable =
|
||||
!isMobileOS() &&
|
||||
this.userService.isSystem &&
|
||||
actionId &&
|
||||
actionType === "ir.actions.act_window" &&
|
||||
list === list.model.root;
|
||||
},
|
||||
|
||||
get displayOptionalFields() {
|
||||
return this.isStudioEditable || this.getOptionalFields.length;
|
||||
},
|
||||
|
||||
/**
|
||||
* This function opens promote studio dialog
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
onSelectedAddCustomField() {
|
||||
this.env.services.dialog.add(PromoteStudioDialog, {});
|
||||
},
|
||||
};
|
||||
|
||||
patch(ListRenderer.prototype, "web_enterprise.ListRendererDesktop", patchListRendererDesktop);
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates id="template" xml:space="preserve">
|
||||
|
||||
<t t-inherit="web.ListRenderer" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//Dropdown" position="inside">
|
||||
<t t-if="isStudioEditable">
|
||||
<div t-if="getOptionalFields.length" class="dropdown-divider"/>
|
||||
<DropdownItem parentClosingMode="'none'" onSelected="() => this.onSelectedAddCustomField()" class="'dropdown-item-studio'">
|
||||
<i class="fa fa-plus fa-fw me-2"/>
|
||||
<span>Add Custom Field</span>
|
||||
</DropdownItem>
|
||||
</t>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
</templates>
|
||||
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