Browse Source

publish muk_web_branding - 12.0

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

2
muk_web_branding/__manifest__.py

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

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

@ -32,20 +32,27 @@ Dialog.include({
init: function(parent, options) { init: function(parent, options) {
this._super(parent, this._debrandOptions(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);
_debrandOptions : function(options) {
if (options.title && options.title.replace) {
options.title = options.title.replace(/Odoo/ig,
session.muk_branding_system_name);
} else { } else {
options.title = session.muk_branding_system_name; options.title = session.muk_branding_system_name;
} }
if (options.$content){
if (!(options.$content instanceof $)){
if (options.$content) {
if (!(options.$content instanceof $)) {
options.$content = $(options.$content); 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);
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; return options;
} }

Loading…
Cancel
Save