-
46README.md
-
24muk_web_theme/__init__.py
-
50muk_web_theme/__manifest__.py
-
24muk_web_theme/models/__init__.py
-
37muk_web_theme/models/ir_http.py
-
66muk_web_theme/models/res_company.py
-
79muk_web_theme/models/res_config_settings.py
-
69muk_web_theme/models/res_users.py
-
59muk_web_theme/models/web_editor_assets.py
-
BINmuk_web_theme/static/description/branding_mail_banner.png
-
BINmuk_web_theme/static/description/branding_saas_banner.png
-
BINmuk_web_theme/static/description/branding_website_banner.png
-
19muk_web_theme/static/description/index.html
-
BINmuk_web_theme/static/description/screenshot.png
-
BINmuk_web_theme/static/description/screenshot_apps.png
-
BINmuk_web_theme/static/description/screenshot_chatter.png
-
BINmuk_web_theme/static/description/screenshot_customize.png
-
BINmuk_web_theme/static/description/screenshot_mobile_apps.png
-
BINmuk_web_theme/static/description/screenshot_mobile_form.png
-
BINmuk_web_theme/static/description/screenshot_mobile_kanban.png
-
BINmuk_web_theme/static/description/screenshot_mobile_menu.png
-
BINmuk_web_theme/static/description/screenshot_settings.png
-
BINmuk_web_theme/static/description/service_customization.png
-
BINmuk_web_theme/static/description/service_development.png
-
BINmuk_web_theme/static/description/service_implementation.png
-
BINmuk_web_theme/static/description/service_infrastructure.png
-
BINmuk_web_theme/static/description/service_training.png
-
28muk_web_theme/static/src/colors.scss
-
25muk_web_theme/static/src/core/pager/pager.xml
-
64muk_web_theme/static/src/legacy/js/fields_relational.js
-
49muk_web_theme/static/src/legacy/js/form_renderer.js
-
49muk_web_theme/static/src/legacy/js/form_view.js
-
42muk_web_theme/static/src/legacy/js/kanban_column.js
-
44muk_web_theme/static/src/legacy/js/kanban_quick_create.js
-
271muk_web_theme/static/src/legacy/js/kanban_renderer.js
-
37muk_web_theme/static/src/legacy/js/kanban_view.js
-
50muk_web_theme/static/src/legacy/scss/calendar_view.scss
-
40muk_web_theme/static/src/legacy/scss/fields.scss
-
158muk_web_theme/static/src/legacy/scss/form_view.scss
-
100muk_web_theme/static/src/legacy/scss/kanban_view.scss
-
75muk_web_theme/static/src/legacy/scss/list_view.scss
-
38muk_web_theme/static/src/legacy/scss/settings_view.scss
-
108muk_web_theme/static/src/legacy/xml/views.xml
-
30muk_web_theme/static/src/mixins.scss
-
64muk_web_theme/static/src/search/control_panel/control_panel.js
-
243muk_web_theme/static/src/search/control_panel/control_panel.scss
-
299muk_web_theme/static/src/search/control_panel/control_panel.xml
-
22muk_web_theme/static/src/variables.scss
-
8muk_web_theme/static/src/views/form/form.scss
-
12muk_web_theme/static/src/views/list/list.scss
-
26muk_web_theme/static/src/webclient/appsbar/appsbar.js
-
22muk_web_theme/static/src/webclient/appsbar/appsbar.scss
-
32muk_web_theme/static/src/webclient/appsbar/appsbar.xml
-
27muk_web_theme/static/src/webclient/appsmenu/appsmenu.js
-
24muk_web_theme/static/src/webclient/appsmenu/appsmenu.scss
-
29muk_web_theme/static/src/webclient/appsmenu/appsmenu.xml
-
97muk_web_theme/static/src/webclient/appssearch/appssearch.js
-
50muk_web_theme/static/src/webclient/appssearch/appssearch.scss
-
39muk_web_theme/static/src/webclient/appssearch/appssearch.xml
-
89muk_web_theme/static/src/webclient/navbar/navbar.js
-
67muk_web_theme/static/src/webclient/navbar/navbar.scss
-
64muk_web_theme/static/src/webclient/navbar/navbar.xml
-
25muk_web_theme/templates/webclient.xml
-
106muk_web_theme/views/res_config_settings.xml
-
31muk_web_theme/views/res_users.xml
@ -1,31 +1,9 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-today MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Theme |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import models |
|||
|
|||
from odoo import api, SUPERUSER_ID |
|||
|
|||
|
|||
def _uninstall_reset_changes(cr, registry): |
|||
def _uninstall_cleanup(cr, registry): |
|||
env = api.Environment(cr, SUPERUSER_ID, {}) |
|||
env['web_editor.assets'].reset_asset( |
|||
'/muk_web_theme/static/src/colors.scss', |
|||
|
@ -1,27 +1,5 @@ |
|||
################################################################################### |
|||
# |
|||
# Copyright (c) 2017-today MuK IT GmbH. |
|||
# |
|||
# This file is part of MuK Theme |
|||
# (see https://mukit.at). |
|||
# |
|||
# This program is free software: you can redistribute it and/or modify |
|||
# it under the terms of the GNU Lesser General Public License as published by |
|||
# the Free Software Foundation, either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU Lesser General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU Lesser General Public License |
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
################################################################################### |
|||
|
|||
from . import ir_http |
|||
from . import res_company |
|||
from . import res_config_settings |
|||
from . import res_users |
|||
from . import web_editor_assets |
|||
from . import ir_http |
Before Width: 880 | Height: 440 | Size: 43 KiB |
Before Width: 880 | Height: 440 | Size: 43 KiB |
Before Width: 880 | Height: 440 | Size: 43 KiB |
Before Width: 3200 | Height: 1800 | Size: 2.1 MiB After Width: 3200 | Height: 1800 | Size: 2.2 MiB |
Before Width: 3200 | Height: 1800 | Size: 1.6 MiB After Width: 3200 | Height: 1800 | Size: 1.5 MiB |
Before Width: 3200 | Height: 1800 | Size: 393 KiB After Width: 3200 | Height: 1800 | Size: 545 KiB |
Before Width: 1600 | Height: 900 | Size: 113 KiB After Width: 3200 | Height: 1800 | Size: 408 KiB |
Before Width: 1080 | Height: 1920 | Size: 960 KiB After Width: 750 | Height: 1334 | Size: 524 KiB |
Before Width: 1080 | Height: 1920 | Size: 222 KiB After Width: 750 | Height: 1334 | Size: 98 KiB |
Before Width: 1080 | Height: 1920 | Size: 202 KiB After Width: 750 | Height: 1334 | Size: 77 KiB |
Before Width: 1080 | Height: 1920 | Size: 555 KiB After Width: 750 | Height: 1334 | Size: 75 KiB |
Before Width: 1600 | Height: 900 | Size: 99 KiB After Width: 3200 | Height: 1800 | Size: 367 KiB |
Before Width: 250 | Height: 250 | Size: 27 KiB |
Before Width: 250 | Height: 250 | Size: 28 KiB After Width: 250 | Height: 250 | Size: 26 KiB |
Before Width: 250 | Height: 250 | Size: 26 KiB |
After Width: 250 | Height: 250 | Size: 20 KiB |
After Width: 250 | Height: 250 | Size: 24 KiB |
@ -1,35 +1,9 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
$o-brand-odoo: #243742; |
|||
$o-brand-primary: #5D8DA8; |
|||
|
|||
$mk-required-color: #d1dfe6; |
|||
|
|||
$mk-apps-color: #f8f9fa; |
|||
|
|||
$mk-menu-color: #f8f9fa; |
|||
$mk-appbar-color: #dee2e6; |
|||
$mk-appbar-background: #000000; |
|||
|
|||
$mk-brand-gradient-start: lighten($o-brand-odoo, 10%); |
|||
$mk-brand-gradient-end: lighten($o-brand-odoo, 20%); |
|||
|
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
|
|||
<template> |
|||
|
|||
<t |
|||
t-name="web_refresher.Pager" |
|||
t-inherit="web.Pager" |
|||
t-inherit-mode="extension" |
|||
owl="1" |
|||
> |
|||
<xpath expr="//span[hasclass('o_pager_counter')]" position="before"> |
|||
<button |
|||
t-if="props.withAccessKey and !env.isSmall" |
|||
type="button" |
|||
class="fa fa-refresh btn btn-secondary rounded me-1" |
|||
aria-label="Refresh" |
|||
title="Refresh" |
|||
data-hotkey="r" |
|||
tabindex="-1" |
|||
t-on-click.stop="() => this.navigate(0)" |
|||
/> |
|||
</xpath> |
|||
</t> |
|||
|
|||
</template> |
@ -1,64 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.relational_fields', function (require) { |
|||
"use strict"; |
|||
|
|||
const config = require("web.config"); |
|||
const fields = require('web.relational_fields'); |
|||
|
|||
fields.FieldStatus.include({ |
|||
_setState() { |
|||
this._super(...arguments); |
|||
if (config.device.isMobile) { |
|||
_.map(this.status_information, (value) => { |
|||
value.fold = true; |
|||
}); |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
fields.FieldOne2Many.include({ |
|||
_renderButtons() { |
|||
const result = this._super(...arguments); |
|||
if (config.device.isMobile && this.$buttons) { |
|||
const $buttons = this.$buttons.find('.btn-secondary'); |
|||
$buttons.addClass('btn-primary mk_mobile_add'); |
|||
$buttons.removeClass('btn-secondary'); |
|||
} |
|||
return result; |
|||
} |
|||
}); |
|||
|
|||
fields.FieldMany2Many.include({ |
|||
_renderButtons() { |
|||
const result = this._super(...arguments); |
|||
if (config.device.isMobile && this.$buttons) { |
|||
const $buttons = this.$buttons.find('.btn-secondary'); |
|||
$buttons.addClass('btn-primary mk_mobile_add'); |
|||
$buttons.removeClass('btn-secondary'); |
|||
} |
|||
return result; |
|||
} |
|||
}); |
|||
|
|||
}); |
@ -1,49 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.FormRenderer', function (require) { |
|||
"use strict"; |
|||
|
|||
const core = require('web.core'); |
|||
const config = require("web.config"); |
|||
|
|||
const FormRenderer = require('web.FormRenderer'); |
|||
|
|||
FormRenderer.include({ |
|||
_renderHeaderButtons() { |
|||
const $buttons = this._super(...arguments); |
|||
if ( |
|||
!config.device.isMobile || |
|||
!$buttons.is(":has(>:not(.o_invisible_modifier))") |
|||
) { |
|||
return $buttons; |
|||
} |
|||
$buttons.addClass("dropdown-menu"); |
|||
const $dropdown = $( |
|||
core.qweb.render("muk_web_theme.MenuStatusbarButtons") |
|||
); |
|||
$buttons.addClass("dropdown-menu").appendTo($dropdown); |
|||
return $dropdown; |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -1,49 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.FormView', function (require) { |
|||
"use strict"; |
|||
|
|||
const config = require("web.config"); |
|||
|
|||
const FormView = require('web.FormView'); |
|||
const QuickCreateFormView = require('web.QuickCreateFormView'); |
|||
|
|||
FormView.include({ |
|||
init() { |
|||
this._super(...arguments); |
|||
if (config.device.isMobile) { |
|||
this.controllerParams.disableAutofocus = true; |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
QuickCreateFormView.include({ |
|||
init() { |
|||
this._super(...arguments); |
|||
if (config.device.isMobile) { |
|||
this.controllerParams.disableAutofocus = true; |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -1,42 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.KanbanColumn', function (require) { |
|||
"use strict"; |
|||
|
|||
const config = require('web.config'); |
|||
|
|||
const KanbanColumn = require('web.KanbanColumn'); |
|||
|
|||
if (!config.device.isMobile) { |
|||
return; |
|||
} |
|||
|
|||
KanbanColumn.include({ |
|||
init() { |
|||
this._super(...arguments); |
|||
this.recordsDraggable = false; |
|||
this.canBeFolded = false; |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -1,44 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.kanban_column_quick_create', function (require) { |
|||
"use strict"; |
|||
|
|||
const config = require('web.config'); |
|||
|
|||
const KanbanRenderer = require('web.kanban_column_quick_create'); |
|||
|
|||
KanbanRenderer.include({ |
|||
init() { |
|||
this._super(...arguments); |
|||
this.isMobile = config.device.isMobile; |
|||
}, |
|||
_cancel() { |
|||
if (!config.device.isMobile) { |
|||
this._super(...arguments); |
|||
} else if (!this.folded) { |
|||
this.$input.val(''); |
|||
} |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -1,271 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.KanbanRenderer', function (require) { |
|||
"use strict"; |
|||
|
|||
const config = require('web.config'); |
|||
const core = require('web.core'); |
|||
|
|||
const KanbanRenderer = require('web.KanbanRenderer'); |
|||
|
|||
const _t = core._t; |
|||
const qweb = core.qweb; |
|||
|
|||
if (!config.device.isMobile) { |
|||
return; |
|||
} |
|||
|
|||
KanbanRenderer.include({ |
|||
custom_events: _.extend({}, KanbanRenderer.prototype.custom_events || {}, { |
|||
quick_create_column_created: '_onColumnAdded', |
|||
}), |
|||
events: _.extend({}, KanbanRenderer.prototype.events, { |
|||
'click .o_kanban_mobile_tab': '_onMobileTabClicked', |
|||
'click .o_kanban_mobile_add_column': '_onMobileQuickCreateClicked', |
|||
}), |
|||
ANIMATE: true, |
|||
init() { |
|||
this._super.apply(this, arguments); |
|||
this.activeColumnIndex = 0; |
|||
this._scrollPosition = null; |
|||
}, |
|||
on_attach_callback() { |
|||
if (this._scrollPosition && this.state.groupedBy.length && this.widgets.length) { |
|||
var $column = this.widgets[this.activeColumnIndex].$el; |
|||
$column.scrollLeft(this._scrollPosition.left); |
|||
$column.scrollTop(this._scrollPosition.top); |
|||
} |
|||
this._computeTabPosition(); |
|||
this._super.apply(this, arguments); |
|||
}, |
|||
on_detach_callback() { |
|||
if (this.state.groupedBy.length && this.widgets.length) { |
|||
var $column = this.widgets[this.activeColumnIndex].$el; |
|||
this._scrollPosition = { |
|||
left: $column.scrollLeft(), |
|||
top: $column.scrollTop(), |
|||
}; |
|||
} else { |
|||
this._scrollPosition = null; |
|||
} |
|||
this._super.apply(this, arguments); |
|||
}, |
|||
addQuickCreate() { |
|||
if(this._canCreateColumn() && !this.quickCreate.folded) { |
|||
this._onMobileQuickCreateClicked(); |
|||
} |
|||
return this.widgets[this.activeColumnIndex].addQuickCreate(); |
|||
}, |
|||
updateColumn(localID) { |
|||
var index = _.findIndex(this.widgets, {db_id: localID}); |
|||
var $column = this.widgets[index].$el; |
|||
var scrollTop = $column.scrollTop(); |
|||
return this._super.apply(this, arguments) |
|||
.then(() => this._layoutUpdate(false)) |
|||
.then(() => $column.scrollTop(scrollTop)); |
|||
}, |
|||
_canCreateColumn: function() { |
|||
return this.quickCreateEnabled && this.quickCreate && this.widgets.length; |
|||
}, |
|||
_computeColumnPosition(animate) { |
|||
if (this.widgets.length) { |
|||
const rtl = _t.database.parameters.direction === 'rtl'; |
|||
this.$('.o_kanban_group').show(); |
|||
const $columnAfter = this._toNode(this.widgets.filter((widget, index) => index > this.activeColumnIndex)); |
|||
const promiseAfter = this._updateColumnCss($columnAfter, rtl ? {right: '100%'} : {left: '100%'}, animate); |
|||
const $columnBefore = this._toNode(this.widgets.filter((widget, index) => index < this.activeColumnIndex)); |
|||
const promiseBefore = this._updateColumnCss($columnBefore, rtl ? {right: '-100%'} : {left: '-100%'}, animate); |
|||
const $columnCurrent = this._toNode(this.widgets.filter((widget, index) => index === this.activeColumnIndex)); |
|||
const promiseCurrent = this._updateColumnCss($columnCurrent, rtl ? {right: '0%'} : {left: '0%'}, animate); |
|||
promiseAfter |
|||
.then(promiseBefore) |
|||
.then(promiseCurrent) |
|||
.then(() => { |
|||
$columnAfter.hide(); |
|||
$columnBefore.hide(); |
|||
}); |
|||
} |
|||
}, |
|||
_computeCurrentColumn() { |
|||
if (this.widgets.length) { |
|||
var column = this.widgets[this.activeColumnIndex]; |
|||
if (!column) { |
|||
return; |
|||
} |
|||
var columnID = column.id || column.db_id; |
|||
this.$('.o_kanban_mobile_tab.o_current, .o_kanban_group.o_current') |
|||
.removeClass('o_current'); |
|||
this.$('.o_kanban_group[data-id="' + columnID + '"], ' + |
|||
'.o_kanban_mobile_tab[data-id="' + columnID + '"]') |
|||
.addClass('o_current'); |
|||
} |
|||
}, |
|||
_computeTabPosition() { |
|||
this._computeTabJustification(); |
|||
this._computeTabScrollPosition(); |
|||
}, |
|||
_computeTabScrollPosition() { |
|||
if (this.widgets.length) { |
|||
var lastItemIndex = this.widgets.length - 1; |
|||
var moveToIndex = this.activeColumnIndex; |
|||
var scrollToLeft = 0; |
|||
for (var i = 0; i < moveToIndex; i++) { |
|||
var columnWidth = this._getTabWidth(this.widgets[i]); |
|||
if (moveToIndex !== lastItemIndex && i === moveToIndex - 1) { |
|||
var partialWidth = 0.75; |
|||
scrollToLeft += columnWidth * partialWidth; |
|||
} else { |
|||
scrollToLeft += columnWidth; |
|||
} |
|||
} |
|||
this.$('.o_kanban_mobile_tabs').scrollLeft(scrollToLeft); |
|||
} |
|||
}, |
|||
_computeTabJustification() { |
|||
if (this.widgets.length) { |
|||
var self = this; |
|||
var widthChilds = this.widgets.reduce(function (total, column) { |
|||
return total + self._getTabWidth(column); |
|||
}, 0); |
|||
var $tabs = this.$('.o_kanban_mobile_tabs'); |
|||
$tabs.toggleClass('justify-content-between', $tabs.outerWidth() >= widthChilds); |
|||
} |
|||
}, |
|||
_enableSwipe() { |
|||
var self = this; |
|||
var step = _t.database.parameters.direction === 'rtl' ? -1 : 1; |
|||
this.$el.swipe({ |
|||
excludedElements: ".o_kanban_mobile_tabs", |
|||
swipeLeft() { |
|||
var moveToIndex = self.activeColumnIndex + step; |
|||
if (moveToIndex < self.widgets.length) { |
|||
self._moveToGroup(moveToIndex, self.ANIMATE); |
|||
} |
|||
}, |
|||
swipeRight() { |
|||
var moveToIndex = self.activeColumnIndex - step; |
|||
if (moveToIndex > -1) { |
|||
self._moveToGroup(moveToIndex, self.ANIMATE); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
_getTabWidth (column) { |
|||
var columnID = column.id || column.db_id; |
|||
return this.$('.o_kanban_mobile_tab[data-id="' + columnID + '"]').outerWidth(); |
|||
}, |
|||
_layoutUpdate (animate) { |
|||
this._computeCurrentColumn(); |
|||
this._computeTabPosition(); |
|||
this._computeColumnPosition(animate); |
|||
}, |
|||
_moveToGroup(moveToIndex, animate) { |
|||
if (moveToIndex < 0 || moveToIndex >= this.widgets.length) { |
|||
this._layoutUpdate(animate); |
|||
return Promise.resolve(); |
|||
} |
|||
this.activeColumnIndex = moveToIndex; |
|||
var column = this.widgets[this.activeColumnIndex]; |
|||
if (column.data.isOpen) { |
|||
this._layoutUpdate(animate); |
|||
} else { |
|||
this.trigger_up('column_toggle_fold', { |
|||
db_id: column.db_id, |
|||
onSuccess: () => this._layoutUpdate(animate) |
|||
}); |
|||
} |
|||
this._enableSwipe(); |
|||
return Promise.resolve(); |
|||
}, |
|||
_renderGrouped(fragment) { |
|||
var self = this; |
|||
var newFragment = document.createDocumentFragment(); |
|||
this._super.apply(this, [newFragment]); |
|||
this.defs.push(Promise.all(this.defs).then(function () { |
|||
var data = []; |
|||
_.each(self.state.data, function (group) { |
|||
if (!group.value) { |
|||
group = _.extend({}, group, {value: _t('Undefined')}); |
|||
data.unshift(group); |
|||
} else { |
|||
data.push(group); |
|||
} |
|||
}); |
|||
|
|||
var kanbanColumnContainer = document.createElement('div'); |
|||
kanbanColumnContainer.classList.add('o_kanban_columns_content'); |
|||
kanbanColumnContainer.appendChild(newFragment); |
|||
fragment.appendChild(kanbanColumnContainer); |
|||
$(qweb.render('KanbanView.MobileTabs', { |
|||
data: data, |
|||
quickCreateEnabled: self._canCreateColumn() |
|||
})).prependTo(fragment); |
|||
})); |
|||
}, |
|||
_renderView() { |
|||
var self = this; |
|||
return this._super.apply(this, arguments).then(function () { |
|||
if (self.state.groupedBy.length) { |
|||
return self._moveToGroup(0); |
|||
} else { |
|||
if(self._canCreateColumn()) { |
|||
self._onMobileQuickCreateClicked(); |
|||
} |
|||
return Promise.resolve(); |
|||
} |
|||
}); |
|||
}, |
|||
_toNode(widgets) { |
|||
const selectorCss = widgets |
|||
.map(widget => '.o_kanban_group[data-id="' + (widget.id || widget.db_id) + '"]') |
|||
.join(', '); |
|||
return this.$(selectorCss); |
|||
}, |
|||
_updateColumnCss($column, cssProperties, animate) { |
|||
if (animate) { |
|||
return new Promise(resolve => $column.animate(cssProperties, 'fast', resolve)); |
|||
} else { |
|||
$column.css(cssProperties); |
|||
return Promise.resolve(); |
|||
} |
|||
}, |
|||
_onColumnAdded() { |
|||
this._computeTabPosition(); |
|||
if(this._canCreateColumn() && !this.quickCreate.folded) { |
|||
this.quickCreate.toggleFold(); |
|||
} |
|||
}, |
|||
_onMobileQuickCreateClicked: function() { |
|||
this.$('.o_kanban_group').toggle(); |
|||
this.quickCreate.toggleFold(); |
|||
}, |
|||
_onMobileTabClicked(event) { |
|||
if(this._canCreateColumn() && !this.quickCreate.folded) { |
|||
this.quickCreate.toggleFold(); |
|||
} |
|||
this._moveToGroup($(event.currentTarget).index(), true); |
|||
}, |
|||
_renderExampleBackground() {}, |
|||
}); |
|||
|
|||
}); |
@ -1,37 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
odoo.define('muk_web_theme.KanbanView', function (require) { |
|||
"use strict"; |
|||
|
|||
const config = require("web.config"); |
|||
|
|||
const KanbanView = require('web.KanbanView'); |
|||
|
|||
KanbanView.include({ |
|||
init() { |
|||
this._super.apply(this, arguments); |
|||
this.jsLibs.push("/web/static/lib/jquery.touchSwipe/jquery.touchSwipe.js"); |
|||
}, |
|||
}); |
|||
|
|||
}); |
@ -1,50 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
@include media-breakpoint-down(sm) { |
|||
.o_calendar_view .o_calendar_widget { |
|||
.fc-timeGridDay-view .fc-axis, |
|||
.fc-timeGridWeek-view .fc-axis { |
|||
padding-left: 0px; |
|||
} |
|||
.fc-dayGridMonth-view { |
|||
padding-left: 0px; |
|||
.fc-week-number { |
|||
display: none; |
|||
} |
|||
} |
|||
.fc-dayGridYear-view { |
|||
padding-left: 0px; |
|||
> .fc-month-container { |
|||
width: 95%; |
|||
} |
|||
} |
|||
.fc-timeGridDay-view .fc-widget-header { |
|||
margin: 0 4px; |
|||
} |
|||
.fc-timeGridWeek-view .fc-widget-header { |
|||
word-spacing: 4em; |
|||
white-space: normal; |
|||
text-align: center; |
|||
} |
|||
} |
|||
} |
@ -1,40 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_field_widget { |
|||
&.o_field_many2one .o_external_button { |
|||
color: $o-brand-odoo |
|||
} |
|||
} |
|||
|
|||
.o_required_modifier { |
|||
&.o_input, .o_input { |
|||
background-color: $mk-required-color !important; |
|||
} |
|||
} |
|||
|
|||
@include media-breakpoint-down(sm) { |
|||
.o_form_view .mk_mobile_add { |
|||
margin-left: 0 !important; |
|||
margin-bottom: 10px !important; |
|||
} |
|||
} |
@ -1,158 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_form_view { |
|||
.o_form_sheet_bg { |
|||
background: $o-webclient-background-color; |
|||
border-bottom: 1px solid gray('300'); |
|||
> .o_form_sheet { |
|||
@include mk-container-widths(); |
|||
background-color: $o-view-background-color; |
|||
border: 1px solid gray('400'); |
|||
box-shadow: 0 5px 20px -15px black; |
|||
max-width: calc(100% - #{$o-horizontal-padding*2}); |
|||
} |
|||
.o_form_statusbar { |
|||
position: sticky; |
|||
z-index: 1; |
|||
top: 0; |
|||
} |
|||
.oe_button_box { |
|||
.btn.oe_stat_button > .o_button_icon { |
|||
color: $o-brand-odoo; |
|||
} |
|||
} |
|||
.oe_title { |
|||
max-width: 100%; |
|||
width: initial; |
|||
span.o_field_widget { |
|||
max-width: 100%; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
overflow: hidden; |
|||
width: initial; |
|||
} |
|||
} |
|||
.o_notebook { |
|||
.nav-tabs { |
|||
overflow-x : auto; |
|||
overflow-y: hidden; |
|||
flex-flow: nowrap; |
|||
.nav-item { |
|||
white-space: nowrap; |
|||
} |
|||
} |
|||
> .tab-content > .tab-pane > :first-child { |
|||
margin-top: 0; |
|||
} |
|||
} |
|||
} |
|||
&.o_form_editable { |
|||
.oe_title { |
|||
max-width: map-get($container-max-widths, md) - (2 * $o-horizontal-padding); |
|||
} |
|||
} |
|||
@include media-breakpoint-down(sm) { |
|||
.o_form_sheet { |
|||
min-width: 100% !important; |
|||
max-width: 100% !important; |
|||
margin-top: 15px !important; |
|||
} |
|||
.o_group { |
|||
@for $i from 1 through $o-form-group-cols { |
|||
.o_group_col_#{$i} { |
|||
width: 100% !important; |
|||
} |
|||
} |
|||
.o_field_widget.o_text_overflow { |
|||
width: auto !important; |
|||
} |
|||
} |
|||
.o_statusbar_buttons_dropdown { |
|||
border: { |
|||
bottom: 0; |
|||
radius: 0; |
|||
top: 0; |
|||
} |
|||
height: 100%; |
|||
} |
|||
.o_statusbar_buttons > .btn { |
|||
border-radius: 0; |
|||
border: 0; |
|||
width: 100%; |
|||
margin-bottom: 0.2rem; |
|||
&:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
} |
|||
.o_statusbar_status { |
|||
.o_arrow_button:first-child::before { |
|||
content: none; |
|||
display: none; |
|||
} |
|||
} |
|||
.app_settings_block { |
|||
.row { |
|||
margin: 0; |
|||
} |
|||
} |
|||
.o_notebook .nav-tabs { |
|||
&::-webkit-scrollbar { |
|||
display: none; |
|||
} |
|||
} |
|||
.o_cp_buttons { |
|||
width: 100%; |
|||
div, .o-kanban-button-new { |
|||
width: 100%; |
|||
} |
|||
} |
|||
} |
|||
@include media-breakpoint-down(xs) { |
|||
.oe_title { |
|||
width: 100% !important; |
|||
max-width: 100% !important; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.mk_chatter_position_sided { |
|||
@include media-breakpoint-up(xxl, $o-extra-grid-breakpoints) { |
|||
.o_form_view:not(.o_form_nosheet) { |
|||
display: flex; |
|||
flex-flow: row nowrap; |
|||
height: 100%; |
|||
.o_form_sheet_bg { |
|||
min-width: $mk-form-min-width; |
|||
flex: 1 1 auto; |
|||
overflow: auto; |
|||
} |
|||
> .o_FormRenderer_chatterContainer { |
|||
flex: 1 1 auto; |
|||
overflow: auto; |
|||
min-width: $mk-chatter-min-width; |
|||
max-width: $mk-chatter-max-width; |
|||
border-left: 1px solid gray('400'); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,100 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
@include media-breakpoint-down(sm) { |
|||
.o_kanban_view.o_kanban_grouped { |
|||
display: block; |
|||
position: relative; |
|||
overflow-x: hidden; |
|||
.o_kanban_mobile_tabs_container { |
|||
position: sticky; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
width: 100%; |
|||
top: 0; |
|||
z-index: 1; |
|||
background-color: #5E5E5E; |
|||
.o_kanban_mobile_add_column { |
|||
height: $o-kanban-mobile-tabs-height; |
|||
padding: 10px; |
|||
border-left: grey 1px solid; |
|||
color: white; |
|||
font-size: 14px; |
|||
} |
|||
.o_kanban_mobile_tabs { |
|||
position: relative; |
|||
display: flex; |
|||
width: 100%; |
|||
height: $o-kanban-mobile-tabs-height; |
|||
overflow-x: auto; |
|||
.o_kanban_mobile_tab { |
|||
height: $o-kanban-mobile-tabs-height; |
|||
padding: 10px 20px; |
|||
font-size: 14px; |
|||
color: white; |
|||
&.o_current { |
|||
font-weight: bold; |
|||
border-bottom: 3px solid $o-brand-primary; |
|||
} |
|||
.o_column_title { |
|||
white-space: nowrap; |
|||
text-transform: uppercase; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.o_kanban_columns_content { |
|||
position: relative; |
|||
} |
|||
&[class] .o_kanban_group:not(.o_column_folded) { |
|||
@include o-position-absolute($top: $o-kanban-mobile-tabs-height, $left: 0, $bottom: 0); |
|||
width: 100%; |
|||
padding: 0; |
|||
margin-left: 0; |
|||
border: none; |
|||
&.o_current { |
|||
position: inherit; |
|||
top: 0; |
|||
&.o_kanban_no_records { |
|||
min-height: $o-kanban-mobile-empty-height; |
|||
} |
|||
} |
|||
.o_kanban_header { |
|||
display: none; |
|||
} |
|||
.o_kanban_record, .o_kanban_quick_create { |
|||
border: none; |
|||
border-bottom: 1px solid lightgray; |
|||
padding: 10px 16px; |
|||
margin: 0; |
|||
} |
|||
} |
|||
} |
|||
.o_kanban_view .o_column_quick_create { |
|||
.o_quick_create_folded { |
|||
display: none !important; |
|||
} |
|||
.o_quick_create_unfolded{ |
|||
width: 100%; |
|||
} |
|||
} |
|||
} |
@ -1,75 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
.o_list_view { |
|||
table { |
|||
overflow-x: hidden; |
|||
} |
|||
table, thead, tfoot, td, th { |
|||
border: none !important; |
|||
} |
|||
thead { |
|||
background-color: white; |
|||
th.o_column_sortable:hover { |
|||
background-color: white; |
|||
} |
|||
} |
|||
tfoot { |
|||
color: white !important; |
|||
cursor: default; |
|||
font-weight: normal; |
|||
} |
|||
} |
|||
|
|||
.o_list_table_grouped.table tbody tr { |
|||
&:nth-of-type(2n+1) { |
|||
background-color: white; |
|||
} |
|||
&.o_group_header { |
|||
background-image: none; |
|||
background-color: gray('200'); |
|||
box-shadow: inset 0 1px 0 gray('300'); |
|||
} |
|||
&:hover { |
|||
background-color: gray('200'); |
|||
} |
|||
} |
|||
|
|||
.o_content, .modal-content { |
|||
> div > .table-responsive { |
|||
overflow-x: initial; |
|||
> .o_list_view { |
|||
thead, thead tr:nth-child(1) th { |
|||
border-bottom: solid 1px gray('300'); |
|||
background-color: white; |
|||
position: sticky; |
|||
z-index: 1; |
|||
top: 0; |
|||
} |
|||
tfoot, tfoot tr:nth-child(1) td { |
|||
background-color: $o-list-footer-bg-color; |
|||
position: sticky; |
|||
bottom: 0; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,38 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
@include media-breakpoint-down(sm) { |
|||
.o_base_settings .o_setting_container { |
|||
display: block; |
|||
.settings_tab { |
|||
flex-flow: row nowrap; |
|||
padding-top: 0px; |
|||
.tab { |
|||
padding-right: 16px; |
|||
} |
|||
.selected { |
|||
background-color: #212529; |
|||
box-shadow: inset 0 -5px #7c7bad; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,108 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-today MuK IT GmbH. |
|||
|
|||
This file is part of MuK Theme |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates id="template" xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_theme.MenuStatusbarButtons"> |
|||
<div class="dropdown"> |
|||
<button class="o_statusbar_buttons_dropdown btn btn-secondary dropdown-toggle" type="button" |
|||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|||
Actions |
|||
</button> |
|||
</div> |
|||
</t> |
|||
|
|||
<t t-name="muk_web_theme.IconButton"> |
|||
<i t-attf-class="d-inline d-sm-none fa fa-#{icon}" t-att-title="label"/> |
|||
<span class="d-none d-sm-inline" t-esc="label"/> |
|||
</t> |
|||
|
|||
<t t-extend="FormView.buttons"> |
|||
<t t-jquery=".o_form_button_edit" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'pencil'"/> |
|||
<t t-set="label">Edit</t> |
|||
</t> |
|||
</t> |
|||
<t t-jquery=".o_form_button_create" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'plus'"/> |
|||
<t t-set="label">Create</t> |
|||
</t> |
|||
</t> |
|||
<t t-jquery=".o_form_button_save" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'floppy-o'"/> |
|||
<t t-set="label">Save</t> |
|||
</t> |
|||
</t> |
|||
<t t-jquery=".o_form_button_cancel" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'times'"/> |
|||
<t t-set="label">Discard</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-extend="ListView.buttons"> |
|||
<t t-jquery=".o_list_button_add" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'plus'"/> |
|||
<t t-set="label">Create</t> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-jquery=".o_list_button_save" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'floppy-o'"/> |
|||
<t t-set="label">Save</t> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-jquery=".o_list_button_discard" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'times'"/> |
|||
<t t-set="label">Discard</t> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-extend="KanbanView.buttons"> |
|||
<t t-jquery="button" t-operation="inner"> |
|||
<t t-call="muk_web_theme.IconButton"> |
|||
<t t-set="icon" t-value="'plus'"/> |
|||
<t t-set="label" t-value="create_text || _t('Create')"/> |
|||
</t> |
|||
</t> |
|||
</t> |
|||
|
|||
<t t-extend="SearchView.FavoriteMenu"> |
|||
<t t-jquery="button[data-toggle='dropdown']" t-operation="inner"> |
|||
<span class="fa fa-star"/> |
|||
<span class="mk_dropdown_text">Favorites</span> |
|||
<span t-if="widget.isMobile" class="fa fa-chevron-right float-right mt4"/> |
|||
</t> |
|||
</t> |
|||
|
|||
</templates> |
@ -1,64 +0,0 @@ |
|||
/** @odoo-module **/ |
|||
|
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
import { patch } from "web.utils"; |
|||
import { useService } from "@web/core/utils/hooks"; |
|||
import { SIZES } from "@web/core/ui/ui_service"; |
|||
|
|||
import LegacyControlPanel from "web.ControlPanel"; |
|||
import { ControlPanel } from "@web/search/control_panel/control_panel"; |
|||
import { SearchBar } from "@web/search/search_bar/search_bar"; |
|||
|
|||
const {useState, useContext} = owl.hooks; |
|||
|
|||
patch(LegacyControlPanel.prototype, "muk_web_theme.LegacyControlPanelMobile", { |
|||
setup() { |
|||
this._super(); |
|||
this.state = useState({ |
|||
mobileSearchMode: "", |
|||
}); |
|||
}, |
|||
setMobileSearchMode(ev) { |
|||
this.state.mobileSearchMode = ev.detail; |
|||
}, |
|||
}); |
|||
|
|||
patch(ControlPanel.prototype, "muk_web_theme.ControlPanelMobile", { |
|||
setup() { |
|||
this._super(); |
|||
this.state = useState({ |
|||
mobileSearchMode: "", |
|||
}); |
|||
this.SIZES = SIZES; |
|||
this.uiService = useService("ui"); |
|||
console.log(this); |
|||
}, |
|||
setMobileSearchMode(ev) { |
|||
this.state.mobileSearchMode = ev.detail; |
|||
}, |
|||
}); |
|||
|
|||
patch(SearchBar, "muk_web_theme.SearchBarMobile", { |
|||
template: "muk_web_theme.SearchBar", |
|||
}); |
@ -1,243 +0,0 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
@include media-breakpoint-down(sm) { |
|||
.o_control_panel { |
|||
padding-left: $o-horizontal-padding /2; |
|||
padding-right: $o-horizontal-padding /2; |
|||
.o_cp_top { |
|||
justify-content: space-between; |
|||
.o_cp_top_left { |
|||
flex-grow: 100; |
|||
.breadcrumb { |
|||
overflow: hidden; |
|||
display: block; |
|||
white-space: nowrap; |
|||
text-overflow: ellipsis; |
|||
} |
|||
} |
|||
.o_cp_top_right { |
|||
flex-grow: 1; |
|||
min-height: 35px; |
|||
.o_searchview_mobile { |
|||
border: none; |
|||
} |
|||
} |
|||
} |
|||
.o_cp_bottom { |
|||
justify-content: space-between; |
|||
.o_cp_bottom_left { |
|||
flex-grow: 1; |
|||
.o_cp_action_menus, .o_cp_buttons { |
|||
flex: 1 1 100%; |
|||
} |
|||
.o_cp_action_menus .o_dropdown .o_dropdown_toggler_btn { |
|||
.o_dropdown_title { |
|||
display: none; |
|||
} |
|||
i:last-of-type{ |
|||
display: none; |
|||
} |
|||
&::after{ |
|||
display: inline-block; |
|||
width: 0; |
|||
height: 0; |
|||
margin-left: 0.255em; |
|||
vertical-align: 0.255em; |
|||
content: ""; |
|||
border-top: 0.3em solid; |
|||
border-right: 0.3em solid transparent; |
|||
border-bottom: 0; |
|||
border-left: 0.3em solid transparent; |
|||
} |
|||
} |
|||
} |
|||
.o_cp_bottom_right { |
|||
.o_cp_pager { |
|||
white-space: nowrap; |
|||
.o_pager_counter { |
|||
max-width: 60px; |
|||
@include o-text-overflow; |
|||
} |
|||
.o_pager_previous, .o_pager_next { |
|||
border: none; |
|||
} |
|||
} |
|||
.o_search_options { |
|||
display: none; |
|||
} |
|||
} |
|||
} |
|||
.breadcrumb-item { |
|||
&:not(.active) { |
|||
padding-left: 0; |
|||
} |
|||
&::before { |
|||
content: none; |
|||
padding-right: 0; |
|||
} |
|||
&:nth-last-of-type(1n+3) { |
|||
display: none; |
|||
} |
|||
&:nth-last-of-type(2) { |
|||
&::before { |
|||
content: "\f053"; |
|||
cursor: pointer; |
|||
color: $o-brand-primary; |
|||
font-family: FontAwesome; |
|||
} |
|||
a { |
|||
display: none; |
|||
} |
|||
} |
|||
} |
|||
.o_searchview_input_container > .o_searchview_autocomplete { |
|||
left: 0; |
|||
right: 0; |
|||
> li { |
|||
padding: 10px 0px; |
|||
} |
|||
} |
|||
.o_searchview_quick { |
|||
display: flex; |
|||
flex: 1 1 auto; |
|||
align-items: center; |
|||
.o_searchview_input_container { |
|||
flex: 1 1 auto; |
|||
} |
|||
} |
|||
.o_searchview { |
|||
padding: 1px 0px 3px 0px; |
|||
&.o_searchview_mobile { |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
.o_cp_buttons .btn.d-block:not(.d-none) { |
|||
display: inline-block !important; |
|||
} |
|||
.o_cp_switch_buttons { |
|||
display: flex; |
|||
min-width: 0px; |
|||
flex-direction: row; |
|||
align-content: center; |
|||
justify-content: space-around; |
|||
padding: 0; |
|||
.btn { |
|||
margin: 5px; |
|||
border: none; |
|||
font-size: 1.25rem; |
|||
} |
|||
} |
|||
} |
|||
.o_controller_with_searchpanel .o_search_panel { |
|||
display: none; |
|||
} |
|||
} |
|||
|
|||
.mk_cp_mobile_search { |
|||
position: fixed; |
|||
top: 0; |
|||
left: 0; |
|||
bottom: 0; |
|||
padding: 0; |
|||
width: 100%; |
|||
background-color: white; |
|||
z-index: $zindex-modal; |
|||
overflow: auto; |
|||
.mk_mobile_search_header { |
|||
height: 46px; |
|||
margin-bottom: 10px; |
|||
width: 100%; |
|||
background-color: $o-brand-odoo; |
|||
color: white; |
|||
span:active { |
|||
background-color: darken($o-brand-primary, 10%); |
|||
} |
|||
span { |
|||
cursor: pointer; |
|||
} |
|||
} |
|||
.o_searchview_input_container { |
|||
display: flex; |
|||
padding: 15px 20px 0 20px; |
|||
position: relative; |
|||
.o_searchview_input { |
|||
width: 100%; |
|||
margin-bottom: 15px; |
|||
border-bottom: 1px solid $o-brand-primary; |
|||
} |
|||
.o_searchview_facet { |
|||
display: inline-flex; |
|||
order: 1; |
|||
} |
|||
.o_searchview_autocomplete { |
|||
top: 3rem; |
|||
} |
|||
} |
|||
.mk_mobile_search_filter { |
|||
padding-bottom: 15%; |
|||
> .dropdown { |
|||
flex-direction: column; |
|||
line-height: 2rem; |
|||
width: 100%; |
|||
margin: 15px 5px 0px 5px; |
|||
border: solid 1px darken(gray("200"), 20%); |
|||
} |
|||
.dropdown.show > .dropdown-toggle { |
|||
background-color: gray("200"); |
|||
} |
|||
.dropdown-toggle { |
|||
width: 100%; |
|||
text-align: left; |
|||
&:after { |
|||
top: auto; |
|||
} |
|||
} |
|||
.dropdown-item:before { |
|||
top: auto; |
|||
} |
|||
.dropdown-item.focus { |
|||
background-color: white; |
|||
} |
|||
.dropdown-menu { |
|||
position: relative !important; |
|||
top: 0 !important; |
|||
left: 0 !important; |
|||
width: 100%; |
|||
max-height: 100%; |
|||
box-shadow: none; |
|||
border: none; |
|||
color: gray("600"); |
|||
.divider { |
|||
margin: 0px; |
|||
} |
|||
> li > a { |
|||
padding: 10px 26px; |
|||
} |
|||
} |
|||
} |
|||
.mk_mobile_search_show_result { |
|||
padding: 10px; |
|||
font-size: 15px; |
|||
} |
|||
} |
|||
|
@ -1,299 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-today MuK IT GmbH. |
|||
|
|||
This file is part of MuK Theme |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates> |
|||
|
|||
<t t-inherit="web.Legacy.ControlPanel" t-inherit-mode="extension" owl="1"> |
|||
<xpath expr="//nav[hasclass('o_cp_switch_buttons')]" position="replace"> |
|||
<t t-if="props.views.length gt 1"> |
|||
<t t-if="model.config.env.device.size_class <= model.config.env.device.SIZES.LG"> |
|||
<Dropdown |
|||
position="'bottom-end'" |
|||
menuClass="'d-inline-flex o_cp_switch_buttons'" |
|||
togglerClass="'btn btn-link'" |
|||
> |
|||
<t t-set-slot="toggler"> |
|||
<i |
|||
class="fa fa-lg o_switch_view" |
|||
t-attf-class="o_{{env.view.type}} {{env.view.icon}} {{ props.views.filter(view => view.type === env.view.type)[0].icon }} {{env.view.active ? 'active' : ''}}" |
|||
/> |
|||
</t> |
|||
<t t-foreach="props.views" t-as="view" t-key="view.type"> |
|||
<t t-call="web.ViewSwitcherButton" /> |
|||
</t> |
|||
</Dropdown> |
|||
</t> |
|||
<t t-else=""> |
|||
<nav |
|||
class="btn-group o_cp_switch_buttons" |
|||
role="toolbar" |
|||
aria-label="View switcher" |
|||
> |
|||
<t t-foreach="props.views" t-as="view" t-key="view.type"> |
|||
<t t-call="web.ViewSwitcherButton" /> |
|||
</t> |
|||
</nav> |
|||
</t> |
|||
</t> |
|||
</xpath> |
|||
<xpath expr="//div[hasclass('o_searchview')]" position="replace"> |
|||
<div |
|||
t-if="props.withSearchBar" |
|||
class="o_searchview" |
|||
t-att-class="state.mobileSearchMode == 'quick' ? 'o_searchview_quick' : 'o_searchview_mobile'" |
|||
role="search" |
|||
aria-autocomplete="list" |
|||
t-on-click.self="state.mobileSearchMode = model.config.env.device.isMobile ? 'quick' : ''" |
|||
> |
|||
<t t-if="!model.config.env.device.isMobile"> |
|||
<i |
|||
class="o_searchview_icon fa fa-search" |
|||
title="Search..." |
|||
role="img" |
|||
aria-label="Search..." |
|||
/> |
|||
<SearchBar fields="fields" /> |
|||
</t> |
|||
<t t-if="model.config.env.device.isMobile and state.mobileSearchMode == 'quick'"> |
|||
<button |
|||
class="btn btn-link fa fa-arrow-left" |
|||
t-on-click.stop="state.mobileSearchMode = ''" |
|||
/> |
|||
<SearchBar fields="fields" /> |
|||
<button |
|||
class="btn fa fa-filter" |
|||
t-on-click.stop="state.mobileSearchMode = 'full'" |
|||
/> |
|||
</t> |
|||
<t t-if="model.config.env.device.isMobile and state.mobileSearchMode == 'full'"> |
|||
<div class="mk_cp_mobile_search"> |
|||
<div class="mk_mobile_search_header"> |
|||
<span |
|||
class="o_mobile_search_close float-left mt16 mb16 mr8 ml16" |
|||
t-on-click.stop="state.mobileSearchMode = 'quick'" |
|||
> |
|||
<i class="fa fa-arrow-left" /> |
|||
<strong class="float-right ml8">FILTER</strong> |
|||
</span> |
|||
<span |
|||
class="float-right o_mobile_search_clear_facets mt16 mr16" |
|||
t-on-click.stop="model.dispatch('clearQuery')" |
|||
> |
|||
<t>CLEAR</t> |
|||
</span> |
|||
</div> |
|||
<SearchBar fields="fields" /> |
|||
<div class="mk_mobile_search_filter o_search_options mb8 mt8 ml16 mr16"> |
|||
<FilterMenu |
|||
t-if="props.searchMenuTypes.includes('filter')" |
|||
class="o_filter_menu" |
|||
fields="fields" |
|||
/> |
|||
<GroupByMenu |
|||
t-if="props.searchMenuTypes.includes('groupBy')" |
|||
class="o_group_by_menu" |
|||
fields="fields" |
|||
/> |
|||
<ComparisonMenu |
|||
t-if="props.searchMenuTypes.includes('comparison') and model.get('filters', f => f.type === 'comparison').length" |
|||
class="o_comparison_menu" |
|||
/> |
|||
<FavoriteMenu |
|||
t-if="props.searchMenuTypes.includes('favorite')" |
|||
class="o_favorite_menu" |
|||
/> |
|||
</div> |
|||
<div |
|||
class="btn btn-primary mk_mobile_search_show_result fixed-bottom" |
|||
t-on-click.stop="state.mobileSearchMode = ''" |
|||
> |
|||
<t>SEE RESULT</t> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
<t t-if="model.config.env.device.isMobile and state.mobileSearchMode == ''"> |
|||
<button |
|||
class="btn btn-link fa fa-search" |
|||
t-on-click.stop="state.mobileSearchMode = 'quick'" |
|||
/> |
|||
</t> |
|||
</div> |
|||
</xpath> |
|||
<xpath expr="//div[hasclass('o_cp_top_left')]" position="attributes"> |
|||
<attribute |
|||
name="t-att-class" |
|||
t-translation="off" |
|||
>model.config.env.device.isMobile and state.mobileSearchMode == 'quick' ? 'o_hidden' : ''</attribute> |
|||
</xpath> |
|||
</t> |
|||
|
|||
<t t-inherit="web.ControlPanel" t-inherit-mode="extension" owl="1"> |
|||
<xpath expr="//nav[hasclass('o_cp_switch_buttons')]" position="replace"> |
|||
<t t-if="uiService.size <= SIZES.LG"> |
|||
<t |
|||
t-set="view" |
|||
t-value="env.config.viewSwitcherEntries.find((v) => v.active)" |
|||
/> |
|||
<Dropdown |
|||
position="'bottom-end'" |
|||
menuClass="'d-inline-flex o_cp_switch_buttons'" |
|||
togglerClass="'btn btn-link'" |
|||
> |
|||
<t t-set-slot="toggler"> |
|||
<i |
|||
class="fa fa-lg o_switch_view" |
|||
t-attf-class="o_{{view.type}} {{view.icon}} active" |
|||
/> |
|||
</t> |
|||
<t |
|||
t-foreach="env.config.viewSwitcherEntries" |
|||
t-as="view" |
|||
t-key="view.type" |
|||
> |
|||
<button |
|||
class="btn btn-light fa o_switch_view" |
|||
t-attf-class="o_{{view.type}} {{view.icon}} {{view.active ? 'active' : ''}}" |
|||
t-att-data-tooltip="view.name" |
|||
t-on-click="onViewClicked(view.type)" |
|||
/> |
|||
</t> |
|||
</Dropdown> |
|||
</t> |
|||
<t t-else=""> |
|||
<nav class="btn-group o_cp_switch_buttons"> |
|||
<t |
|||
t-foreach="env.config.viewSwitcherEntries" |
|||
t-as="view" |
|||
t-key="view.type" |
|||
> |
|||
<button |
|||
class="btn btn-light fa fa-lg o_switch_view " |
|||
t-attf-class="o_{{view.type}} {{view.icon}} {{view.active ? 'active' : ''}}" |
|||
t-att-data-tooltip="view.name" |
|||
t-on-click="onViewClicked(view.type)" |
|||
/> |
|||
</t> |
|||
</nav> |
|||
</t> |
|||
</xpath> |
|||
<xpath expr="//SearchBar" position="replace"> |
|||
<SearchBar |
|||
t-if="state.mobileSearchMode == 'quick'" |
|||
mobileSearchMode="state.mobileSearchMode" |
|||
searchMenus="searchMenus" |
|||
t-on-set-mobile-view.stop="setMobileSearchMode" |
|||
/> |
|||
<SearchBar |
|||
t-else="" |
|||
mobileSearchMode="state.mobileSearchMode" |
|||
searchMenus="searchMenus" |
|||
t-on-set-mobile-view.stop="setMobileSearchMode" |
|||
/> |
|||
</xpath> |
|||
<xpath expr="//div[hasclass('o_cp_top_left')]" position="attributes"> |
|||
<attribute |
|||
name="t-att-class" |
|||
t-translation="off" |
|||
>env.isSmall and state.mobileSearchMode == 'quick' ? 'o_hidden' : ''</attribute> |
|||
</xpath> |
|||
</t> |
|||
<t t-name="muk_web_theme.SearchBar" owl="1"> |
|||
<div> |
|||
<t t-if="!env.isSmall" t-call="web.SearchBar" /> |
|||
<t t-if="env.isSmall and props.mobileSearchMode == 'quick'"> |
|||
<div class="o_searchview o_searchview_quick"> |
|||
<button |
|||
class="btn btn-link fa fa-arrow-left" |
|||
t-on-click.stop="trigger('set-mobile-view', '')" |
|||
/> |
|||
<div class="o_searchview_input_container"> |
|||
<t t-call="web.SearchBar.Facets" /> |
|||
<t t-call="web.SearchBar.Input" /> |
|||
<t t-if="items.length"> |
|||
<t t-call="web.SearchBar.Items" /> |
|||
</t> |
|||
</div> |
|||
<button |
|||
class="btn fa fa-filter" |
|||
t-on-click.stop="trigger('set-mobile-view', 'full')" |
|||
/> |
|||
</div> |
|||
</t> |
|||
<t |
|||
t-if="env.isSmall and props.mobileSearchMode == 'full'" |
|||
t-call="muk_web_theme.MobileSearchView" |
|||
/> |
|||
<t t-if="env.isSmall and props.mobileSearchMode == ''"> |
|||
<div |
|||
class="o_searchview o_searchview_mobile" |
|||
role="search" |
|||
aria-autocomplete="list" |
|||
t-on-click.stop="trigger('set-mobile-view', 'quick')" |
|||
> |
|||
<button class="btn btn-link fa fa-search" /> |
|||
</div> |
|||
</t> |
|||
</div> |
|||
</t> |
|||
<t t-name="muk_web_theme.MobileSearchView" owl="1"> |
|||
<div class="o_searchview"> |
|||
<div class="mk_cp_mobile_search"> |
|||
<div class="mk_mobile_search_header"> |
|||
<span |
|||
class="o_mobile_search_close float-left mt16 mb16 mr8 ml16" |
|||
t-on-click.stop="trigger('set-mobile-view', 'quick')" |
|||
> |
|||
<i class="fa fa-arrow-left" /> |
|||
<strong class="float-right ml8">FILTER</strong> |
|||
</span> |
|||
<span |
|||
class="float-right o_mobile_search_clear_facets mt16 mr16" |
|||
t-on-click.stop="env.searchModel.clearQuery()" |
|||
> |
|||
<t>CLEAR</t> |
|||
</span> |
|||
</div> |
|||
<div class="o_searchview_input_container"> |
|||
<t t-call="web.SearchBar.Facets" /> |
|||
<t t-call="web.SearchBar.Input" /> |
|||
<t t-if="items.length"> |
|||
<t t-call="web.SearchBar.Items" /> |
|||
</t> |
|||
</div> |
|||
<div class="mk_mobile_search_filter o_search_options mb8 mt8 ml16 mr16"> |
|||
<t t-foreach="props.searchMenus" t-as="menu" t-key="menu.key"> |
|||
<t t-component="menu.Component" /> |
|||
</t> |
|||
</div> |
|||
<div |
|||
class="btn btn-primary mk_mobile_search_show_result fixed-bottom" |
|||
t-on-click.stop="trigger('set-mobile-view', '')" |
|||
> |
|||
<t>SEE RESULT</t> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
</templates> |
@ -0,0 +1,8 @@ |
|||
.o_form_view { |
|||
&:not(.o_field_highlight) .o_field_widget:not(.o_field_invalid) .o_input:not(:hover):not(:focus) { |
|||
border-color: $gray-200 !important; |
|||
} |
|||
.o_required_modifier.o_field_widget:not(.o_field_invalid) .o_input:not(:hover):not(:focus) { |
|||
border-color: $gray-600 !important; |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
.o_list_view .o_list_renderer { |
|||
overflow-x: initial; |
|||
thead, thead tr:nth-child(1) th { |
|||
position: sticky; |
|||
border: none; |
|||
z-index: 1; |
|||
top: 0; |
|||
} |
|||
tfoot, tfoot tr:nth-child(1) td { |
|||
color: $white; |
|||
} |
|||
} |
@ -0,0 +1,97 @@ |
|||
/** @odoo-module **/ |
|||
|
|||
import { Component, useState, useExternalListener } from "@odoo/owl"; |
|||
import { computeAppsAndMenuItems } from "@web/webclient/menus/menu_helpers"; |
|||
import { useAutofocus, useService } from '@web/core/utils/hooks'; |
|||
import { useHotkey } from '@web/core/hotkeys/hotkey_hook'; |
|||
import { fuzzyLookup } from '@web/core/utils/search'; |
|||
import { debounce } from '@web/core/utils/timing'; |
|||
|
|||
export class AppsSearch extends Component { |
|||
setup() { |
|||
super.setup(); |
|||
this.searchInput = useAutofocus(); |
|||
this.state = useState({ |
|||
hasResults: false, |
|||
results: [], |
|||
}); |
|||
this.menuService = useService('menu'); |
|||
Object.assign(this, computeAppsAndMenuItems( |
|||
this.menuService.getMenuAsTree('root') |
|||
)); |
|||
this._onInput = debounce(this._onInput, 100); |
|||
} |
|||
_onInput() { |
|||
const query = this.searchInput.el.value; |
|||
if (query !== '') { |
|||
const results = []; |
|||
fuzzyLookup( |
|||
query, this.apps, (menu) => { |
|||
return menu.label |
|||
} |
|||
).forEach((menu) => { |
|||
const result = { |
|||
id: menu.id, |
|||
name: menu.label, |
|||
xmlid: menu.xmlid, |
|||
appID: menu.appID, |
|||
actionID: menu.actionID, |
|||
action: () => this.menuService.selectMenu(menu), |
|||
href: menu.href || `#menu_id=${menu.id}&action_id=${menu.actionID}`, |
|||
}; |
|||
if (menu.webIconData) { |
|||
const prefix = ( |
|||
menu.webIconData.startsWith('P') ? |
|||
'data:image/svg+xml;base64,' : |
|||
'data:image/png;base64,' |
|||
); |
|||
result.webIconData = ( |
|||
menu.webIconData.startsWith('data:image') ? |
|||
menu.webIconData : |
|||
prefix + menu.webIconData.replace(/\s/g, '') |
|||
); |
|||
result.style = `background-image:url("${result.webIconData}");` |
|||
} |
|||
results.push(result); |
|||
}); |
|||
fuzzyLookup( |
|||
query, this.menuItems, (menu) => { |
|||
return `${menu.parents} / ${menu.label}`.split('/').reverse().join('/') |
|||
} |
|||
).forEach((menu) => { |
|||
results.push({ |
|||
id: menu.id, |
|||
name: `${menu.parents} / ${menu.label}`, |
|||
xmlid: menu.xmlid, |
|||
appID: menu.appID, |
|||
actionID: menu.actionID, |
|||
action: () => this.menuService.selectMenu(menu), |
|||
href: menu.href || `#menu_id=${menu.id}&action_id=${menu.actionID}`, |
|||
}); |
|||
}); |
|||
this.state.results = results; |
|||
this.state.hasResults = true; |
|||
} else { |
|||
this.state.results = []; |
|||
this.state.hasResults = false; |
|||
} |
|||
} |
|||
_onKeyDown(ev) { |
|||
if (ev.code === 'Escape') { |
|||
ev.stopPropagation(); |
|||
ev.preventDefault(); |
|||
if (this.searchInput.el.value) { |
|||
this.state.results = []; |
|||
this.state.hasResults = false; |
|||
this.searchInput.el.value = ''; |
|||
} else { |
|||
this.env.bus.trigger('ACTION_MANAGER:UI-UPDATED'); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
Object.assign(AppsSearch, { |
|||
template: 'muk_web_theme.AppsSearch', |
|||
}); |
|||
|
@ -0,0 +1,50 @@ |
|||
.mk_apps_search_container { |
|||
margin: 1rem 2.5rem; |
|||
width: 100%; |
|||
.mk_apps_search_input { |
|||
padding: 0.5rem 1.5rem; |
|||
box-shadow: inset 0 1px 0 rgba($white, 0.1), 0 1px 0 rgba($black, 0.1); |
|||
background-color: rgba($gray-100, 0.1); |
|||
border-radius: 4px; |
|||
.mk_apps_search_icon { |
|||
color: $mk-menu-color; |
|||
margin-right: 1rem; |
|||
font-size: 1.5rem; |
|||
} |
|||
input { |
|||
display: block; |
|||
height: 2.5rem; |
|||
border: none; |
|||
background: none; |
|||
color: $mk-menu-color; |
|||
box-shadow: none; |
|||
padding: 2px; |
|||
} |
|||
input::-webkit-search-cancel-button { |
|||
-webkit-appearance: none; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.mk_apps_search_menus { |
|||
height: calc(100% - #{$o-navbar-height}); |
|||
margin-top: 1rem; |
|||
overflow: auto; |
|||
a { |
|||
color: $mk-menu-color; |
|||
display: block; |
|||
background-position: left; |
|||
background-repeat: no-repeat; |
|||
background-size: contain; |
|||
cursor: pointer; |
|||
line-height: 2.5rem; |
|||
padding-left: 3.5rem; |
|||
&:hover { |
|||
background-color: rgba($black, 0.1); |
|||
} |
|||
} |
|||
} |
|||
|
|||
.mk_apps_search_active ~ .o_app { |
|||
display: none; |
|||
} |
@ -0,0 +1,39 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
|
|||
<templates xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_theme.AppsSearch" owl="1"> |
|||
<div |
|||
class="mk_apps_search_container" |
|||
t-att-class="state.hasResults ? 'mk_apps_search_active' : ''" |
|||
> |
|||
<div class="mk_apps_search_input d-flex align-items-center"> |
|||
<span class="mk_apps_search_icon fa fa-search" /> |
|||
<input |
|||
type="search" |
|||
autocomplete="off" |
|||
class="form-control" |
|||
placeholder="Search menus..." |
|||
data-allow-hotkeys="true" |
|||
t-on-input="_onInput" |
|||
t-on-keydown="_onKeyDown" |
|||
t-ref="autofocus" |
|||
/> |
|||
</div> |
|||
<div t-if="state.hasResults" class="mk_apps_search_menus"> |
|||
<t t-foreach="state.results" t-as="menu" t-key="menu.id"> |
|||
<a |
|||
t-att-style="menu.style ? menu.style : ''" |
|||
t-att-href="menu.href" |
|||
t-att-data-menu-id="menu.id" |
|||
t-att-data-menu-xmlid="menu.xmlid" |
|||
t-att-data-action-id="menu.actionID" |
|||
t-on-click.prevent="() => menu.action()" |
|||
t-out="menu.name" |
|||
/> |
|||
</t> |
|||
</div> |
|||
</div> |
|||
</t> |
|||
|
|||
</templates> |
@ -1,69 +1,46 @@ |
|||
/** @odoo-module */ |
|||
|
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at).
|
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* |
|||
**********************************************************************************/ |
|||
import { patch } from '@web/core/utils/patch'; |
|||
|
|||
import { session } from "@web/session"; |
|||
import { url } from "@web/core/utils/urls"; |
|||
import { patch } from "@web/core/utils/patch"; |
|||
import { registry } from "@web/core/registry"; |
|||
|
|||
import { NavBar } from "@web/webclient/navbar/navbar"; |
|||
import { NavBar } from '@web/webclient/navbar/navbar'; |
|||
import { AppsMenu } from "@muk_web_theme/webclient/appsmenu/appsmenu"; |
|||
import { AppsBar } from "@muk_web_theme/webclient/appsbar/appsbar"; |
|||
import { SwitchCompanyMenu } from "@web/webclient/switch_company_menu/switch_company_menu"; |
|||
import { UserMenu } from "@web/webclient/user_menu/user_menu"; |
|||
|
|||
patch(NavBar.prototype, "muk_web_theme.NavBar", { |
|||
setup() { |
|||
this._super(); |
|||
this.backgroundBlendMode = session.theme_background_blend_mode; |
|||
import { AppsSearch } from "@muk_web_theme/webclient/appssearch/appssearch"; |
|||
import { AppsBar } from '@muk_web_theme/webclient/appsbar/appsbar'; |
|||
|
|||
patch(NavBar.prototype, 'muk_web_theme.NavBar', { |
|||
getAppsMenuItems(apps) { |
|||
return apps.map((menu) => { |
|||
const appsMenuItem = { |
|||
id: menu.id, |
|||
name: menu.name, |
|||
xmlid: menu.xmlid, |
|||
appID: menu.appID, |
|||
actionID: menu.actionID, |
|||
href: this.getMenuItemHref(menu), |
|||
action: () => this.menuService.selectMenu(menu), |
|||
}; |
|||
if (menu.webIconData) { |
|||
const prefix = ( |
|||
menu.webIconData.startsWith('P') ? |
|||
'data:image/svg+xml;base64,' : |
|||
'data:image/png;base64,' |
|||
); |
|||
appsMenuItem.webIconData = ( |
|||
menu.webIconData.startsWith('data:image') ? |
|||
menu.webIconData : |
|||
prefix + menu.webIconData.replace(/\s/g, '') |
|||
); |
|||
} |
|||
return appsMenuItem; |
|||
}); |
|||
}, |
|||
}); |
|||
|
|||
patch(NavBar, "muk_web_theme.NavBar", { |
|||
patch(NavBar, 'muk_web_theme.NavBar', { |
|||
components: { |
|||
...NavBar.components, |
|||
AppsMenu, |
|||
AppsSearch, |
|||
AppsBar, |
|||
}, |
|||
}); |
|||
|
|||
const systrayItemUserMenu = { |
|||
Component: UserMenu, |
|||
}; |
|||
|
|||
const systrayItemSwitchCompanyMenu = { |
|||
Component: SwitchCompanyMenu, |
|||
isDisplayed(env) { |
|||
const { availableCompanies } = env.services.company; |
|||
return Object.keys(availableCompanies).length > 1; |
|||
}, |
|||
}; |
|||
|
|||
registry.category("systray").add("web.user_menu", systrayItemUserMenu, { |
|||
force: true, sequence: 1 |
|||
}); |
|||
registry.category("systray").add("SwitchCompanyMenu", systrayItemSwitchCompanyMenu, { |
|||
force: true, sequence: 2 |
|||
}); |
|||
|
@ -1,66 +1,3 @@ |
|||
/********************************************************************************** |
|||
* |
|||
* Copyright (c) 2017-today MuK IT GmbH. |
|||
* |
|||
* This file is part of MuK Theme |
|||
* (see https://mukit.at). |
|||
* |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU Lesser General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
* |
|||
**********************************************************************************/ |
|||
|
|||
@include media-breakpoint-down(sm) { |
|||
.o_main_navbar { |
|||
grid-template-areas: "apps brand systray sections"; |
|||
grid-template-columns: minmax($o-navbar-height, max-content) max-content auto minmax($o-navbar-height, max-content); |
|||
.o_menu_brand { |
|||
display: none; |
|||
} |
|||
.o_menu_sections { |
|||
width: $o-navbar-height; |
|||
} |
|||
.o_menu_sections_more { |
|||
.dropdown-toggle { |
|||
font-size: $font-size-lg; |
|||
} |
|||
.fa-plus:before { |
|||
content: "\f0c9"; |
|||
} |
|||
} |
|||
.o_debug_manager, .o_user_menu, .o_switch_company_menu { |
|||
> .dropdown-toggle { |
|||
padding: 0 12px !important; |
|||
} |
|||
} |
|||
.o_menu_systray { |
|||
margin-left: auto; |
|||
} |
|||
.o_user_menu { |
|||
margin: 0; |
|||
} |
|||
.o_user_menu > .dropdown-toggle { |
|||
white-space: nowrap; |
|||
&::before, &::after { |
|||
content: normal; |
|||
} |
|||
.oe_topbar_name { |
|||
display: none; |
|||
} |
|||
} |
|||
.show .dropdown-menu { |
|||
@include mk-full-screen-menu(); |
|||
font-size: $font-size-lg; |
|||
} |
|||
} |
|||
.o_menu_systray .badge { |
|||
--o-navbar-badge-bg: #{$o-brand-primary}; |
|||
} |
@ -1,70 +1,60 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
|
|||
<!-- |
|||
|
|||
Copyright (c) 2017-today MuK IT GmbH. |
|||
|
|||
This file is part of MuK Theme |
|||
(see https://mukit.at). |
|||
|
|||
This program is free software: you can redistribute it and/or modify |
|||
it under the terms of the GNU Lesser General Public License as published by |
|||
the Free Software Foundation, either version 3 of the License, or |
|||
(at your option) any later version. |
|||
|
|||
This program is distributed in the hope that it will be useful, |
|||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
GNU Lesser General Public License for more details. |
|||
|
|||
You should have received a copy of the GNU Lesser General Public License |
|||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
|||
|
|||
--> |
|||
|
|||
<templates xml:space="preserve"> |
|||
|
|||
<t t-name="muk_web_theme.NavBar" t-inherit="web.NavBar" t-inherit-mode="extension" owl="1"> |
|||
<t |
|||
t-name="muk_web.theme.NavBar" |
|||
t-inherit="web.NavBar" |
|||
t-inherit-mode="extension" |
|||
owl="1" |
|||
> |
|||
<xpath expr="//nav" position="before"> |
|||
<t t-set="apps" t-value="menuService.getApps()" /> |
|||
<t t-set="apps" t-value="this.getAppsMenuItems(this.menuService.getApps())" /> |
|||
</xpath> |
|||
<xpath expr="//t[@t-call='web.NavBar.AppsMenu']" position="replace"> |
|||
<AppsMenu hotkey="'h'" title="'Home Menu'" class="o_navbar_apps_menu" manualOnly="true"> |
|||
<AppsMenu |
|||
hotkey="'h'" |
|||
title="'Home Menu'" |
|||
class="'o_navbar_apps_menu'" |
|||
manualOnly="true" |
|||
> |
|||
<t t-set-slot="toggler"> |
|||
<i class="fa fa-th" /> |
|||
</t> |
|||
<MenuItem |
|||
<AppsSearch t-if="!env.isSmall"/> |
|||
<DropdownItem |
|||
t-foreach="apps" |
|||
t-as="app" |
|||
t-key="app.id" |
|||
class="o_app" |
|||
t-att-class="{ focus: menuService.getCurrentApp() === app }" |
|||
payload="app" |
|||
dataset="{ menuXmlid: app.xmlid, section: app.id }" |
|||
class="{ 'o_app': true, 'focus': menuService.getCurrentApp().id === app.id }" |
|||
onSelected="() => app.action()" |
|||
parentClosingMode="'none'" |
|||
> |
|||
<a |
|||
t-att-href="app.href" |
|||
t-on-click.prevent="" |
|||
> |
|||
<a t-att-href="getMenuItemHref(app)" t-on-click.prevent=""> |
|||
<img |
|||
t-if="app.webIconData" |
|||
class="mk_app_icon" |
|||
t-attf-src="data:image/png;base64,{{ app.webIconData }}" |
|||
t-att-src="app.webIconData" |
|||
/> |
|||
<img |
|||
t-else="" |
|||
class="mk_app_icon" |
|||
src="/muk_web_theme/static/img/default_icon.png" |
|||
/> |
|||
<span class="mk_app_name" t-attf-style="mix-blend-mode: {{ backgroundBlendMode }};"> |
|||
<t t-esc="app.name"/> |
|||
<span class="mk_app_name"> |
|||
<t t-out="app.name"/> |
|||
</span> |
|||
</a> |
|||
</MenuItem> |
|||
</DropdownItem> |
|||
</AppsMenu> |
|||
</xpath> |
|||
<xpath expr="//nav" position="inside"> |
|||
<AppsBar apps="apps"/> |
|||
</xpath> |
|||
<xpath expr="//t[@t-call='web.NavBar.SectionsMenu']" position="attributes"> |
|||
<attribute name="t-if">currentAppSections.length</attribute> |
|||
</xpath> |
|||
</t> |
|||
|
|||
</templates> |