
The external links' target attribute is now also updated to open the
link in a new tab. In addition, the "[source]" link of autodoc's models
is moved right next to the name of the model to correctly position the
icon.
task-2790244
closes odoo/documentation#2209
X-original-commit: 343decf192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
18 lines
569 B
JavaScript
18 lines
569 B
JavaScript
(function ($) {
|
|
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
const content = document.getElementById('o_content');
|
|
|
|
// 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');
|
|
})
|
|
});
|
|
|
|
})();
|