diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2017-09-07 14:22:59 +0200 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2017-09-08 09:44:30 +0200 |
| commit | 825c7c1ed667bcab0298d8276e637c0861edbd1a (patch) | |
| tree | 18aa8a10d38533ce92a5f3a4c6d8b14fc9c48601 /addons/website_forum/static/src | |
| parent | 1d769ad5a71e6f1eb686a184288e2ba0e2e39b1d (diff) | |
[FIX] website_forum: fix display of images in a post
Before this commit, the images were messing up the layout of the post, with text uglily lying on their right
This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner.
Also, we want this commit to have minimal impact
OPW 769721
closes #19322
Diffstat (limited to 'addons/website_forum/static/src')
| -rw-r--r-- | addons/website_forum/static/src/js/website_forum.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index e68701c6df4..c53a38de40a 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -13,6 +13,9 @@ if(!$('.website_forum').length) { return $.Deferred().reject("DOM doesn't contain '.website_forum'"); } + // pull-left class messes up the post layout OPW 769721 + $('span[data-oe-model="forum.post"][data-oe-field="content"]').find('img.pull-left').removeClass('pull-left'); + $("[data-toggle='popover']").popover(); $('.karma_required').on('click', function (ev) { var karma = $(ev.currentTarget).data('karma'); @@ -386,6 +389,9 @@ if(!$('.website_forum').length) { toolbar: toolbar, styleWithSpan: false }); + + // pull-left class messes up the post layout OPW 769721 + $form.find('.note-editable').find('img.pull-left').removeClass('pull-left'); $form.on('click', 'button, .a-submit', function () { $textarea.html($form.find('.note-editable').code()); }); |
