mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix superbar
This commit is contained in:
@@ -1,24 +1,26 @@
|
|||||||
/** @odoo-module **/
|
/** @odoo-module **/
|
||||||
|
|
||||||
import { Dialog } from "@web/core/dialog/dialog";
|
import {Dialog} from "@web/core/dialog/dialog";
|
||||||
import { patch } from "@web/core/utils/patch";
|
import {patch} from "@web/core/utils/patch";
|
||||||
import { session } from "@web/session";
|
import {session} from "@web/session";
|
||||||
|
|
||||||
patch(Dialog.prototype, "app_odoo_customize.Dialog", {
|
patch(Dialog.prototype, "app_odoo_customize.Dialog", {
|
||||||
setup() {
|
setup() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
const app_system_name = session.app_system_name || "odooApp";
|
const app_system_name = session.app_system_name || "odooApp";
|
||||||
this.title = app_system_name;
|
this.title = app_system_name;
|
||||||
owl.onMounted(() => {
|
|
||||||
this.setDrag();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
setDrag() {
|
mounted() {
|
||||||
var $dl = $('#' + this.id + ' .modal-dialog .modal-content');
|
//todo: 不生效
|
||||||
|
this._super.apply(this, arguments);
|
||||||
|
let self = this;
|
||||||
|
var $dl = $('#' + self.id + ' .modal-dialog .modal-content');
|
||||||
if ($dl)
|
if ($dl)
|
||||||
$dl.draggable({
|
setTimeout(function () {
|
||||||
handle: ".modal-header"
|
$dl.draggable({
|
||||||
});
|
handle: ".modal-header"
|
||||||
|
});
|
||||||
|
}, 800);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user