Commit Graph
3087 Commits
Author SHA1 Message Date
Romain Derie 6dd7207b6f [FIX] web_editor, web_unsplash, test_website: make unsplash work
Since cfe079221c, unsplash is not working anymore as that commit did not adapt
the unsplash code to that change.

task-2581567

closes odoo/odoo#76617

X-original-commit: 9a4723628e868836c7bbe8bec31ec9b6ce3f2554
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-16 10:01:14 +00:00
Benjamin Vray 360abc0570 [IMP] web_editor, website: make animation options available on text
After this commit, it is possible to animate text in website pages.

task-2545252

closes odoo/odoo#76610

X-original-commit: 187acb938f70a2130d25fa76079221339c742f1e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-16 10:01:06 +00:00
Benjamin Vray c0dcc8265b [FIX] web_editor: not hide the toolbar container by clicking in itself
Before this commit, the toolbar container was closed when we clicked
on its background or in its title bar.

task-2545252

X-original-commit: 2ca87a5142a03540fc5e6428530d394faa223d17
Part-of: odoo/odoo#76610
2021-09-16 10:01:06 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Benoit Socias 700888217c [IMP] web_editor: update opened colorpickers upon button color picking
Before this commit the button custom color colorpickers were not updated
when a color was selected - but this was alright because the
colorpickers did not remain opened.

After this commit the button custom color colorpickers are updated
whenever a color is picked, which is necessary during gradient edition.

task-2599771

X-original-commit: f40c980d7ff68f27b389a93cd2b8f60cbff5baa6
Part-of: odoo/odoo#76608
2021-09-15 23:51:14 +00:00
Benoit Socias 28e4335669 [IMP] web_editor: update color palette during UI update
Before this commit the color palette was updated directly during the
color picking event management.

After this commit picking a color updates the whole UI, and the global
UI update also updates the already opened palettes.

task-2599771

X-original-commit: 5698cf982c7e4499ed8b6f933ad364b9db475922
Part-of: odoo/odoo#76608
2021-09-15 23:51:13 +00:00
Benoit Socias d3c9a9cc00 [IMP] web, web_editor, website: make gradients editable
task-2599771

X-original-commit: bfb97ce3ed829905e943f18cd83107a92e695e76
Part-of: odoo/odoo#76608
2021-09-15 23:51:13 +00:00
Younn Olivier 096a6e72a9 [FIX] website: only display website languages for conditional visibility
The languages displayed for the ConditionalVisibility option are now the
ones available for the website.
The select widget is hidden if there is only one.

task-2629245

closes odoo/odoo#76537

X-original-commit: 380edf50bd1d8d1f7b1a33fd4fa1ad70dbc12804
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-15 09:02:16 +00:00
Benoit Socias 9e20e7d9c0 [FIX] website: avoid displaying the link popover when opening user menu
Before this commit toggling the user menu did display the link popover.

After this commit no link popover is displayed when clicking on the user
menu (or any other dropdown menu) anymore.

task-2612755

closes odoo/odoo#76511

X-original-commit: ffaa406884bd5a897a0f76e993c915691ab850ba
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-14 16:40:56 +00:00
Benoit Socias 338b437d54 [IMP] web_editor, website: make button colors selectable
Before this commit button colors were only obtained from one of the
predefined styles.

After this commit button colors can be specified by using the new
"Custom" style.

task-2612755

closes odoo/odoo#76461

X-original-commit: a010c91b5ee119cf54ed1a68a6ea06b2bc5f3978
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-14 12:07:50 +00:00
Benoit Socias 85dfd3e180 [FIX] web_editor: handle palette history better
Before this commit several history steps were added when picking a color
and history steps were added when previewing a color.

After this commit history is only updated on color selection and not
during color preview: applying the color relies on execCommand which
adds an history step => no need to add another step upon picking a color
but must be prevented during preview.

task-2599771

closes odoo/odoo#76417

X-original-commit: 4c1956d697a52e4d561e93930bb9e9f5c61e8a35
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-09-13 17:21:44 +00:00
Romain Derie 2658d29e03 [FIX] web_editor, website: re-introduce link double click
It was previously decided that double clicking on a link shouldn't do anything
other than opening the popover (which happen on single click).

It was recently decided that we should actually open the right panel link tool
on double click.

Adding double click behavior, it was needed to refactor the way the popover is
opening/closing -> We now use `focus` as trigger instead of `click`.
Side effect, it will also fix 2641448 (part about double click on word)

Courtesy of SAD for debugging the double click issue (with trigger click)

task-2618494

closes odoo/odoo#76372

X-original-commit: 4eff35ab31bfc45b4c8dca8392e9da4f4e2a7afd
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-10 19:36:57 +00:00
Benoit Socias 5be974283d [IMP] web_editor: add possibility to not focus LinkTool input
Before this commit, when requesting the link tool in the right panel, it would
always focus its input.

This commit adds an option to not focus the input when link tool is requested.

It will be used by next commit.

task-2618494

X-original-commit: ad13055d58b6cd92d56f483bce17ab2e19216809
Part-of: odoo/odoo#76372
2021-09-10 19:36:56 +00:00
Benoit Socias b5263be24c [FIX] web_editor: restore lost selection when updating color
Before this commit if the text selection was lost while the color
palette was used, the color selection was not applied on anything.

After this commit if the text selection was lost, it is restored to the
last selection known in history before applying (or previewing) the
color selection.
Also avoid to remember selections that are not part of the editable.

task-2599771

closes odoo/odoo#76357

X-original-commit: 0e706d508d6e747cff566c33d34b794a321eef5c
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-09-10 16:10:47 +00:00
Nicolas Bayet 0a0a108969 [FIX] web_editor: use the proper serialize method
Use the method serializeNode of the editor rather than directly
the one from utils  in order to only serialize when the collaboration
is active.

closes odoo/odoo#76143

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-08 10:22:06 +00:00
Nicolas Bayet 4c03a56dab [FIX] web_editor: stop making snapshot when no collaboration
When the collaboration is not active, it is not necessary to create
snapshot as they will not be sent to anybody.

Part-of: odoo/odoo#76143
2021-09-08 10:22:06 +00:00
Gorash 4d0e111733 [IMP] profiling: Add profile qweb execution into the performance tools.
By activating the profiler debugger, the two qweb options is added. The
qweb templates that need to be rendered are compiled into a new function
to add instructions for saving data.

`Add qweb directive context`
It's a sub-option of "Record sql" or "Record traces", add some context on
thread at current call stack level.  This context stored by collector
beside stack and is used by  Speedscope to add a level to the stack with
this qweb directive information.
```
    directive=t-call='website.layout', xpath=/t/t
    t_call_content
    directive=t-foreach='5' t-as="'a', xpath=/t/t/div/div
    directive=t-esc='website.search([])', xpath=/t/t/div/div/t
    execute
```

`Record qweb`
Add profiling data used by ProfilingQwebView widget. In the `ir.profile`
form view, the widget display the duration and number of sql of every qweb
directives with the xml of templates. Every xml is recorded to be
consulted even if the user change the xml templates.
```xml
    <t t-call="website.layout">
       <div>
          <div t-foreach="5" t-as="a">
             <t t-esc="website.search([])"/> <!-- will display 5 separate requests -->
          </div>
       </div>
    </t>
```

closes odoo/odoo#74712

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-09-08 10:21:42 +00:00
Nicolas Bayet cc66d73836 [FIX] web_editor: ensure editor history always has more than 0 steps
344d82c commit changed how the editor `_historySteps` should behave.
Before that commit, `_historySteps` could have 0 steps whereas after
that commit `_historySteps` should always have at least the first step
be a snapshot. When reseting the history, we should now add a snapshot
as a first step. This commit guarantees it.

closes odoo/odoo#75901

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-08 09:03:07 +00:00
Antoine Guenet 68d27ec73e [FIX] web_editor, mass_mailing: use new historyReset io/ resetHistory
344d82c renamed `resetHistory` into `historyReset` but failed to update
some calls to it and rename its equivalent in wysiwyg.js. This commit
corrects the discrepancy.

Part-of: odoo/odoo#75901
2021-09-08 09:03:07 +00:00
Antoine Guenet c0d6f1993d [IMP] mass_mailing: remove outdated and expensive from_inline conversion
When saving a mailing, we do some processing (converting classes to
inline styles mostly) in order for the mailing to display properly in
all email clients. Until we started saving the processed version
separately from the unprocessed version, we had to revert the process
whenever we would start editing the mailing. This was extremely
expensive and made the loading of a previously created email very, very
slow. This was kept so far for backward compatibility reasons 3 years
ago (see f296992). This commit removes the that unnecessary conversion.

Part-of: odoo/odoo#75901
2021-09-08 09:03:07 +00:00
Antoine Guenet 95754eb6a4 [FIX] mass_mailing: save transpiled html without affecting body_arch
Since the introduction of Odoo Editor, `field_html`'s `_getValue` uses
`wysiwyg.getValue`. This conflicts with the mechanism of `mass_mailing`
which modifies the html of the editable area in place to save an
"e-mailable" version on the `body_html` field, then relies on
`_getValue` to reset the original html (`body_arch`).
This ensures the field has a value before modifying the html in place,
so we can manually restore it instead of relying on a side effect of the
old behavior of `_getValue`.

Part-of: odoo/odoo#75901
2021-09-08 09:03:06 +00:00
Nicolas Bayet 344d82ca25 [IMP] web_editor: add collaborative feature
This commit allows to use the editor collaboratively for any html
field in peer to peer using webRTC.

task-2497931

closes odoo/odoo#75768

Signed-off-by: Antony Lesuisse (al) <al@openerp.com>
2021-09-06 19:42:56 +00:00
qsm-odoo 9f33d7dcac [REF] website, web_editor: confine 'NULL' "hack" into website
Commit [1] introduced a "hack" to transform `'NULL'` values into `null`
values in some maps as normally-defined `null` values are automatically
removed (replaced by a fallback). This hack did not need to be general
and in web_editor but can rather be confined to website only for the
user palette maps (especially since the fix made by the parent of this
commit here).

[1]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b

closes odoo/odoo#76033

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-06 18:28:53 +00:00
qsm-odoo 0ebf956edb [FIX] web_editor, website: allow to define 'null' values in palettes
When [1] was introduced, we prevented to define a 'null' value for a
parameter P in a palette and forced a fallback to a default value X
defined in a "base" palette (value X which could be null). That allowed
to ensure that all final palette values were consistent as always
fallbacking to a "safe" value. However, since then, we introduced [2]
which makes it so a parameter P in the "base" palette is defined to X
(not null) while null is a valid value for P. We could keep the old
system and define that paramater P to a 'null' value in the "base"
palette and add the default X value in all palettes explicitely... but
with this commit we are choosing to be less tolerant (but in fact more
tolerant to custo) and rely on the fact palettes are well defined with
valid values (e.g. not defining a value to null while only X or Y are
allowed for example). Indeed, an exception for the "null" value did not
make much sense: if only X or Y are allowed as value for a parameter P,
setting a random Z value was not prevented, only null was.

[1]: https://github.com/odoo/odoo/commit/05d17089c4a604cb49f1a263b68f39aeffecccda
[2]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b

Part-of: odoo/odoo#76033
2021-09-06 18:28:53 +00:00
Olivier Dony 808f95fa8f [FIX] web_editor: limit size of generated images
This should avoid disrupting layouts.

closes odoo/odoo#75965

X-original-commit: baca6bd71632e68f4e57380537e6282afbc172bc
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-09-06 07:14:48 +00:00
qsm-odoo 6799161c52 [FIX] web_editor, website: restore backend HTML fields in no-website DBs
The SCSS compilation failed if website was not installed since [1] as
a mixin was used in web_editor while defined in website...

[1]: https://github.com/odoo/odoo/commit/5ffce116a6f8d4775cffe4daef09674db6c159d0

closes odoo/odoo#75938

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 14:30:55 +00:00
qsm-odoo 2a8a5dc7a9 [IMP] web_editor, *: allow editor widgets to depend on ancestor ones
*: website

The visibility dependencies are now searched in the current
SnippetEditor instance but also in all its ancestors.

Part of https://github.com/odoo/odoo/pull/68149
task-2368576

Part-of: odoo/odoo#68149
2021-09-03 14:29:51 +00:00
Sébastien Geelen (sge) 28efd996b6 [IMP] web_editor: add support for field html placeholder
The editor now support the field html placeholder value when given.

task-2586137

closes odoo/odoo#75863

Related: odoo/enterprise#20571
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-03 08:11:57 +00:00
Sébastien Geelen (sge) 607c5ea4e2 [FIX] web_editor: make editor smaller in contacts
Make the default height of the editor quite smaller in res.partner view.
To avoid "breaking" the design and prevent scrollbars

task-2586137

Part-of: odoo/odoo#75863
2021-09-03 08:11:56 +00:00
Benjamin Vray 5ffce116a6 [IMP] website_payment, *: new snippet make a donation
*=  website, website_sale, web_editor

This commit add a new snippet donation for the website builder.

PR-63133

task-2398403

Part-of: odoo/odoo#63133
2021-09-03 02:03:14 +00:00
Younn Olivier 65fb31454f [FIX] web_editor: skip rollback when cloning a snippet
There were two issues when cloning a website_form field:

1/ Cloning is not done
Steps to reproduce :
Drop a form from the editor, save
Click on edit, select the field
Click on the clone option without hovering the label position option

2/ A traceback is thrown
Drop a form from the editor, save
Click on edit, select the field
Click on the clone option after hovering the label position option

Some FieldEditor options modify directly the dom and replace the field
node, which the editor will detect as a change of unbreakables. As a
result a rollback will be required in the next call to
odooEitor.historyStep(), done in SnippetEditor.clone().

To solve that we skip potential rollbacks while recording a history step
during a clone.

task-2485093

closes odoo/odoo#75908

X-original-commit: 7a75f295087cb02f162477a9df3b138b6780dbdd
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-09-03 00:49:13 +00:00
Younn Olivier 733003e8e5 [IMP] website, web_editor: do not show mega menu parent options
A new class has been added for snippets that should not display their
parents options: o_no_parent_editor.

With that class the editors for the parents of this snippet won't be
created.

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
2021-09-02 14:14:51 +00:00
Younn Olivier 3d9e7c9a91 [IMP] website, *: toggle mega menu options when toggling the dropdown
*: web_editor

As the mega menu templates are now displayed as an option of the mega
menu snippet, opening the mega menu dropdown in edit mode will display
the options.

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
2021-09-02 14:14:51 +00:00
Younn Olivier a57cda43c3 [IMP] website, *: use widgets to display mega menu templates
*: web_editor

The masonry templates selection SnippetOption has been abstracted so
that mega menus content can also be replaced with template content.

Part of https://github.com/odoo/odoo/pull/71143
task-2502208

Part-of: odoo/odoo#71143
2021-09-02 14:14:50 +00:00
qsm-odoo aaef11f594 [FIX] web_editor: fix masonry snippet template switching
Since [1], a new option was added to the masonry snippet to be able to
switch its whole content to a different template. That option was
working great... until [2] was merged. Indeed since then, each option
change induces an update of the whole editor panel. In this case, this
happened:

- Add a masonry snippet.
- Click inside one of its column (the masonry options and the column
  options appear).
- Switch masonry snippet template.
- An option was changed -> Update the whole editor panel... including
  the column options... but that column is not there anymore since
  removed by the template switching option.

Now, we ignore options whose target is not in the document anymore and
make sure to enable the right options post panel update. This commit
could be backported later on (even though the masonry option was not
available before, the bug is potentially there for community options).

[1]: https://github.com/odoo/odoo/commit/c90ab7b6646b603dcd0a49387b5eeba60ce17f59
[2]: https://github.com/odoo/odoo/commit/2cbb691a84ce186ddd34a2a4c76d95671ed6e834

Part of https://github.com/odoo/odoo/pull/71143

Part-of: odoo/odoo#71143
2021-09-02 14:14:49 +00:00
Louis Wicket (wil) 80d74e7ee0 [IMP] mail, web, *: add support for guest users
* = crm_livechat, hr, hr_holidays, im_livechat, mail_bot, purchase, sms,
    snailmail, survey, test_discuss_full, test_mail, web_editor, website,
    website_livechat

 - Create new model `mail.guest` for guests.
 - Rewrite some RPCs to target routes rather than model methods so that
   guests are able to use them.
 - Patch JS and python models to support guests.
 - Create a stand-alone page and boot the channel in it.

task-2494829

closes odoo/odoo#75496

Related: odoo/enterprise#20417
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-02 00:43:34 +00:00
Sébastien Geelen (sge) 2cc16507fd [REV] web_editor: change link shortcut to ctrl+K
This reverts commit 0371fe2b9e54ff557265a8f8fc919d351ed6a7d5.

task-2635043

closes odoo/odoo#75842

X-original-commit: d37a807cd0000bf3aa0fd150b5924a06de31145f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Sébastien Geelen <sebgeelen@users.noreply.github.com>
2021-09-01 16:23:11 +00:00
Romain Derie 34ea4030b1 [FIX] web_editor: restore linked date field edition
4eafd78847 was not correctly adapted with new editor.
The `removeClass` and the css for that class was left in the code but the code
in charge of adding that class was just removed, breaking the behavior.

closes odoo/odoo#75786

X-original-commit: e59f91d74ad07430a4942efeeb479a538993c918
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-08-31 18:48:54 +00:00
qsm-odoo 014446f84b [FIX] web_editor, website: combine dataset "image" and "img" keys
Commit [1] introduced a new "image" option instead of fixing the "img"
option which already existed. Also it created a <img> tag with a "fa-fw"
class which does not make much sense. Also, our system with data-img
actually creates a <svg> tag so that the color of the icon is the one
decided in our SCSS instead of the one hardcoded in the image and so
that there is an hover effect.

[1]: https://github.com/odoo/odoo/commit/02ccad3200187724d5f133842032981fb91f7465

closes odoo/odoo#75743

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-31 10:01:20 +00:00
stefanorigano (SRI) 9337562cca [REF] web_editor, *: review editor toolbar design
*: web, website

This commit redesigns the editor toolbar improving its visual appearance
and introducing substantial changes wherever it is rendered.

== "Into-sidebar" design
The grid layout has been refined, improving its components allocation.
For the sake of visual simplification, "list-type" buttons have been
unwrapped from their original dropdown. For the same reason the button
to create a new table has been removed (users will have to use the
command-bar to create a new table).
Table's options have been moved to a section "ad-hoc", visible only when
a table is selected.

== Floating design (backend only)
The toolbar is now white to match the command-bar design.
In order to simplify frontend inheritance, the floating toolbar now uses
grid layout.

== Colorpicker
The generic code necessary for each design has been moved from
'wysiwyg_snippets.scss' to 'wysiwyg.scss'.
The style is now controlled by css variables allowing to customize
critical design properties without the need of SCSS overrides.
By default the design is white(-ish) to match the floating toolbar,
while in 'wysiwyg_snippets.scss' the variables are customized to get the
typical sidebar's dark feel.

Note: despite the task main objective was just to improve/fix the
design, this aimed to simplify design inheritance and reduce the css
too. While inheritance has been improved reducing the amount of
overrides, the attempt to reduce the css partially failed (in the final
lines count must be considered that a new sidebar section has been
created).
The reason is that we currently suffer from a deep and complicated
inheritance structure for this component. The xml template uses default
bootstrap classes that are styled differently depending if loaded in a
community or enterprise environment. This approach leads to overrides
that must cover all the scenarios while further customization must be
taken in account too 'cause the toolbar can be rendered into the sidebar
with a totally different design.

A possible solution would be to detach from bootstrap directly in the
lib using custom classes names, and then @​extend these classes
differently according to the current environment but probably not a good
idea as we want the toolbar to use bootstrap for in-website editors (so
they can match the theme correctly) but this has to be reviewed as well
anyway. To be checked.

Part of https://github.com/odoo/odoo/pull/73565
task-2496339

closes odoo/odoo#73565

Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-08-31 10:00:46 +00:00
qsm-odoo 7c1c6ecc52 [IMP] web_editor: better show active entry in the text style dropdown
Replace the "¶" icon with the name of the current active text style
entry.

Part of https://github.com/odoo/odoo/pull/73565
task-2496339

Part-of: odoo/odoo#73565
2021-08-31 10:00:46 +00:00
stefanorigano (SRI) 2aea38467e [IMP] web_editor: review floating toolbar and its SCSS structure
The "floating" and the "into-sidebar" toolbar designs are visually very
different but share the same XML template.

Prior to this commit we relied on SCSS overrides to achieve the two
designs, meaning that any new rule added in wysiwyg.scss was supposed to
be followed by an override in wysiwyg_snippets.scss.

This approach led to glitches and undesired behaviors, especially
considering that all customizations we apply are already overrides of
the standalone OdooEditor lib (that, by the way, applies its own
overrides on top of bootstrap too...).

This commit will add the 'oe-floating' class by default, and will
remove it when the toolbar is rendered inside the sidebar.

This approach allows to target the floating design when needed only, and
consequentially will leave the '.oe-toolbar' selector for the code
shared between the two designs.

Part of https://github.com/odoo/odoo/pull/73565
task-2496339

Part-of: odoo/odoo#73565
2021-08-31 10:00:45 +00:00
Hubert Van de Walle (huvw) 8285412dbc [FIX] web_editor: prevent traceback when InputEvent.data = null
Step to follow

1. open any record with a chatter enabled )
2. start to write a log note in the the full composer
3. write a line with at least one character, then shift+enter
-> There is a traceback

Cause of the issue

InputEvent.data can be null

opw-2622051

closes odoo/odoo#75726

X-original-commit: 503bbe7a4d0cdd0aefcb723460210b089732831a
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-08-30 13:28:09 +00:00
Philémon van Helden 02ccad3200 [IMP] web_editor, website: replace light bulb with palette
In master, in the 'Theme' tab of the website editor, the button to edit
color schemes has a light bulb icon, which doesn't clearly represent what
it does.

In this commit, we replace it with a palette SVG. Since we-select
elements do not have an image option implemented, we also add one
for future usage.

task-2618494

closes odoo/odoo#75730

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-08-30 10:59:16 +00:00
Philémon van Helden 7a8b828fb9 [IMP] web_editor: add correct spacing to add image from URL
When adding a media to the library using its external URL, the
confirmation icon (either error, warning, or success) will not be
spaced correctly, and will stick to the button on its right.

In this commit, we add a class to it which adds some padding on the
right.

task-2618494

Part-of: odoo/odoo#75730
2021-08-30 10:59:15 +00:00
Philémon van Helden d2a59b731a [IMP] web_editor: rename dyn. colors to main color
"Dyn. Colors" implies that the colors are dynamic, such as in an
animation. This is not the case, as it just represents the main color,
or accent.

This commit renames the "Dyn. Colors" option to "Main Color" to better
match its functionality.

task-2618494

Part-of: odoo/odoo#75730
2021-08-30 10:59:14 +00:00
Benoit Socias 0a4cd86dd5 [FIX] web_editor: scroll to the background image positioning overlay
Before this commit if the Apply/Discard buttons of the background image
positioning overlay were drawn outside of the visible area the user was
unable to access them - and thus had to reload the editor page.

After this commit the viewport is always scrolled to the background
image positioning overlay, making it always usable.
Because the block is always scrolled into the view, the buttons can
always be positioned near the top border of the overlay.

task-2627710

closes odoo/odoo#75679

X-original-commit: a9c3997b4bde08ceb75cacef7eb6ebad3efa7f44
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-27 18:46:23 +00:00
Benoit Socias 61f6d7680c [FIX] web_editor: remove color border from link style option
Before this fix applied color combinations were shown on the style
option.

After this fix the style option is displayed as any other plain option.

task-2612755

closes odoo/odoo#75665

X-original-commit: 2327248b8f67f5312f5630bf64fe49a31e025a09
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
2021-08-27 18:46:19 +00:00
qsm-odoo 806a8db35b [IMP] web_editor: update editor panel after its items have been updated
Instead of updating the panel with outdated elements then updating them,
update those elements before actually showing them. Especially useful
since [1] and [2] where the update is now properly waiting for async
parts.

[1]: https://github.com/odoo/odoo/commit/2cbb691a84ce186ddd34a2a4c76d95671ed6e834
[2]: Parent commit in this PR merge

Part of https://github.com/odoo/odoo/pull/74941

closes odoo/odoo#74941

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-08-26 17:24:59 +00:00
qsm-odoo 3fce08513d [IMP] web_editor: allow async parts in onFocus/onBlur
Part of https://github.com/odoo/odoo/pull/74941

Part-of: odoo/odoo#74941
2021-08-26 17:24:59 +00:00