Commit Graph
2428 Commits
Author SHA1 Message Date
qsm-odoo 4ac67279c7 [FIX] web_editor: restore adding bg video in some context
Since [1] the feature was broken because of a traceback which occured
while trying parse a background image URL of an element which is not
in the DOM.

[1]: https://github.com/odoo/odoo/commit/7558dcce791f707e3f3470835133f91ec7ff074f

closes odoo/odoo#59440

X-original-commit: 9c2d02f6e78a01eca02de90dd9406effa0308d27
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 15:45:04 +00:00
Samuel Degueldre 5e811936c7 [IMP] web_editor: replace some bottom shape colors with transparent
Previously, rainy 05 and wavy 06 had a bottom color with a hard edge.
This means that in order to not have a harsh color transition in the
section, the user would have to match the bottom color to the background
color of the section or vice versa. This commit makes it so that this
color is transparent by default instead. This means that the user can
now simply choose the background color and have the same result, without
having to configure two separate colors.

Part of: odoo/odoo#58333

closes odoo/odoo#59420

X-original-commit: 8e6728f7fa486e264737ce068f637c8a76fdb7d9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 13:49:09 +00:00
Samuel Degueldre 0f7a7639d1 [FIX] web_editor: various shapes fixes
This commit fixes a number of shapes, usually the problems were with
imperfect joints between connecting shapes, shapes being cut not close
enough to the edge, or shapes using embedded PNGs for shadows instead of
using SVG filters.

Part of: odoo/odoo#58333

X-original-commit: ac82407b259eab929486bf0a333a48bc507efa60
2020-10-07 13:49:09 +00:00
qsm-odoo cfd63a2b35 [FIX] web_editor: reduce clickable area of checkboxes in editor panel
Before this commit the clickable zone of a checkbox in the editor was
all the width of the panel.

After this commit, the clickable zone is only the label width + the
checkbox width. Also, the active and hover states of the label have been
removed to not confuse the user.

task-2312878

closes odoo/odoo#59406

X-original-commit: 61ffe97d03deae0aee72568311c453d1cd3470c8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 12:10:31 +00:00
xO-Tx 47806eb87f [FIX] web_editor: fix empty media dialog save issue
when media dialog launched for the first time (with no selected
media attachment), "FileWidget.selectedAttachments" contains a default
object {url:... , alt:...} (default attachment already on the target),
and the click on "Add" button will cause a backtrace since the code on
"_save" method tries to access "image_src" attribute on all selectedAttachments
elements including default one.

The simplest solution would be to check if the object already has
an "image_src" attribute.

task-2312878

closes odoo/odoo#59351

X-original-commit: ecffbe4060eea98d3444f308bcd28bfb9287e1c3
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-07 08:52:41 +00:00
Harpritsinh Sisodiyaandjpr-odoo 7c3cb51e52 [FIX] web_editor: fix oe_structure view that are not in extention mode
Issue occurs due to the way we compute the default value in base ir ui view.
The method _compute_defaults don't set extention mode under some condition
even if we provide an inherit_id view.

This commit double fix it, we use now self.env['ir.ui.view'] to create the
new view and so always compute the mode based on 'if inherit id or not'.
Second fixes is to explicitely set mode manually as 'extention'.

before commit:
when you drop snippet to blog sidebar and click save button.
The changes of user is not visible in sidebar because view created in mode
'normal' and not 'extention'

task-2311520
closes odoo/odoo#55908

closes odoo/odoo#59318

X-original-commit: a944ce9beaaf984a7b1282785d03d4bfc8220f18
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-10-06 16:35:59 +00:00
qsm-odooandBenjamin Vray 41a2a109c7 [FIX] web_editor: allow to go the parent snippet more easily
Before this commit to select a parent snippet you had to click on
its title in the editor panel.

After this commit, we can still click on the title but also on the
whole line. At the same time, make it so the title has a pointer
cursor and so that long titles work too.

task-2327182

closes odoo/odoo#59262

X-original-commit: 5d3310cea75014ce3c43ee89235cd42b87e0cf99
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benjamin Vray <bvr@odoo.com>
2020-10-06 11:58:21 +00:00
jpr-odoo 7b82e5f89d [IMP] web_editor: improve confirmation message
In this commit, Improved the web_editor confirmation message for better readability.

task-2349785
Closes https://github.com/odoo/odoo/pull/59115

closes odoo/odoo#59115

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-05 13:36:19 +00:00
Samuel Degueldre 5d67cdc822 [FIX] web_editor: fix background-image urls becoming absolute on drop
With the recent addition of the parallax option on all snippets,
background-image urls were being converted from relative to absolute on
snippet-drop. This was caused by trying to read the background-image's
url and setting it back onto the target, but there is no way to reliably
read a background-image url in relative form, so it was returned in
absolute form and then written back to the element as is.

This commit fixes that by always converting the absolute URL to relative
when they are on the same origin as the database.

task-2312878

closes odoo/odoo#59113

X-original-commit: 7558dcce791f707e3f3470835133f91ec7ff074f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-05 13:25:44 +00:00
Martin Trigaux 2683184aa6 [FIX] *: fix all the typos
And other reported English mistakes in source string
Courtesy of Transifex translators

And remove leftover from gengo

closes odoo/odoo#59022

X-original-commit: 26efc84c5cac47a2cc83d7b084f8b71528fec6c7
Related: odoo/enterprise#13781
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-05 09:36:34 +00:00
Goaman 55f10ac9a0 [IMP] web_editor: add assets for jabberwock editor
This commit lays the groundwork for the new editor by adding empty files to the assets in
order to change them later on. The new editor is not stable enough to be merged right
now, but delaying it to 15.0 would be problematic as the current editor has many bugs that
we are unable to fix because of how summernote interacts with browser-dependent code as well
as all the hacks that were done on top of it for Odoo since 8.0.
2020-10-02 08:52:40 +00:00
Benjamin Vray bb7f91cb14 [FIX] web_editor: fix select with images in left panel
Before this commit, we were looking for text content inside SVG element
to set the selected value of a select in the editor panel.

After this commit, we avoid looking inside SVG tags.

task-2312878

closes odoo/odoo#58941

X-original-commit: 338f8d843832c339c52c00c7f4c41b5ab2d696ed
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-01 19:33:36 +00:00
Martin Trigaux e79531c136 [I18N] *: export 14.0 source terms
Including demo data this time

closes odoo/odoo#58862

X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-29 17:52:02 +00:00
Benjamin Vray 4aa8e4913a [FIX] website, *: fix background layer elsewhere than in a section
*: web_editor

Before this commit, the elements (other than section) and with the
background layer options avaible (shape, color filter, etc.) did not
have the relative position added on their children. So all the
children were hidden behind the layer element which is in absolute
position.

Part of https://github.com/odoo/odoo/pull/58850
task-2312878

X-original-commit: 9c08e119b125b82e2c42dc944920dd8a96789e25
2020-09-29 18:36:11 +00:00
Benjamin Vray 3ab3afcc91 [FIX] website_blog, web_editor: fix tag layout issue in blog
Before this commit the layout of the front-end edition of tags in blog
was broken. And the default value of the select element was not filled.

We fixed those design issues and also improve some small design
details. And for the select issue, we add a return value in the
computeWidgetState of the addTag method because even if the value will
still be empty we need to return something because we want the select
to be filled by the default value of setValue() wich is "/".

task-2312878

closes odoo/odoo#58860

X-original-commit: 9a04c8146c799ecd5efa6ba42582d4664a1a3a51
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29 17:51:04 +00:00
Benjamin Vray 9530af25d4 [FIX] web_editor: fix remove btn z-index in media dialog
Add a z-index on remove btn in media dialog because before that the
button was hidden behind images. Also review a little bit the style of
the button.

task-2312878

closes odoo/odoo#58839

X-original-commit: 4a8239c86e3fdf2830bd4f52d2424fe0f83d4639
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29 14:55:41 +00:00
xO-Tx 63d7d97415 [IMP] web_editor: add tooltips on editor panel labels if overflow
task-2312878

closes odoo/odoo#58805

X-original-commit: 937e018ee35ca0f63c96442a11bb8f0d2d03471a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29 12:03:13 +00:00
qsm-odoo f1c09c7769 [FIX] web_editor: restore background and foreground color previews again
This was fixed in 13.0 and forward-ported twice in 14.0 with [1] and [2]
But the combination of the two commit were messed up.

[1]: https://github.com/odoo/odoo/commit/225ec35e50b5d71fa795f64cb9a9a6c2ceda7631
[2]: https://github.com/odoo/odoo/commit/19be84634d394f47ceb882c5ddd24585f31b50ae

closes odoo/odoo#58788

X-original-commit: 202c192cad16d2353603e3875ea9ee490eafb5bb
Related: odoo/enterprise#13672
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29 11:14:37 +00:00
qsm-odoo 81ca8647aa [FIX] web_editor: make we-input full-width if unit is large
The design was made considering the units would not be bigger than 2 or
3 characters... but it is currently used with translated texts like
"products". In those cases, force the input to be full-width.

task-2312878

closes odoo/odoo#58787

X-original-commit: b1f9057af0d38176985ecfbe125ae992422b9744
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-29 11:14:12 +00:00
qsm-odoo 605c899b04 [FIX] web_editor: restore background and foreground color previews
Forward-port of [1] for the custom text tools for the website editor.
Still has to be improved with the future text tools.

[1]: https://github.com/odoo/odoo/pull/58690

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

closes odoo/odoo#58745

X-original-commit: 19be84634d394f47ceb882c5ddd24585f31b50ae
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 18:58:25 +00:00
stefanorigano (SRI) 093ae661e9 [FIX] web_editor: review temporary text tools design
The text tools are being reworked with the new editor. Meanwhile, this
commit will get closer to the desired design with a pure CSS solution.

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

X-original-commit: ad20f2b97ef925a27cef4976462d3d0aa39d0433
2020-09-28 18:58:25 +00:00
qsm-odoo 66cc01e76d [FIX] web_editor, *: show text tools in style tab only
*: website

As the text editor is still the summernote one, this improvement was
made possible through a series of hack. It has to be reviewed once the
new editor is ready.
This makes the text tools only appear in the style tab by switching to
it as soon as the summernote tools are updated. To prevent flickering,
css and js hacks had to be made.

This also moves the undo/redo buttons in the top bar with another hack:
those simulates click on the hidden summernote ones.

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

X-original-commit: 0f65015b1b0a849bf109df11fd18a9e3a62820e4
2020-09-28 18:58:24 +00:00
qsm-odoo 9c41a344cf [IMP] web_editor, *: automatically increase default link color contrast
*: website

Inside a color combination (or outside, as considered the same as inside
color combination number 1), the link color can be configured. It is
set by themes to one of the 5 theme colors. Sometimes, no color of
those 5 colors contrast enough with the color combination's background
and we accepted that before, relying on the fact the user can change the
link color if he wants too. Now we automatically increase the contrast
of those link colors, except if the user overrides it.

This system might be extended to all foreground colors in the future but
the system has to be improved for that.

closes odoo/odoo#58739

X-original-commit: f8abb476fe0475799a3da66d49a92c7de2ace8a0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 18:17:43 +00:00
qsm-odoo db4e47f8c4 [FIX] web_editor: restore background and foreground color previews
closes odoo/odoo#58733

X-original-commit: ee8cd9952736d9ea57609e218e3479963785a78d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 17:19:23 +00:00
Benjamin Vray c460aa7994 [FIX] web_editor, website: fix menu colors in table of content
Before this commit, the colors of the navbar in the table of content
menu were not adapted to the color combinations system. With navbar in
top position, the background and the colors of the links were using the
same color.

After this commit, the colors of the list-group-item links are also
adapted with color combinations.

task-2312878

closes odoo/odoo#58645

X-original-commit: a0dc17676c570887773854243bcb8cd8823359d5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 11:29:20 +00:00
Benjamin Vray 963f0ed02e [FIX] web, web_editor: fix scroll to hidden dropped snippets
Fix the scroll when the snippet is the dynamic one because it did not
work as we tried to get the offset of an element with the d-none class.

Remove the scrollValue variable because we don't need it anymore.
It was used before the code was reviewed in a previous commit.

task-2312878

closes odoo/odoo#58486

closes odoo/odoo#58530

X-original-commit: e6d32bc4bfa7f0c3c2f82c2eb99a562c1cb93d83
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-25 13:43:26 +00:00
Laurent Stukkens (LTU) c694d64e66 [FIX] web_editor: prevent scroll over right panel
* Prior to this commit, the auto scroll is triggered when dragging
  items over the right panel (if the dragged item is close to bottom
  or top).

* After this commit the auto scroll is is no more triggered as long
  as the dragged item is over the right panel area.

closes odoo/odoo#58527

X-original-commit: 0262e33d32fa6b3364f4d9c4144879bf28a0869f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-25 13:04:05 +00:00
qsm-odoo 9cf8b97fe4 [FIX] website, *: review modal behaviors with right-panelization
*: web, web_editor

Since the right-panelization made with [1], the modals were not
compensating the body scrollbar when opened anymore and the backdrop
was misplaced. This commit fixes the problems generically, to support
modals with non-body scrolling.

[1]: https://github.com/odoo/odoo/pull/57975

closes odoo/odoo#58442

X-original-commit: ebd0c90a146145079061e79c2d4c37fa182a2975
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-25 08:56:52 +00:00
Benjamin Vray d593fdbf58 [FIX] web_editor: hide the remove button for image t-field
task-2312878

closes odoo/odoo#58396

X-original-commit: 812280896120a9950363c2cd775a49d2ac3a8695
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-24 09:45:25 +00:00
Benjamin Vray 5194551de1 [FIX] web_editor: fix overlay on image changed
Before this commit the overlay of an image was not updated when the
image was replaced by another.

task-2312878

closes odoo/odoo#58335

X-original-commit: d4641b5bdc2b05523e29fb87a3b953dea90fbd8a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-24 08:49:13 +00:00
Laurent Stukkens (LTU) 139a21536b [FIX] web_editor: buttons on snippet move
task-2312878

closes odoo/odoo#58325

X-original-commit: d73dfc635860aa75e75c767344022262458b963c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-23 11:06:30 +00:00
stefanorigano (SRI) 7bd5489d50 [FIX] web_editor: handle text selection
task-2335267

Part-of: #57942
X-original-commit: cbcedb463d96f01823b2bdab6c6cf465cb34c096
2020-09-22 18:51:18 +00:00
stefanorigano (SRI) 8bcb9af43e [FIX] web_editor: collapsible component, adjust design
task-2335267

Part-of: #57942
X-original-commit: 349fee8755b1919ef410d196a8e3f36e21f325e4
2020-09-22 18:51:18 +00:00
stefanorigano (SRI) e1707be5c3 [FIX] web_editor, website: reword theme options, highlight <we-title>
Reword some theme options, highlight <we-title> components when used as
a "sub-section" titles.

task-2335267

Part-of: #57942
X-original-commit: d6acbfee1834ab32460300b9d7f5dd9188f68014
2020-09-22 18:51:17 +00:00
stefanorigano (SRI) 5a6dc7b596 [FIX] web_editor, website: scroll effect dropdown
Fix the design. Trig animations hovering any part of the button rather
than its inner image only.

task-2335267

Part-of: #57942
X-original-commit: 55424d41b355ae1303f040bdd953e357365289f3
2020-09-22 18:51:17 +00:00
stefanorigano (SRI) d69636b5da [FIX] web_editor: dropdown pager, use default colors
task-2335267

Part-of: #57942
X-original-commit: a7fc666eff6d323492133c996dbfbebfe319f1d8
2020-09-22 18:51:16 +00:00
stefanorigano (SRI) e739bcf227 [FIX] web_editor: color-combination preview items alignment
task-2335267

Part-of: #57942
X-original-commit: e30f555770f22f91743c33b74615cea8ecdf983c
2020-09-22 18:51:15 +00:00
stefanorigano (SRI) 5ab7c51b2b [FIX] web_editor, website: color-combination preview misleading design
Adjust shadows/borders in order to make the color-combination box
stand-up.

task-2335267

Part-of: #57942
X-original-commit: 38ce0c20c6a82b75d77406419b25d90259b50293
2020-09-22 18:51:15 +00:00
stefanorigano (SRI) 8e460d0672 [FIX] web_editor: snippets library search bar, design adaptations
task-2335267

Part-of: #57942
X-original-commit: 1df8f70dd5e1de92ddebdd9033e3d72737bea9b9
2020-09-22 18:51:15 +00:00
Samuel Degueldre fe388460d8 [IMP] web_editor: perf; skip mutually-cancelling actions in editor
Previously, when the user quickly hovered over many options (eg when
trying to click on the last item of a select menu), all of the options
that were briefly hovered would be previewed in succession. While this
is not a problem for options that are fast to change, some option take
some time (eg, image filters), but all of the intermediary previews
would still show one after another, which is both very slow and
completely useless.

This commit adds a per-widget action queue. When a widget is called, it
will immediately add an action item to this queue, but when the
snippet_edition mutex becomes available to execute this action, it will
first check that this action will not be immediately reverted, and if it
will, the action is skipped entirely.

task-2337344

closes odoo/odoo#58256

X-original-commit: 4d1e47213627304329fa438cae6d6c58484dbb32
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22 15:52:26 +00:00
qsm-odoo 45604d255c [FIX] web_editor, website: fix fullscreen mode with right panel
Since [1], the editor panel is now on the right. The fullscreen mode
was not adapted correctly.

[1]: https://github.com/odoo/odoo/pull/57975

closes odoo/odoo#58242

X-original-commit: 8359ae12d8049ecf6f6de810ae74f096769038e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22 14:17:01 +00:00
qsm-odoo ae1b838ab4 [FIX] website, *: properly stack the bg layers for big boxes snippet
*: web_editor

The big boxes snippet's content was appearing below the background
layers (filters, shape, video, etc).

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

X-original-commit: f1bd8bc7ef8b084168816bc22d821acdffe2aaf6
2020-09-22 11:44:05 +00:00
qsm-odoo 46c3a9670d [IMP] web_editor, website, *: move text tools in snippets panel
*: website_event, test_website

This commit is a series of hacks. The goal is to move the summernote
text tools to the editor panel for the website editor. All the code
to use the text tools in a top bar is kept (mass mailing, etc) and the
text tools are placed at the right place for website in an ugly way.

This is obviously temporary, until we can implement those text tools
more generically and in a better way thanks to the new editor.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

closes odoo/odoo#58199

X-original-commit: ff81fa4798e232a03daf0eeff7d85ad35a52b25c
Related: odoo/design-themes#365
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-22 10:09:36 +00:00
qsm-odoo 48b12387d5 [IMP] web_editor, *: move the left panel to the right
*: website, mass_mailing

See parent commit for information about the scrollbar moved to the
'#wrapwrap' element, which was necessary to achieve this right panel
design. Note: in the future, having the scroll on the #wrapwrap may
not be necessary anymore as the edition might be done in an iframe.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 2abe8517063b2696cc89e9a453dcc3921fb3b8c7
2020-09-22 10:09:36 +00:00
qsm-odoo 9f048625e1 [IMP] website, *: move page scrollbar to #wrapwrap
*: web, web_editor, portal, account, website_blog, website_forum

This is probably not ideal to move the scrolling behavior out of the
html element but this will be needed for the editor to not have a double
scrollbar on the right. This is actually also useful for the scrollbar
to appear under the purple odoo menu instead of its right.

This commit, if to be reverted in the future, however contains many
improvements to make the transition easier that should be kept: jQuery
and Odoo functions to be able to scrollTo a specific element, get the
top scrollable element, check if an element is scrollable, etc. Also,
some magic was done: if some code tries to scroll to a specific scroll
position via jQuery's scrollTop or animate functions on the html/body
element, those will still work as intended (obviously, using the new
utils to do that is however recommended).

This commit also reviews our scroll behaviors to make them more robust
and share the code.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 4e7be69825163c0a0ff41c882a196fc7f3158fb3
2020-09-22 10:09:36 +00:00
qsm-odoo 08f054199e [FIX] web_editor, *: wait for drag & drop ending before saving
*: website

This is not the cleanest of fixes because the original code have to
be refactored first but this solves the problem we had *sometimes*
when drag and dropping a snippet then immediately saving (only saw the
bug in automatic tests): same as all snippet options, the operation had
to be mutexed so that saving is done after its full execution.

Part of https://github.com/odoo/odoo/pull/57975
task-2344227

X-original-commit: 277f39904e7218bef2dd23b1c5b719ce8660008f
2020-09-22 10:09:35 +00:00
Samuel Degueldre 469bacb91f [FIX] web_editor: fix color comparison and store normalized colors
Previously, shape colors were stored in non-normalized form (eg, would
use the color's name if it was a palette color), this caused some issues
if you chose a palette color for a shape, then changed the palette: the
wrong color would appear in the color picker because it would look use
the color of the current palette instead of the color that was actually
chosen.

This commit also normalizes the case of color strings before comparing
them, as this was causing some colors to be considered non-default
because of different capitalization.

closes odoo/odoo#58180

X-original-commit: cc8589f74d69816357cb614933358000166fa161
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-22 09:18:38 +00:00
Samuel Degueldre fab02b45af [FIX] web_editor: make angle of shapes into a multiple of 10deg
This commit changes the angle of some slanted shapes so that they're a
multiple of 10 degrees, this increases consistency between shapes.

closes odoo/odoo#58134

X-original-commit: dc591641f3bf8dee50f172134ffd686edc571bd3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-21 13:16:22 +00:00
Jeremy Kersten cad5d8b976 [IMP] web_editor: adapt search style
task-2329096 .2

X-original-commit: 56fac7dda7ecf297d9e55ce21fa43a3720b97f0e
2020-09-21 07:24:01 +00:00
Samuel Degueldre c46204dff9 [IMP] web_editor, *: make media-dialog search odoo media-library
*: website, web_unsplash, website_blog

We have recently created an odoo media library that exposes a public API
for searching for open-source media, including dynamic SVGs that can be
used with the dynamic background-shape system to create illustrations
whose colors can be changed by the user. This commit adds the
corresponding client-side functionalty: search for the images in the
media-library, creating a corresponding attachment when selected, as
well as an option to customize the colors of the dynamic SVGs.

In the process, adaptations have been made in the web_unsplash module to
avoid duplicating code and to adapt code that was making assumptions
that are no longer valid.

To make new users more aware of this feature, all default images have
been hidden from the media-dialog, so that the user is prompted so
search for images. Some tests and tours that were relying on having
default images in the media-dialog (eg in website_blog) have been
adapted to match.

task-2316651
Linked to: odoo/iap-apps#235

closes odoo/odoo#57888

X-original-commit: 7a1308b426f94b33e2bd55e5d58e661067e26ff3
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-16 16:14:37 +00:00