<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/web_editor/static/src/js, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[FIX] website, web_editor: fix colorpicker preview</title>
<updated>2021-05-27T13:28:46+00:00</updated>
<author>
<name>xO-Tx</name>
<email>mou@odoo.com</email>
</author>
<published>2021-05-21T16:09:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=fd31c9a10f97c92a48d0589a8bbeaf13a641e891'/>
<id>fd31c9a10f97c92a48d0589a8bbeaf13a641e891</id>
<content type='text'>
Issue:

&gt; Set bg color combination for a snippet... &gt; Save
&gt; Edit mode &gt; Select the snippet
&gt; Open color palette in bg option
&gt; Hover a color option
&gt; When a color button is left, the preview is cancelled
  but the color combination class is not applied anymore.

In '_computeWidgetState' (for 'selectStyle' method), the right
value ('o_cci') is not returned because we get empty "colorNames"
(the "colorPalette" is not rendered on start).

The goal of this commit is to fix this behaviour by rendering the
colorPalette in start for snippet options, this way, the new code
won't affect the speed fix added in [1] for 'OPTIONS' tab.

[1]: https://github.com/odoo/odoo/pull/65223/commits/ce54c3f21293513673cb1fc6073ada5f0a2b5641

task-2538326

closes odoo/odoo#71174

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue:

&gt; Set bg color combination for a snippet... &gt; Save
&gt; Edit mode &gt; Select the snippet
&gt; Open color palette in bg option
&gt; Hover a color option
&gt; When a color button is left, the preview is cancelled
  but the color combination class is not applied anymore.

In '_computeWidgetState' (for 'selectStyle' method), the right
value ('o_cci') is not returned because we get empty "colorNames"
(the "colorPalette" is not rendered on start).

The goal of this commit is to fix this behaviour by rendering the
colorPalette in start for snippet options, this way, the new code
won't affect the speed fix added in [1] for 'OPTIONS' tab.

[1]: https://github.com/odoo/odoo/pull/65223/commits/ce54c3f21293513673cb1fc6073ada5f0a2b5641

task-2538326

closes odoo/odoo#71174

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: add check before updateLeftPanel timeout</title>
<updated>2021-04-28T09:29:14+00:00</updated>
<author>
<name>Arthur Detroux (ard)</name>
<email>ard@odoo.com</email>
</author>
<published>2021-04-12T12:01:15+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=89e419036e33ebdb2628895f88019da41c87da79'/>
<id>89e419036e33ebdb2628895f88019da41c87da79</id>
<content type='text'>
Added a check to make sure that we do not set a timeout to update the
option panel when said option panel is already open.
This could sometimes occur which could cause all openned select to close
and could fail some tests if said events happened in the middle of
selecting an option.

task-2502297

closes odoo/odoo#69119

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added a check to make sure that we do not set a timeout to update the
option panel when said option panel is already open.
This could sometimes occur which could cause all openned select to close
and could fail some tests if said events happened in the middle of
selecting an option.

task-2502297

closes odoo/odoo#69119

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: email receiver see file icon</title>
<updated>2021-04-28T08:00:38+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2021-04-27T11:46:05+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=eb3772508ce518ff3f84724eebbe43fd1e040d77'/>
<id>eb3772508ce518ff3f84724eebbe43fd1e040d77</id>
<content type='text'>
Scenario:

- add a file in mass mailing editor =&gt; an generic icon (instead of lower
  version where icon depended on mimetype) is added linking the file

- save and send mail =&gt; no icon is shown in email received

The system is targeting `a[href*="/web/content/"][data-mimetype]:empty`
to add real image inside instead of using background-image attribute
which is stripped in sanitized.

With this commit, data-mimetype is not removed when image processing
attributes are removed when a file is inserted.

opw-2474053

closes odoo/odoo#69915

Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Scenario:

- add a file in mass mailing editor =&gt; an generic icon (instead of lower
  version where icon depended on mimetype) is added linking the file

- save and send mail =&gt; no icon is shown in email received

The system is targeting `a[href*="/web/content/"][data-mimetype]:empty`
to add real image inside instead of using background-image attribute
which is stripped in sanitized.

With this commit, data-mimetype is not removed when image processing
attributes are removed when a file is inserted.

opw-2474053

closes odoo/odoo#69915

Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: have transcoder apply text-decoration</title>
<updated>2021-04-09T16:56:55+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2021-04-09T14:56:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ba50228f0e19dae6da1e252380a948f46887890c'/>
<id>ba50228f0e19dae6da1e252380a948f46887890c</id>
<content type='text'>
The transcoder (transforming CSS rules into inline CSS for mail clients)
was not working for text-decoration property because it would transform
text-decoration values in:

{'text-decoration-thickness': 'normal', 'text-decoration': none}

And the regex that ensures we don't add duplicates check if there is:

"(^|;)\s*text-decoration"

so if there is text-decoration-thickness, text-decoration is not added.

The regexp could be changed to:

"(^|;)\s*text-decoration[^\w-]"

but we already have special case for other text-decoration-* properties.

With this change we should get text-decoration applied in:

- edit mode (was already the case)
- readonly mode (new)
- mail client (only if mail client does not override it)

As a side note: text-decoration-thickness seems to be rather new[^1] so
at one point in time there was probably no issue.

[^1]: https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness

opw-2496490

closes odoo/odoo#69074

X-original-commit: f4f1b890e15e98d9a7e72586faf73327d3f7b716
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Co-authored-by: Kamen Zhekov &lt;kzh@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The transcoder (transforming CSS rules into inline CSS for mail clients)
was not working for text-decoration property because it would transform
text-decoration values in:

{'text-decoration-thickness': 'normal', 'text-decoration': none}

And the regex that ensures we don't add duplicates check if there is:

"(^|;)\s*text-decoration"

so if there is text-decoration-thickness, text-decoration is not added.

The regexp could be changed to:

"(^|;)\s*text-decoration[^\w-]"

but we already have special case for other text-decoration-* properties.

With this change we should get text-decoration applied in:

- edit mode (was already the case)
- readonly mode (new)
- mail client (only if mail client does not override it)

As a side note: text-decoration-thickness seems to be rather new[^1] so
at one point in time there was probably no issue.

[^1]: https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness

opw-2496490

closes odoo/odoo#69074

X-original-commit: f4f1b890e15e98d9a7e72586faf73327d3f7b716
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
Co-authored-by: Kamen Zhekov &lt;kzh@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] website_sale, *: make the product image container not editable</title>
<updated>2021-04-06T09:53:07+00:00</updated>
<author>
<name>Younn Olivier</name>
<email>yol@odoo.com</email>
</author>
<published>2021-03-29T15:08:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d6c1d1572eafc2586974f2c5b98abe2b341b38a7'/>
<id>d6c1d1572eafc2586974f2c5b98abe2b341b38a7</id>
<content type='text'>
*: web_editor

It prevents user writing in the image preview of products.
Also, the product image view now fit its container so that the user can
click wherever in the frame to change the picture.

Part of https://github.com/odoo/odoo/pull/65575
task-2446852

closes odoo/odoo#65575

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*: web_editor

It prevents user writing in the image preview of products.
Also, the product image view now fit its container so that the user can
click wherever in the frame to change the picture.

Part of https://github.com/odoo/odoo/pull/65575
task-2446852

closes odoo/odoo#65575

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: use escape for image rendering</title>
<updated>2021-04-01T10:07:40+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2021-03-30T14:08:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ea4dbcd2404663d8542d3f071ceae97ee6dc61ad'/>
<id>ea4dbcd2404663d8542d3f071ceae97ee6dc61ad</id>
<content type='text'>
To properly escape all tags and not just the first one
And move the escape before the loop to apply for everybody
This avoid weird preview with selected content rendered (had effect
only on preview)

closes odoo/odoo#68633

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To properly escape all tags and not just the first one
And move the escape before the loop to apply for everybody
This avoid weird preview with selected content rendered (had effect
only on preview)

closes odoo/odoo#68633

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: show XML editor error if rejection value</title>
<updated>2021-03-30T15:27:26+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2021-03-30T14:23:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=43184af875f3eb52586348b383627cb0140484f5'/>
<id>43184af875f3eb52586348b383627cb0140484f5</id>
<content type='text'>
Override in enterprise web_studio of _saveView on error never rejected
promises. But now it does so the XML editor interface is not blocked
after error.

But we were already showing the correct error in web_studio use case, so
we don't want another one and this change allow that by only showing an
error if we received rejection value.

opw-2460081

closes odoo/odoo#68554

Related: odoo/enterprise#17381
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Override in enterprise web_studio of _saveView on error never rejected
promises. But now it does so the XML editor interface is not blocked
after error.

But we were already showing the correct error in web_studio use case, so
we don't want another one and this change allow that by only showing an
error if we received rejection value.

opw-2460081

closes odoo/odoo#68554

Related: odoo/enterprise#17381
Signed-off-by: Nicolas Lempereur (nle) &lt;nle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: don't run code when input is emptied</title>
<updated>2021-03-25T11:40:22+00:00</updated>
<author>
<name>Romain Derie</name>
<email>rde@odoo.com</email>
</author>
<published>2021-02-03T17:29:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=27ac99ef87912c7ed926396d36aa159a4428b114'/>
<id>27ac99ef87912c7ed926396d36aa159a4428b114</id>
<content type='text'>
Before this commit:
  - Edit mode, open image dialog
  - Upload an image to the media dialog
  - Reclick on Upload but don't select an image, close the browser image
    selector
  - This will trigger the input change event, as the input was emptied

This is needed since in later commit, `_addData()` will do some code outside
of the `files` loop, which is useless if there is no files selected.
In thise case, the issue would be that it would open an empty toastr.

task-2345082
Coming from #65828
Closes #68326

closes odoo/odoo#68334

X-original-commit: 94c45412714c1263788b2567ce3c9581453b2cd4
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit:
  - Edit mode, open image dialog
  - Upload an image to the media dialog
  - Reclick on Upload but don't select an image, close the browser image
    selector
  - This will trigger the input change event, as the input was emptied

This is needed since in later commit, `_addData()` will do some code outside
of the `files` loop, which is useless if there is no files selected.
In thise case, the issue would be that it would open an empty toastr.

task-2345082
Coming from #65828
Closes #68326

closes odoo/odoo#68334

X-original-commit: 94c45412714c1263788b2567ce3c9581453b2cd4
Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web_editor: fix race condition in option selection</title>
<updated>2021-03-25T10:16:32+00:00</updated>
<author>
<name>Samuel Degueldre</name>
<email>sad@odoo.com</email>
</author>
<published>2021-03-23T12:56:42+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7623a0c771495cd41bf40af37c0d2b6e4beb7cdc'/>
<id>7623a0c771495cd41bf40af37c0d2b6e4beb7cdc</id>
<content type='text'>
Previously, when selecting certain options, especially ones which had
slow updateUI methods, the selected value was sometimes reset to its
previous value. This was caused by a race condition in which, when a
snippet option updated its value, it would wait for options on the
parent snippet editors to update all of their options' UI, but it
incorrectly only waited for *one* of the snippet editors to finish
instead of waiting for all of them.

This commit fixes that by stopping the event propagation and triggering
a new event that will let the direct parent know when all parent editors
are done updating their options' UI before signalling that the UI update
is done.

task-2487578

closes odoo/odoo#68238

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Co-authored-by: Arthur Detroux &lt;ard@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, when selecting certain options, especially ones which had
slow updateUI methods, the selected value was sometimes reset to its
previous value. This was caused by a race condition in which, when a
snippet option updated its value, it would wait for options on the
parent snippet editors to update all of their options' UI, but it
incorrectly only waited for *one* of the snippet editors to finish
instead of waiting for all of them.

This commit fixes that by stopping the event propagation and triggering
a new event that will let the direct parent know when all parent editors
are done updating their options' UI before signalling that the UI update
is done.

task-2487578

closes odoo/odoo#68238

Signed-off-by: Quentin Smetz (qsm) &lt;qsm@odoo.com&gt;
Co-authored-by: Arthur Detroux &lt;ard@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] web, web_editor, website: fix incorrectly translated template literals</title>
<updated>2021-03-18T13:46:31+00:00</updated>
<author>
<name>Samuel Degueldre</name>
<email>sad@odoo.com</email>
</author>
<published>2021-03-18T12:37:08+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e1d280880c26d6139dc6a3679fb7df7e07defdd6'/>
<id>e1d280880c26d6139dc6a3679fb7df7e07defdd6</id>
<content type='text'>
closes odoo/odoo#68085

Signed-off-by: Christophe Monniez (moc) &lt;moc@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#68085

Signed-off-by: Christophe Monniez (moc) &lt;moc@odoo.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
