Update tryton-sao.js
This commit is contained in:
@@ -472,21 +472,12 @@ var Sao = {
|
||||
var title = [name, Sao.config.title];
|
||||
document.title = title.filter(function(e) {return e;}).join(' - ');
|
||||
|
||||
var version = 'v1.0.1';
|
||||
|
||||
// Remplacer le texte par une image avec le bon style
|
||||
jQuery('#title').replaceWith(
|
||||
'<div id="title-container" style="display:flex; align-items:center;">' +
|
||||
'<div style="display:flex; flex-direction:column; line-height:1;">' +
|
||||
'<img id="title-logo" src="dist/tradon.png" alt="Logo" ' +
|
||||
'style="height:24px; display:block;">' +
|
||||
'<span id="title-version" ' +
|
||||
'style="font-size:11px; color:#333; text-align:center;">' +
|
||||
version +
|
||||
'</span>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
'<img id="title-logo" src="dist/tradon.png" alt="Logo" style="height: 24px; display: inline-block; vertical-align: middle; margin-left: 8px;">'
|
||||
);
|
||||
|
||||
// Ajouter un style au conteneur parent si nécessaire
|
||||
jQuery('.navbar-brand').css({
|
||||
'display': 'flex',
|
||||
'align-items': 'center'
|
||||
@@ -11456,11 +11447,9 @@ var Sao = {
|
||||
.on('dragover', false)
|
||||
.on('drop', this.attach_drop.bind(this));
|
||||
|
||||
console.log('title',this.title)
|
||||
console.log('name',this.name)
|
||||
if (this.title === 'Bought') {
|
||||
toolbar.hide();
|
||||
}
|
||||
// if (this.screen.model_name === 'purchase.dashboard') {
|
||||
// toolbar.hide();
|
||||
// }
|
||||
return toolbar;
|
||||
},
|
||||
create_tabcontent: function() {
|
||||
@@ -18284,7 +18273,12 @@ function eval_pyson(value){
|
||||
|
||||
//this.menu.hide();
|
||||
}
|
||||
if (this.title.text() === 'Bought' || this.title.text() === 'Sold'){
|
||||
this.menu.find('.' + this.class_ + '-toolbar').hide();
|
||||
}
|
||||
// if (this.screen.model_name === 'back.to.back' ) {
|
||||
|
||||
// }
|
||||
},
|
||||
get_access: function(type) {
|
||||
var model = this.attributes.relation;
|
||||
@@ -20706,6 +20700,22 @@ function eval_pyson(value){
|
||||
Sao.Action.exec_action(action, { ids: [] }, {});
|
||||
}
|
||||
});
|
||||
// window.addEventListener("message", function (event) {
|
||||
// // ⚠️ Sécurité : vérifier l'origine
|
||||
// // if (event.origin !== "https://ton-react.example.com") return;
|
||||
|
||||
// if (event.data?.type === "open_tab") {
|
||||
// const { model, res_id, view_mode, domain } = event.data.payload || {};
|
||||
|
||||
// Sao.Tab.create({
|
||||
// model: model,
|
||||
// res_id: res_id,
|
||||
// mode: [view_mode],
|
||||
// domain: domain,
|
||||
// target: "new",
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
Sao.renderHTMLViewerContent = function(container, value, height, width, record) {
|
||||
function decodeHtmlEntities(str) {
|
||||
|
||||
Reference in New Issue
Block a user