Initial commit

This commit is contained in:
gsinghpal
2026-02-22 01:22:18 -05:00
commit 5200d5baf0
2394 changed files with 386834 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { session } from '@web/session';
import { patch } from '@web/core/utils/patch';
import { Dialog } from '@web/core/dialog/dialog';
patch(Dialog.prototype, {
setup() {
super.setup();
this.data.size = (
session.dialog_size !== 'maximize' ? this.props.size : 'fs'
);
this.data.initalSize = this.props?.size || 'lg';
},
onClickDialogSizeToggle() {
this.data.size = this.data.size === 'fs' ? this.data.initalSize : 'fs';
}
});

View File

@@ -0,0 +1,7 @@
.mk_btn_dialog_size {
color: $btn-close-color;
opacity: $btn-close-opacity;
&:hover {
opacity: $btn-close-hover-opacity;
}
}

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t
t-name="muk_web_dialog.Dialog"
t-inherit="web.Dialog"
t-inherit-mode="extension"
>
<xpath expr="//div[@t-attf-class='modal-{{props.size}}']" position="attributes">
<attribute name="t-attf-class">modal-{{ this.data?.size || 'lg' }}</attribute>
</xpath>
</t>
<t
t-name="muk_web_dialog.Dialog.header"
t-inherit="web.Dialog.header"
t-inherit-mode="extension"
>
<xpath expr="//h4[hasclass('modal-title')]" position="attributes">
<attribute name="class" add="flex-shrink-0 w-75" separator=" " />
</xpath>
<xpath expr="//button[@t-on-click='onExpand']" position="attributes">
<attribute name="class">fa fa-lg fa-external-link btn o_expand_button</attribute>
<attribute name="style">margin-top: 2px !important;</attribute>
</xpath>
<xpath expr="//t[@t-if='!fullscreen']" position="before">
<button
t-if="!fullscreen"
type="button"
class="btn float-end me-1 mk_btn_dialog_size"
t-on-click="() => this.onClickDialogSizeToggle()"
>
<i t-attf-class="fa fa-lg {{ this.data?.size === 'fs' ? 'fa-compress' : 'fa-expand' }}" />
</button>
</xpath>
</t>
</templates>

View File

@@ -0,0 +1,2 @@
$o-form-renderer-max-width: 3840px;
$o-form-view-sheet-max-width: 2560px;

View File

@@ -0,0 +1,11 @@
import { patch } from '@web/core/utils/patch';
import { SelectCreateDialog } from '@web/views/view_dialogs/select_create_dialog';
patch(SelectCreateDialog.prototype, {
onClickDialogSizeToggle() {
this.env.dialogData.size = (
this.env.dialogData.size === 'fs' ? this.env.dialogData.initalSize : 'fs'
);
}
});