diff --git a/extensions/odoo_theme/static/fonts/icomoon.eot b/extensions/odoo_theme/static/fonts/icomoon.eot index 32457fddd..9284254a0 100644 Binary files a/extensions/odoo_theme/static/fonts/icomoon.eot and b/extensions/odoo_theme/static/fonts/icomoon.eot differ diff --git a/extensions/odoo_theme/static/fonts/icomoon.svg b/extensions/odoo_theme/static/fonts/icomoon.svg index 7ed24d297..b585f596b 100644 --- a/extensions/odoo_theme/static/fonts/icomoon.svg +++ b/extensions/odoo_theme/static/fonts/icomoon.svg @@ -71,6 +71,7 @@ + diff --git a/extensions/odoo_theme/static/fonts/icomoon.ttf b/extensions/odoo_theme/static/fonts/icomoon.ttf index f320a88d7..08e062142 100644 Binary files a/extensions/odoo_theme/static/fonts/icomoon.ttf and b/extensions/odoo_theme/static/fonts/icomoon.ttf differ diff --git a/extensions/odoo_theme/static/fonts/icomoon.woff b/extensions/odoo_theme/static/fonts/icomoon.woff index 966f90e22..46ec62c62 100644 Binary files a/extensions/odoo_theme/static/fonts/icomoon.woff and b/extensions/odoo_theme/static/fonts/icomoon.woff differ diff --git a/extensions/odoo_theme/static/fonts/icomoon.woff2 b/extensions/odoo_theme/static/fonts/icomoon.woff2 index df18fb8e3..45054bdb5 100644 Binary files a/extensions/odoo_theme/static/fonts/icomoon.woff2 and b/extensions/odoo_theme/static/fonts/icomoon.woff2 differ diff --git a/extensions/odoo_theme/static/js/layout.js b/extensions/odoo_theme/static/js/layout.js index e753f2392..8f995a515 100644 --- a/extensions/odoo_theme/static/js/layout.js +++ b/extensions/odoo_theme/static/js/layout.js @@ -3,10 +3,15 @@ document.addEventListener('DOMContentLoaded', function () { const content = document.getElementById('o_content'); - // Enforce the presence of the `img-fluid` class on all images in the body + // Enforce the presence of the `img-fluid` class on all images in the body. content.querySelectorAll('img').forEach(image => { image.classList.add('img-fluid'); }); + + // Make all external links open in a new tab by default. + content.querySelectorAll('a.external').forEach(externalLink => { + externalLink.setAttribute('target', '_blank'); + }) }); })(); diff --git a/extensions/odoo_theme/static/scss/_iconfont.scss b/extensions/odoo_theme/static/scss/_iconfont.scss index 302b3d09f..16eedfcf1 100644 --- a/extensions/odoo_theme/static/scss/_iconfont.scss +++ b/extensions/odoo_theme/static/scss/_iconfont.scss @@ -57,6 +57,11 @@ content: $i-link; } } +.i-external-link { + &:before { + content: $i-external-link; + } +} .i-websites { &:before { content: $i-websites; @@ -416,4 +421,4 @@ &:before { content: $i-article; } -} \ No newline at end of file +} diff --git a/extensions/odoo_theme/static/scss/_variables.scss b/extensions/odoo_theme/static/scss/_variables.scss index abf2769b0..1d9c004e5 100644 --- a/extensions/odoo_theme/static/scss/_variables.scss +++ b/extensions/odoo_theme/static/scss/_variables.scss @@ -84,6 +84,7 @@ $i-chevron-down: "\e949"; $i-chevron-left: "\e94a"; $i-chevron-right: "\e94b"; $i-link: "\e94f"; +$i-external-link: "\e940"; $i-websites: "\e944"; $i-sales: "\e953"; $i-sales_2: "\e931"; diff --git a/extensions/odoo_theme/static/style.scss b/extensions/odoo_theme/static/style.scss index 9ccf7d01a..0e1509172 100644 --- a/extensions/odoo_theme/static/style.scss +++ b/extensions/odoo_theme/static/style.scss @@ -15,6 +15,13 @@ body { text-decoration: none !important; } + a.external:after { + content: '#{$i-external-link}'; + font-family: icomoon, sans-serif !important; + @include font-size($font-size-base/1.3); + margin: 0 .2rem; + } + dd { margin-left: 1rem; } @@ -36,6 +43,10 @@ body { display: none !important; opacity: 0 !important; } + +span.viewcode-link { + float: none; +} //------------------------------------------------------------------------------ // Header with logo, searchbar and switchers //------------------------------------------------------------------------------