Commit Graph
3018 Commits
Author SHA1 Message Date
Nicolas BayetandAntony Lesuisse f98db923e2 [FIX] web_editor: fix module auto install with web
The web_editor dependency with mail was problematic:
- web_editor would not auto_intall without the mail being installed
- A circular dependency problem with discuss

In order to avoid creating a new module shared by mail
and web editor, the use of a hack has been decided.
By checking if `notification_type` is in the session, we ensure
that the module mail is installed.

Task-2698655

closes odoo/odoo#80640

X-original-commit: 4e611d7527f85fc074115bd018adb7d6e5ea2c53
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Antony Lesuisse <al@odoo.com>
2021-12-01 08:01:00 +00:00
Nicolas Bayet 9b3c4e3504 [FIX] web_editor: avoid editor history on image cropper
In some circumstance, the image cropper is being reverted by the
Odoo editor unbreakable mechanics. The reason was that the cropper tool
was appended inside the editable rather than outside the editable.

Task-2693553

closes odoo/odoo#80613

X-original-commit: c09600fe35089cdaed34ec12d8bcb992d24e043f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-30 15:22:19 +00:00
Nicolas Bayet cd05b33700 [FIX] web_editor: create step when setting value
Before this commit, setting a value from the editor did not created
steps but kept the mutations inside _currentStep.
Commands like delete or enter revert the _currentStep.
So each time enter or delete was pressed just after setValue, the
content being set was lost.

Task-2695041

closes odoo/odoo#80597

X-original-commit: 9e9fe73e8124d5d5527f5c5ce205f01f791aac30
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-30 12:52:34 +00:00
Antoine Guenet 5d184c5fd8 [FIX] web_editor: apply changes on exit code view
When leaving the code view, we need to apply its html to the editable.
This failed in mass_mailing because the editor rolled back the changes
due to the top element being unremovable. To avoid that, we set the
`skipRollback` argument of `historyStep` to `true` and thereby trust the
user's changes.

task-2701024

closes odoo/odoo#80522

X-original-commit: 17f0ca0d6b7a583192caa33bb9d3e35c72256d4e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-29 13:09:51 +00:00
qsm-odoo b7e128a34c [FIX] web_editor: improve error message in HTML/SCSS editor
Before this commit, when the user made an error in the HTML/SCSS editor
(most of the time due to user pasting HTML code while our code excepts
*XML*), the user was stuck most of the time because the error indicator
did not always appear. And even if it did, it disappeared on scroll and
the user had to guess where to click to show the error message.

Now, the UI for the error is way clearer, with the error message opening
itself directly and pointing at the line where the error occurs. The
UI of that error message is now more robust (even though suffering
because of the ace editor which likes to re-render itself at unknown
times). The error message is also still not super clear (default error
message given by the browser) although some parsing is now done on it to
try and display it better.

task-2698641

closes odoo/odoo#80499

X-original-commit: 0d2dbb663653659c8afbf3a515444a6db633fbf9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-29 10:33:54 +00:00
qsm-odoo 2075ddf065 [FIX] web_editor: prevent crash when going to unlisted editor file
When switching to files that can only appear in debug mode in the HTML /
SCSS editor and editing them, the page reloads... and crash for no
reason. This was because the filter that allows those files to appear
is lost after reloading, now we simply ignore the file switch if not
present in the default filter.

task-2698641

X-original-commit: ef8b153a6ed80ff6e551b6eee9bc0f53a012e360
Part-of: odoo/odoo#80499
2021-11-29 10:33:53 +00:00
Arthur Detroux (ard) b501e8accf [FIX] web_editor: make snippet list always full height
Before this commit, when a tour tooltip was located in the snippet
list, it could cause an overflow that would partly hide the tip and
would bug out when being hovered.

With this commit, the list is made full height, simplifying the look
and giving enough space for the tip to not overflow.

task-2670809

X-original-commit: d8c25d400af61bdfb4afd9d7921c3e93745f2407
Part-of: odoo/odoo#80466
2021-11-26 16:42:18 +00:00
Arthur Detroux (ard) c17ea66ee3 [FIX] web_editor: fix gradient slider infinite resize and safari support
Prior to this commit, if three colors were selected for a gradient and
the user would click on the third color, if that color had a value of
100%, in some conditions the picker would resize infinitely.
Also prior to this commit, the color picker slider was not supported
well under safari.

This commit fixes the SCSS rules in order to fix those behaviours.

task-2670809

X-original-commit: 5a91d8b00c35cb597b0ee5f5ec8605e4589f81c9
Part-of: odoo/odoo#80466
2021-11-26 16:42:18 +00:00
xO-Tx 89ce9f9ab5 [FIX] web_editor, mass_mailing: fix editor history for image shapes
Issue:

1- Website editor > Set shape on image
2- Crop > shape is reapplied on the croped image
3- Change another option (e.g. image width)
4- Undo > image will be shown cropped but without any
shape applied on it.

In the current code we apply shapes on cropped images using
the event listener 'ImageOptimize > _onImageCropped', so in
'ImageTools', the 'crop()' option method will record the
"crop" action but the step where the shape is added is lost.
(See: SnippetOptionWidget > _onUserValueUpdate()).

The goal of this commit is to merge the 'ImageTools' and
'ImageOptimize' in one option so we can simply use shape
related methods to apply shapes when the crop() & resetCrop()
methods are called.
This way, the step to record will be a "cropped image with
a shape on it" instead of just a "cropped image".

task-2628964

closes odoo/odoo#80208

X-original-commit: 7c17d78fbdbb64b1aa5b55f78d3202a64a85ed2f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-26 15:10:34 +00:00
Nicolas Bayet c911fa6395 [FIX] web_editor: remove console.log
closes odoo/odoo#80428

X-original-commit: bc6114b8efc6db10e4d26dc20aaa5481b31c3275
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-26 11:18:06 +00:00
Nicolas Bayet 10385a2aac [FIX] web_editor: keep table styling
Before this commit, the styles of the table were not kept when
copy/pasting a table generated by the Odoo editor. Now it is.

Task-2657445

closes odoo/odoo#80246

X-original-commit: 6f4eff378fc24bdd5e8a84ee485832162108a400
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-24 09:32:00 +00:00
Nicolas Bayet 74ffa03861 [FIX] web_editor: prevent link dialog to close upon error
Before this commit, if the link dialog had unvalid form data, and the
user clicked on the "save" button, the link dialog tried to close
and save with no data.

Now, it is not possible to close the dialog if the form data is invalid.

Task-2583696

closes odoo/odoo#80245

X-original-commit: c7f574c1044d5710c156f747c9b8647d6aeb3ff7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-24 09:31:56 +00:00
Nicolas Bayet 57127f1721 [FIX] web_editor: prevent editor observing technical modification
Whenever the qweb plugin modified the dom for rendering purposes,
the mutations were observed but shouldn't. The reason was that the
reference to the editor was missing in the plugin and therfore it did
not call `observerUnactive` and `observerActive`.

Task-2695658

closes odoo/odoo#80182

X-original-commit: e973526ffe6deba778a613eb4053ba3017f9fb00
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-22 14:48:11 +00:00
2dd772dab8 [IMP] website, *: improve video providers handling
*: web_editor, website_sale

This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.

All the regexes are kept in a python tools file and are called in JS
using an RPC.

task-2154812

closes odoo/odoo#44537

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
2021-11-19 22:32:39 +00:00
Sébastien Geelen (sge) 953b612658 [FIX] web_editor: fix monetary fields Edition in FF
Changing value in monetary fields was not working properly in FF :

The ZeroWidthSpace inserted by the deleteRange function cannot be selected;
trying to do so loses the selection for some reason.

task-2679088

closes odoo/odoo#80071

X-original-commit: 1b36b4e8a6b319de10b6c1144c37533dab0e2f36
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-19 10:42:07 +00:00
Sébastien Geelen (sge) 469a2ebc38 [FIX] web_editor: ZWS in monetary fields
Value changed in monetary fields were not saved correctly.
Zero Width Spaces in the monetary field new value caused
the model to reject the value as the format (numerical) was not compliant.

task-2679088

X-original-commit: a776e55c6fb03861eed9668fad259c0a92b9aff8
Part-of: odoo/odoo#80071
2021-11-19 10:42:07 +00:00
Sébastien Geelen (sge) 3275d19415 [FIX] web_editor,website_sale: monetary field UX fix
The forced selection of the entire text value was preventing the user
from changing the selection after the initial click inside the monetary field.

task-2679088

X-original-commit: d33d55aad46c9223192d15c01b7516340be77cce
Part-of: odoo/odoo#80071
2021-11-19 10:42:06 +00:00
Sébastien Geelen (sge) 54d2099c43 [FIX] web_editor: fix linting errors
X-original-commit: 00cc4681ebc787227e9740da1cb61060ec46158c
Part-of: odoo/odoo#80071
2021-11-19 10:42:06 +00:00
Benoit Socias d2f30d1109 [FIX] web_editor: avoid error popup when saving incomplete link dialog
Before this commit saving an incomplete link dialog triggered the
display of a stacktrace error popup.

After this commit saving is cancelled when an attempt at saving an
incomplete link dialog is done. The incorrect fields already did display
their error status.

task-2675252

closes odoo/odoo#80043

X-original-commit: 47f0596233c2d8a09d91cdfae117aa3f595bb6bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-18 18:45:35 +00:00
Nicolas Bayet 812115716e [FIX] web_editor: close link popover of removed links
Before this commit, the link could be removed from the DOM
before hiding the query popover. After being removed, the
reference of the popover from the jquery element was lost.

We now keep the reference to the popover to always be able
to hide it.

Task-2684819

closes odoo/odoo#79943

X-original-commit: 72c46aef751ebc0de3873c644e3b159ffa349d1e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:45:03 +00:00
Nicolas Bayet c9f1e56d87 [FIX] web_editor: prevent traceback when droping undroppable snippet
When trying to drop a snippet that could not be possibly dropped,
a traceback is shown but shouldn't.

Task-2692492

closes odoo/odoo#79924

X-original-commit: 4408dbaf74aa26272b6ed3ce718a2d915975d4b3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:55 +00:00
Nicolas Bayet eb523fda3b [FIX] web_editor: use text url by default in link dialog
On an html field whenever selecting only text that contain an url
and opening the link dialog, the url was not reused.

Task-2580485

closes odoo/odoo#79923

X-original-commit: 8049c7cf937aec02fe0097ee4f233e2e76fb8ae3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:51 +00:00
Nicolas Bayet 553906853b [FIX] web_editor: remove button tooltip of link tooltip
Whenever the link tooltip hide, the tooltip of the buttons
could remain in the page but shouldn't.

Task-2692301

closes odoo/odoo#79922

X-original-commit: 5a5fce48852a6ac2a60db205e99d49e2095d1730
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-18 18:44:46 +00:00
Younn OlivierandMatthieu Stockbauer aba31e9f2d [IMP] web_editor, website: add connector options to steps snippet
A new option StepsConnector is added to the steps snippets, allowing to
pick the type of the steps connector and its color.

The option listens to changes in the UI or in the columns size to
recompute the width and position of the arrows.
The width of the connector is computed based on the widths of the
current step and the next step, which are defined in bootstrap columns.

The s_process_steps snippet CSS version is now 001.

task-2463009

closes odoo/odoo#77282

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Matthieu Stockbauer <tsm@odoo.com>
2021-11-18 16:00:40 +00:00
Younn Olivierandqsm-odoo b71b784c98 [FIX] web_editor: fix logo poor quality
This commit fixes and improves the suggested width that we compute for
images optimizations.
Before, images displayed outside .container elements were resized to
their container size. As a result logos were resized to 2.5rem (40px).

Now, it handles these scenarios :
- The image is in the navbar, it is a logo
- The image is in a container/container-small
- The image is in a container-fluid
- The image is outside a container

Values are read from the css instead of being hardcoded.

Note: another issue remains with our resizing method. Drawing on a
canvas is not performant enough when there are large differences between
the width and the resize width. A solution could be to use
createImageBitmap for the resize, but it is not supported by enough
browsers.
In the meantime, imageSmoothing was enabled on the context.

Note 2: this also fixes rounding issues when computing the optimized
width which may break the UI update as comparing the integer and
floating value returned false.

task-2506205

closes odoo/odoo#79983

X-original-commit: 8355c10676e1dbb668702337863218bdda7c23dc
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-11-18 10:06:25 +00:00
Tom De Caluwé 4fd5fd4a97 [FIX] web_editor, website: fix removal of last item inside active slides
A bug currently makes the carousel snippet collapse/disappear when its
active contents are removed. This happens because after the removal,
the carousel no longer has an active item.

The solution that was chosen was to not allow the removal of slides
unless using the dedicated option which is there for that. This solution
has the advantage to also allow users to create empty slides (using a
background image for example) by simply removing the columns inside.

Note: Newly created carousels will include the oe_unremovable class on
their slides. As such they will no longer depend on isEmptyAndRemovable
checking them for having a carousel-item class on the parent.

task-2506165

closes odoo/odoo#79892

X-original-commit: 0cf36a227e7b90fb64b1bc8024de813894d10d14
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-16 19:21:14 +00:00
Siddarth Gajjarandqsm-odoo f23ef1e6be [FIX] web_editor: fix drag & drop with restricted editor access rights
task-2345098

closes odoo/odoo#79851

X-original-commit: cd051046c191f9f4cd6df4627319931720ceb257
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-11-16 16:58:00 +00:00
Sébastien Geelen (sge) 3a02d3970d [FIX] web_editor: remove warning on save
Pop-up warning was appearing when saving website pages.

task-2666177

closes odoo/odoo#79842

X-original-commit: 2b35640d9e1fb7f037eee1983a19876879936d67
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-16 13:03:17 +00:00
Nicolas Bayet 2706f6d7af [FIX] web_editor: prevent re-rendering of linktool
Before this commit, the linktool was re-rendered clicking on
same link twice.
If between click, the some property of the link changed, they
were lost after the linktool being needlessly re-rendered.

Task-2691483

closes odoo/odoo#79820

X-original-commit: 110790cb2482367867dbc0bdaa97ad0e224a3d1e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-16 10:49:39 +00:00
Nicolas Bayet 55cd20db47 [FIX] web_editor: not override root on website
Before this commit, if the editor was initiated as a simple
editor rather than the website editor (eg. the editor in the forum or profile)
the $root of the wysiwyg was wrongly assigned to #wrapwrap rather
than the $editable.

Subsequent binding (eg. LinkPopover) was bound to too many elements
which generated incorrect behaviors (eg, link popover on triggered on every
links).

Task-2691117

closes odoo/odoo#79810

X-original-commit: 58c1b04de1ec9179b940ee930984a232bb5de30d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-16 10:02:37 +00:00
Nicolas Bayet a101887f66 [FIX] web_editor: remove overlay of link
Before this commit, in the website builder or in mass_mailing, when
creating a link then hitting enter, then click somewhere in the page,
the outline was not removed from all the links.

In mass mailing, the overlay was never removed. Not even upon save.

Task-2682176

closes odoo/odoo#79634

X-original-commit: 71325540712342ef8f251a37ee29270bd3b87469
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-16 10:02:33 +00:00
Nicolas Bayet 12953e98b9 [FIX] web_editor: avoid scroll on undo/redo
When performing undo/redo on some page, because some unneded mutation
get recorded, the page scroll to another location (either up or down).
This commit add a mechanic that filter out thoses unnecessary mutations.

task-2667885

closes odoo/odoo#79620

X-original-commit: 125730ffd9322d34ef1c7d8d0298457de3e65f90
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-16 10:02:29 +00:00
Nicolas Bayet ebb4d39571 [FIX] web_editor: activate the redo button when needed
Because the `_historyStepsStates` was not fully set at the time of
calling `historyStep` in `historyUndo` or `historyRedo`, the listener
for the event "historyStep" was triggered to early and `historyCanRedo` at
that time could not possibly be accurate.

This commit call `historyStep` after setting all ids in
`_historyStepsStates`.

task-2667885

X-original-commit: 659b530516e13df77eed6254b81e72b8009a71bf
Part-of: odoo/odoo#79620
2021-11-16 10:02:28 +00:00
Sébastien Geelen (sge) c3bff57df2 [FIX] web_editor: avoid onbeforeunload pop-up issue
Remove onbeforeunload pop-up if editor has no snippet.
This fix pop-ups wrongly showing outside website editing.

see: #79731

task-2666177

closes odoo/odoo#79781

X-original-commit: 2f587eea4eea947597f0c4f7e5473c08e2175bcd
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-15 15:54:42 +00:00
Nicolas Bayet 6f972d9f9c [FIX] web_editor: undo after dropping a snippet
The commit 1b80fe9b56acea09a6784691561df65fe6349f50 made impossible
to undo after dropping a snippet.

Task-2688104

closes odoo/odoo#79649

X-original-commit: 92b1f78e8de6c343a9d1ef19459522b868cf108f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-15 11:22:34 +00:00
Nicolas Bayet 8087bd00e8 [FIX] web_editor: allow to move snippets
As an oversight of 2185e89e3f2a15b98b9cb8c3371a6031f9a6f055, it became
impossible to move snippets.

Task-2688281

closes odoo/odoo#79648

X-original-commit: f76ba944c516a0377cec324f564df604e52c2ffd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-15 11:22:30 +00:00
Nicolas Bayet b6ea6d14d2 [FIX] web_editor: enable selection under toolbar triangle
In the editor, there was a little spot where it was impossible to
click in order to select a text.

Task-2684378

closes odoo/odoo#79642

X-original-commit: 02c0cce926b1252596f10299597a9c984a8341ac
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-15 11:22:26 +00:00
Nicolas Bayet 34d0f92a78 [FIX] web_editor: wait untill colorpicker is inserted
Before this commit, an update to the colorpicker could be called
multiples times with a `colorpicker` not yet in the document.

If a colorbpicker has been created, we need to await it's start method
to be fully resolved.

Task-2667983

closes odoo/odoo#79641

X-original-commit: 105208c8363f77130ee644ce8ec2e993d9955763
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-15 11:22:22 +00:00
Nicolas Bayet 7146a6fbf4 [FIX] web_editor: have correct linkPopover reference
Before this commit, the reference of the linkPopover was
the last popover being created which is not what this property
is supposed to correspond to. It should correspond to the latest
opened linkPopover.

Without this fix, the code that want to act on the last linkPopover
would not work as expected (e.g. `this.linkPopover.hide();` in
`_onSelectionChange`).

Task-2667983

X-original-commit: d1abbc9d66a5858c771fa643f8c73990e8f14792
Part-of: odoo/odoo#79641
2021-11-15 11:22:21 +00:00
Nicolas Bayet f726f40d25 [FIX] web_editor: prevent link o_default_snippet_text
Whenever a link is being manipulated through the link tool,
the classes are being saved before the manipulation. However,
the class `o_default_snippet_text` is removed in the meantime.

Because we never want that class after the manipulation, this commit
systematically remove it.

Task-2667983

X-original-commit: f82f004e1e1439c38a09d5eb0fded5197e058c1b
Part-of: odoo/odoo#79641
2021-11-15 11:22:21 +00:00
Nicolas Bayet 93537cf82a [FIX] web_editor: allow to select a link already selected
Before this commit, selecting a link was not working all the time.
This commit allow to properly select a link all the time.

Task-2667983

X-original-commit: 8c90772470046d0b932443ac7b2c2a868c443a85
Part-of: odoo/odoo#79641
2021-11-15 11:22:21 +00:00
qsm-odoo 1ebc7c301b [FIX] web_editor, website: fix onFocus/onBlur flow + add test
The flow has been broken multiple times across the years. Let's add a
test in all stable versions.

For the 14.0 forward-port, the test came with a fix which restores the
13.0 flow which we tried to change in 14.0... but only ended up broking
it. Indeed, with [1], the 13.0 was fixed. And, with [2], we tried to
simplify the flow... but the explanation given by the commit is just
wrong: the flow was just broken and the simplification that was to be
done in fact practically never occurs. The more the reason to add a
test, proving how the flow is working. The simplification may be done
someday but not sure it is really worth it.

For the 15.0 forward-port, another fix was needed because of [3] which
introduced a bug which makes the onBlur method be called multiple times
when hiding a whole editor hierarchy.

[1]: https://github.com/odoo/odoo/commit/076992bdf099f3a645c9a1ef6df2cdcccbf1c2b2
[2]: https://github.com/odoo/odoo/commit/5c007305c9998ade32c6677cac5552101c3a96af
[3]: https://github.com/odoo/odoo/commit/806a8db35b5e0e6a461422f5bba7c97180c3ef29

closes odoo/odoo#79734

X-original-commit: 0acc5e784b15d9c963660da3781763448503f33e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-11-14 21:40:48 +00:00
Sébastien Geelen (sge) 287913ebbf [FIX] web_editor: fix translate button position
The translate button was overlapping the codeview button
in the mail template view.

task-2683847

closes odoo/odoo#79704

X-original-commit: 8a6de9089bfd77f5fdc6f4a11016906454e442cc
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-12 13:35:54 +00:00
Nasreddin Boulif (bon) 33f8c747b3 [FIX] web_editor: Display correctly top buttons of the editor sidebar
Steps to reproduce :

  - Install website module
  - Activate (and translate website) French language
  - Go to translated terms and fetch for "Discard" in website module
  - Replace the translated value by "Ne pas sauvegarder"
  - Go to Website -> Configuration -> Websites
  - Select main website and change language to french then save
  - Go to Website and edit homepage
  - Add any block

Issues :

  On top of editor sidebar, buttons are not displayed correctly.

Solutions :

  Add css class `d-flex` to the div arround the buttons.

opw-2683602

closes odoo/odoo#79612

X-original-commit: 772156078418544907f9073e242e4491ddae1e5d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2021-11-10 13:46:21 +00:00
Martin Trigaux c7942f19f2 [FIX] web_editor: translate init message
X-original-commit: 4e466182e89e835dd04809d53ef58ddbf4020d05
Part-of: odoo/odoo#79594
2021-11-10 07:45:53 +00:00
Nicolas Bayet e68a9d37dc [IMP] web_editor: allow to use link popover everywhere
Before this commit, the link popover was only available in the website
builder. Now it is available anywhere the wysiwyg is used.

Task-2678412

closes odoo/odoo#79542

X-original-commit: 161c5fc8e742294e8d85c889b4bf8d3d8cd484f5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-09 14:00:56 +00:00
Sébastien Geelen (sge) 90f0df32ac [FIX] web_editor: stop passing variables to _t function
Some variables were used in _t function instead of raw strings.
One string was not translated properly.

task-2686066

closes odoo/odoo#79505

X-original-commit: 7c5b475532dca1efea5599fb5a3f61ea646d8267
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-08 13:24:33 +00:00
Nicolas Bayet d5a031a9a3 [FIX] web_editor, website: only save dirty element
Before this commit, when inserting a new snippet or moving a snippet
that was already in the page would temporarily create hooks (`we-hook`)
in the page. The insertion of thoses hooks would trigger mutation
in the dirty observer (observer defined in edit.js) and mark all
oe_structure for which a hook was temporarily inserted.
Thus, creating unnecessary views in the backend.

Now, the code skip the mutations of the drag and drop hooks.

Task-2567752

closes odoo/odoo#79394

X-original-commit: 1b80fe9b56acea09a6784691561df65fe6349f50
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet <age@odoo.com>
2021-11-08 10:15:56 +00:00
Sébastien Geelen (sge) 66851b042c [FIX] web_editor: fix the beforeunload warning
The warning shown on beforeunload when quiting a page during edition
was missing since the new editor merge.

task-2666177

closes odoo/odoo#79325

X-original-commit: 6a7fa263e72de45d2e92c436321c01c4b70870a8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-11-03 16:44:40 +00:00
Hubert Van de Walle (huvw) 5f2c143623 [FIX] web_editor: don't show the active style entry if absent
Steps to follow

  - Edit a report with studio
  - Add an inline text element
  - Select it
  - Select the text in the sidebar
  -> An error is raised

Cause of the issue

  firstButtonEl is undefined because the style section is not always
  present in the toolbar

opw-2674302

closes odoo/odoo#79335

X-original-commit: 45b590d8961d56f8d207c22efbf1ba7188a3b1fa
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2021-11-03 16:02:11 +00:00