Browse Source

publish muk_web_branding - 12.0

pull/115/head
MuK IT GmbH 5 years ago
parent
commit
cc218f40f3
  1. 2
      muk_web_branding/__manifest__.py
  2. 41
      muk_web_branding/static/src/js/core/dialog.js

2
muk_web_branding/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Web Branding",
"summary": """Branding and Debranding""",
"version": "12.0.1.1.3",
"version": "12.0.1.1.4",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",

41
muk_web_branding/static/src/js/core/dialog.js

@ -32,23 +32,30 @@ Dialog.include({
init: function(parent, options) {
this._super(parent, this._debrandOptions(options || {}));
},
_debrandOptions: function(options) {
if (options.title && options.title.replace){
options.title = options.title.replace(/Odoo/ig, session.muk_branding_system_name);
} else {
options.title = session.muk_branding_system_name;
}
if (options.$content){
if (!(options.$content instanceof $)){
options.$content = $(options.$content);
}
var content_html = options.$content.html();
content_html = content_html.replace(/Odoo.com/ig, session.muk_branding_website);
content_html = content_html.replace(/Odoo/ig, session.muk_branding_system_name);
options.$content.html(content_html);
}
return options;
}
_debrandOptions : function(options) {
if (options.title && options.title.replace) {
options.title = options.title.replace(/Odoo/ig,
session.muk_branding_system_name);
} else {
options.title = session.muk_branding_system_name;
}
if (options.$content) {
if (!(options.$content instanceof $)) {
options.$content = $(options.$content);
}
options.$content.each(function() {
var content = $(this).html();
if (content) {
content.replace(/Odoo.com/ig,
session.muk_branding_website);
content.replace(/Odoo/ig,
session.muk_branding_system_name);
$(this).html(content);
}
});
}
return options;
}
});
});
Loading…
Cancel
Save