Commit Graph
1864 Commits
Author SHA1 Message Date
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
qsm-odoo 0e4dde8ef2 [IMP] web_editor, website: improve editor loading effects
- Share the code for tab switching loading and slow option loading.
- Now add a loading effect over the content when the content is changed
  and a loading effect over the editor panel when the editor panel is
  being changed

Part of https://github.com/odoo/odoo/pull/55614
task-2213114

closes odoo/odoo#57879

X-original-commit: e126cd3bb2b20bc993d2472eee5fe16cc7a74ea9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-16 15:33:37 +00:00
xO-Tx c8a1ff05f8 [IMP] web_editor: add loader for slow snippet options
Add a loader over the editor if an option takes some time to be applied
to indicate that something is being done.

In this commit, the following changes have been made:

- Add "_execWithLoadingEffect" method (will be used to add actions
to the mutex queue and set a loading screen over the editor 1s later).

- As soon as the mutex is unlocked (all computations are completed),
the loading effect will be removed (or canceled).

Part of https://github.com/odoo/odoo/pull/55614
task-2213114

X-original-commit: a4a745cf4f9ccade9876d885ab0774d3ec0bbf69
2020-09-16 15:33:36 +00:00
Laurent Stukkens (LTU) 4ad779b07f [IMP] web, website: prevent auto scroll from left panel
* Prior to this commit, when starting to drag a new snippet from
  the left panel, the auto scroll feature was triggered if the
  snippet was one of the top or bottom ones.

* After this commit, the auto scroll feature will be disabled from
  the left panel.

task-2307404

closes odoo/odoo#57449

X-original-commit: f1f48cdaab3dd7847e8546ad9887f24a9e2ed4c1
Related: odoo/enterprise#13139
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-10 15:04:00 +00:00
Benjamin Vray c38e241601 [IMP] web_editor: scroll to the last snippet dropped
After dropping a snippet. Scroll to this snippet if it is not an inner
snippet and if it is not dropped in a modal.

task-2332641

X-original-commit: 3385cad238a4e242e7d58827066498f07b8c626f
2020-09-11 16:31:52 +00:00
Jeremy Kersten 6c5a39ee78 [IMP] website: add data-option-name att to define class
OptionId was previously based on data-js name. But if an option has no js
the classname was snippet-option-undefined, now we fallback on data-option-name
to have a right name, and be easily selectable by theme tour.

X-original-commit: 7b0a147cd43e8e890ebe5a882292a69a5c8c90ac
2020-09-11 16:31:51 +00:00
Cocographique 932b81cb3c [FIX] web_editor: make 'Save' tooltip visible
X-original-commit: 24bd2e805e730b6b8d62c4698686588183d4cdaf
2020-09-11 16:31:51 +00:00
Samuel Degueldre 9733bdfdc0 [FIX] web_editor: do not display quality options on SVGs/GIFs
When the width and quality option for images was moved from the
optimize-dialog to the left-panel, it was made available on all image
types. However, width and quality options don't make sense on SVGs and
would break animated gifs. This commit makes it so that quality options
are only available on JPEG and PNG images.

closes odoo/odoo#57564

X-original-commit: 315be6f4765268eada4b39a637136c86a30720eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-11 15:30:49 +00:00
Samuel Degueldre 5314557a78 [FIX] web_editor: various shape fixes (hide on mobile, bad joint, ...)
This commit fixes various things with the shapes: shapes are now hidden
on mobile by default, the shapes "blobs 02" and "blobs 03" now connect
properly, and the shape pager now shows the name of the current page.
Airy shapes now have embedded media-queries so that they're more visible
in the shape selector. The order of the pages in the shape selector has
been adapted so that shapes that are easier to use are on the first few
pages. A number of shapes have been "cut" differently to leave more
space for content, and some shapes have had their top/bottom anchoring
swapped.

task-2319484

closes odoo/odoo#57279

X-original-commit: c0f62593a4da37e8404dddc0a5762879a5ebbf7f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-08 19:35:02 +00:00
stefanorigano (SRI) cc41abf137 [IMP] web_editor: limit dropdown's thumbs size
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: 23b8ff9ab4e6609fcfb37da6975ad54315d3e701
2020-08-28 08:19:44 +00:00
e0011d883d [IMP] website: add footer "scroll-to-top" button option
Part of https://github.com/odoo/odoo/pull/56427
task-2264627

X-original-commit: b1ad74398d6f0ab7bc1795b9b80366b9fd2af66f
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
Co-authored-by: Cocographique <nmi@odoo.com>
2020-08-28 08:19:33 +00:00
Benjamin Vray e72b153fe0 [FIX] web_editor: fix snippet top options
Before this commit some top option buttons were badly positioned
(see Carousel options).

task-2312878

closes odoo/odoo#56353

X-original-commit: 196c2e72ba5b212eccd2bba7ad33c870e0a40c70
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 20:10:08 +00:00
qsm-odoo bbe117e107 [IMP] web_editor, website: introduce foldable zones in the editor UI
Now any set of widgets and rows can be placed in a we-collapse element
so that those elements can be foldable. The first element inside (or
the mentioned "string" on the we-collapse element itself) is used as the
always shown element (with a toggler on its left to toggle the
visibility of the other items).

we-collapse inside other we-collapse is supported as well.

Limitations / Other infos:

- The use of '⌙' and &emsp; characters is not automatic (yet?).
  Sometimes it actually make sense to use them without a we-collapse or
  to not use them in a we-collapse.

- The use of we-collapse is limited to widgets inside the same option.
  So unfortunately, there is no current way to add all bg image options
  in a folable section as those contain many different options. Maybe
  in the future.

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

closes odoo/odoo#56352

X-original-commit: d9c450ac97de40c71aebd487cff725bfda6a577b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 17:51:32 +00:00
qsm-odoo 9ab62a9bc6 [FIX] web_editor: allow we-title alone in an option
It was already working but not perfectly aligned.

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

X-original-commit: 95239e523b194777b58e8dd9a409a93404b44c6d
2020-08-22 17:51:32 +00:00
Samuel Degueldre 809fefbe81 [FIX] web_editor: fix small gaps between shapes and their environments
Because of the way browsers render SVGs as background images, background
SVGs will sometimes not perfectly hug the top or bottom of their
containers because of rounding in the calculation of the width from the
height, or height from the width.

This commit fixes a number of the shapes displaying this behaviour, by
making their viewbox a perfect square, this means that whenever the
width or height of the SVG is determined by the brower, it will use the
same number for the height or width respectively because the aspect
ratio is exactly one, rather than using the closest integer
approximation of the aspect ratio, which causes those artifacts.

task-2319484

closes odoo/odoo#56200

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-22 07:59:59 +00:00
Samuel Degueldre 42abf8f496 [IMP] web_editor: add webgl image filters
This commit adds webgl image filter to the existing image options,
including a custom filter that lets the user access color-correction
options (saturation, brightness, contrast, sepia, ...) as well as
blending modes for color filters.

Part of https://github.com/odoo/odoo/pull/53114
task-2279190

closes odoo/odoo#53114

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-19 08:32:23 +00:00
Samuel Degueldre 4575c188c4 [IMP] web_editor: add amount parameter to colorMatrix
When compositing filters, it is often the case that you only want to
partially apply a filter. This commit adds an optional "amount"
parameter to the colorMatrix filter, and computes a weighted average
between the identity matrix and the passed in colorMatrix. This
parameter defaults to 1, meaning the effect is applied in full if no
amount is specified.

This is a change in the webgl-image-filter library, currently awaiting
merge into upstream at https://github.com/phoboslab/WebGLImageFilter/pull/25

Part of https://github.com/odoo/odoo/pull/53114
task-2279190
2020-08-19 08:30:41 +00:00
Samuel Degueldre 2b1764d879 [ADD] web_editor: add webgl-image-filter library for image filters
Part of https://github.com/odoo/odoo/pull/53114
task-2279190
2020-08-19 08:30:15 +00:00
qsm-odoo 7ef484377a [IMP] web_editor: add delete button on snippet overlay
This commit adds a trash icon on the snippet overlay to delete the
snippet without using the left panel button.

task-2314805

closes odoo/odoo#55612

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-17 09:31:58 +00:00
stefanorigano (SRI) 772c967abd [IMP] web_editor: review 'o_we_image_weight' design
Part of https://github.com/odoo/odoo/pull/55959
task-2157252

closes odoo/odoo#55959

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-14 19:19:48 +00:00
stefanorigano (SRI) 374ce7759e [IMP] web_editor, website, *: adjust general ui spacing/alignment
*: website_form

Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:48 +00:00
stefanorigano (SRI) bc77998998 [IMP] web_editor: add 'shape' option svg icon
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:48 +00:00
qsm-odooandstefanorigano c8afa7f6bb [IMP] web_editor, *: add caret icon to dropdowns & colorpicker modal
*: website

Part of https://github.com/odoo/odoo/pull/55959
task-2157252

Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
2020-08-14 19:19:48 +00:00
stefanorigano (SRI) 2143b8a6b7 [IMP] web_editor: refine overlay handlers design and behavior
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:48 +00:00