diff --git a/muk_web_branding/__manifest__.py b/muk_web_branding/__manifest__.py index 0ffebc7..7056aa9 100644 --- a/muk_web_branding/__manifest__.py +++ b/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", diff --git a/muk_web_branding/static/src/js/core/dialog.js b/muk_web_branding/static/src/js/core/dialog.js index 6ee008f..73db810 100644 --- a/muk_web_branding/static/src/js/core/dialog.js +++ b/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; + } }); }); \ No newline at end of file