Commit Graph
2358 Commits
Author SHA1 Message Date
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) 9587202dec [FIX] web_editor: review indentation of shape icons
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
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
stefanorigano (SRI) 0431c49790 [IMP] web_editor: allow 'we-button-group' to increase its size
Allow 'we-button-group' to increase its size when it's the only option
inside an option field.

Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
stefanorigano (SRI) aa69ba54e8 [IMP] web_editor, *: make general adaptations of the editor UI
*: website

Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
stefanorigano (SRI) 5f48af4570 [IMP] web_editor: increase font-size/spacing of the editor UI
11px was set as default font-size when achieving 5 or 6 edition levels
in the sidebar was the norm. Thanks to the snippet's cleanup, resulting
in a reduced number of editable elements, we can now increase the
default fon-size and, consequentially, all general spacings.

Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
stefanorigano (SRI) ab3ebfb96d [IMP] web_editor, *: review 'options' tab specific components design
*: website

Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
stefanorigano (SRI) 4cfe66cebd [IMP] web_editor: review colorpicker selected color visibility
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
stefanorigano (SRI)andqsm-odoo fdbcf87228 [IMP] web, web_editor: review colorpicker design
Part of https://github.com/odoo/odoo/pull/55959
task-2157252

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14 19:19:47 +00:00
stefanorigano (SRI)andqsm-odoo 95cbf79325 [FIX] web_editor: properly toggle the disabled prop of the "Style" tab
Part of https://github.com/odoo/odoo/pull/55959
task-2157252

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14 19:19:47 +00:00
stefanorigano (SRI) 93176bf3d7 [REF] web_editor, website: allow reusing tabs design
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
stefanorigano (SRI)andqsm-odoo 5bcdcbceaa [IMP] web_editor, website: review snippets library design
Especially review disabled, hover, install and custom snippet states.

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

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-14 19:19:47 +00:00
stefanorigano (SRI) f3e3e25938 [IMP] web_editor: review we-customizeblock-options border
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
2020-08-14 19:19:47 +00:00
Nasreddin (bon) a137f22363 [FIX] web_editor: Multi-company error when adding image to task description
Issue

	- Select "My Company (Chicago)" as current company
	- Open "Projects" module
	- Create a new Task
	- Edit description, upload a new Image and add it to description.

	Multi-company error "Write" on project.task .
	In frontend, can optimize uploaded picture.

Causes

	Wrong "allowed_company_ids" value in context.

Solution

	Remove allowed companies from context to avoid allowed_company_ids
	which may erroneously restrict based on website.

opw-2304511

closes odoo/odoo#55897

X-original-commit: 8f6506a57853040d065569fdd60f9d94be8e26e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-08-13 16:22:18 +00:00
qsm-odoo c5fee9d009 [FIX] web_editor, *: restore custom snippets thumbnails
*: website

Since [1], the thumbnails of the saved snippets were not right anymore,
all fallbacking to the default image. This is because snippets thumbs
now use svg files instead of png and the snippet saving feature did not
allow it. This commit fixes that and makes the feature more robust.

- Allow to use any original thumbnail, and not only for website app.
- Remove useless defaut image, a fallback for when the feature is broken
  is useless.
- Identify snippets by key instead of by main class (possible since
  the new `data-snippet` attribute on snippets).

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

closes odoo/odoo#55896

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-13 15:44:48 +00:00
xO-Txandqsm-odoo 41527531b7 [IMP] web_editor, *: add snippets search filter
*: website

Add a search bar at the top of the "Blocks" tab to filter snippets.

Part of https://github.com/odoo/odoo/pull/55272
task-2309832

closes odoo/odoo#55272

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-08-13 14:29:20 +00:00
qsm-odoo 8a48e99e19 [IMP] web_editor: prevent removing data-oe attrs of snippets thumbs
Before this commit, all the data-oe-* attributes were removed from
the snippet panel on editor loading. Some were actually added then
removed by the same function... probably for historic reasons. All of
this is now useless, this commit takes also the opportunity to modernize
that all code section and removes other code which was there for
compatibility reasons too.

Now, the data-oe-* on snippets thumbs are kept (as some will actually
be used by upcoming commits). This commit just makes sure no data-oe-*
is left on the snippet bodies themselves.

Part of https://github.com/odoo/odoo/pull/55272
task-2309832
2020-08-13 14:25:06 +00:00
qsm-odoo f563b0c782 [IMP] web_editor: allow min, max and step param on range widget
Part of https://github.com/odoo/odoo/pull/47313
task-46147
2020-08-10 14:27:00 +00:00
qsm-odoo 42e1d4ca60 [IMP] website, *: enable the parallax option for all snippets
*: web_editor, website_blog

Unfortunately, this feature revealed a new batch of flaws in the
editor widgets system so some hacks were made to make it work. We will
always have the time to improve the pure technical side later.

This commit also separates the notion of color filter from the notion
of parallax. A color filter can now be applied independantly, when
there is either a background image or a background video. Applying a
color filter on top of a background video is actually a new feature.
Applying a color filter on top of a background image is actually now
achievable by two different ways: this new color filter layer or by
applying the color transformation on the image itself via the related
option. Depending on the user case, both could make sense at the same
time, but more importantly: having a CSS color filter is useful for
using those for default Odoo content (e.g. like the current contact us
page where we use a cover banner with an image with a black filter on
top of it: doing that without CSS color filter would mean to alter the
image directly which would not be ok when the user changes the image).
Also, sometimes you want the unfiltered image on a page and the exact
same one but filtered on another (for example: forum images).

Note: this commit also "fixes" an issue: the optimization feature for
images when parallax was enabled was not available before.

Part of https://github.com/odoo/odoo/pull/47313
task-46147
2020-08-10 14:27:00 +00:00
Benjamin Vray 798fa36471 [IMP] website, *: add missing options previews
*: web_editor, website_blog, website_form

task-2280397

closes odoo/odoo#53516

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-10 14:51:30 +00:00
stefanorigano (SRI) 9830ee75e0 [IMP] web_editor: restore bootstrap's default monospace font-family
Part of https://github.com/odoo/odoo/pull/55645
task-2157252

closes odoo/odoo#55645

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07 22:14:22 +00:00
stefanorigano (SRI) 4c6775ee6c [IMP] web_editor: review dropdown design
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:14:22 +00:00
stefanorigano (SRI) b7098ddf2c [IMP] web_editor, website: review color combination preview
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:18 +00:00
stefanorigano (SRI) b8717c5b72 [FIX] web_editor: use border-radius on we-button-group edge buttons only
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:18 +00:00
stefanorigano (SRI) 36a8e2a791 [REF] web_editor, *: allow reusing links and buttons design
*: website

Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:18 +00:00
stefanorigano (SRI) 0838a211fa [FIX] web_editor: fix typos on variable definitions
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:17 +00:00
stefanorigano (SRI) eb98420c11 [REM] web_editor: remove <img/> tag support in snippets library
Since v13, snippet's thumbs are rendered as background images using the
't-snippet' instruction.
This code was kept for back-compatibility.

Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:17 +00:00
stefanorigano (SRI) bc7d021946 [IMP] web_editor: review range widget dimensions
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:17 +00:00
stefanorigano (SRI) 25acf9b176 [IMP] web_editor: change editor panel default font-weight
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:17 +00:00
stefanorigano (SRI) a0c324ee7b [IMP] web_editor: reposition snippets' thumbs
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:17 +00:00
stefanorigano (SRI) 8d5003db99 [IMP] web_editor: make some color adjustments for editor panel
Part of https://github.com/odoo/odoo/pull/55645
task-2157252
2020-08-07 22:13:17 +00:00
Samuel Degueldre b84e0af742 [IMP] web_editor, website: add background shapes snippet option
This commit adds a new snippet option allowing the user to choose one of
a series of SVG shapes as their background, or to be overlaid over the
background image of a snippet and to customize the colors of those
shapes.

Part of https://github.com/odoo/odoo/pull/53017
task-2210790

closes odoo/odoo#53017

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07 15:34:45 +00:00
Samuel Degueldre c3dacfea05 [IMP] web_editor, website, *: create background-type toggler option
*: website_blog

Previously, background colors, images, and videos could all be applied
on the same section, such that the image can be used as a fallback for
the video, and the color as a fallback for the image. However, if you
wanted to change the background color behind the background image, the
background image would be removed. The background image and background
video also shared the same widget to pick the image or video.

This commit adds a background-type toggler, where the user can toggle
the background color, image and video individually. It also makes the
video picker into its own UserValueWidget, such that the user can pick
both an image and video without overriding the other.

Part of https://github.com/odoo/odoo/pull/53017
task-2210790
2020-08-07 15:34:45 +00:00
qsm-odoo 5c05592032 [IMP] web_editor: remove check icon for default active buttons
Before this commit, the enabled state of we-button element was a
"pressed-like" background + a check icon. This check icon was then
explicitely removed for we-button extension such as checkboxes and
button groups' buttons. Now, the enabled state does not contains that
check icon by default and it is explicitely added for selects' buttons.

Part of https://github.com/odoo/odoo/pull/53017
task-2210790
2020-08-07 15:15:52 +00:00
Samuel Degueldre 995b20fd6a [REF] web_editor: move normalizeColor function to we-utils for reuse
Part of https://github.com/odoo/odoo/pull/53017
task-2210790
2020-08-07 15:15:52 +00:00
qsm-odoo 201e10b338 [FIX] web_editor: remove useless snippet preview notification
Before this commit, the 'snippet_option_update' event was triggered
whether or not it was a preview update. In the preview update case,
nothing was done, ever. This commit removes the preview notification.
If it ever becomes useful, it can be restored at that moment.

This commit actually solves a bug introduced by [1]: that snippet update
notification is now triggered after a setTimeout delay to allow events
to bubble before the UI update it will trigger (in non preview mode).
The side effect this had was that, between each preview, the execution
chain was deferred of a setTimeout delay between each step (even though
previews do not update the UI). This was enough to allow for a paint
refresh.
So before this commit, if option C was selected, then the user hovered
option A then option B, the option C was visually re-enabled between A
and B. This won't be the case anymore after this commit.

Long story short: restore no-flickering when previewing options.

[1]: https://github.com/odoo/odoo/commit/2616c8950fd615561e720660bcc39e018f4061e4

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

closes odoo/odoo#55588

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-08-07 08:52:19 +00:00
qsm-odoo 315ba1cfeb [IMP] web_editor, *: simplify UserValueWidget updates
*: website

Before this commit, editor widgets were updated by 3 successive calls
to methods 'setValue', 'updateUI' and '_updateUI'. The last two were
in charge of updating the UI depending of the value that was set, only
in specific condition (like "if the widget is not focused", "or not
previewed", ...).

This is now in fact useless: 'setValue' can be in charge of the UI
update. Indeed, when a value is set on a widget there is no reason to
not update its UI anymore. This was useful when the UI was updated on
preview, which is not the case anymore. This could also be useful for
widget with multiple options attached to them... but in those rare cases
updating the UI multiple times (one time per option method) should not
be a problem.

Part of https://github.com/odoo/odoo/pull/55588
2020-08-07 08:51:23 +00:00
qsm-odoo 6a258db1e9 [IMP] website, *: review the 'options' tab of editor panel
*: web_editor

This will more probably change again in the future but this is a first
step towards a hierarchized 'options' tab for the editor panel.

Part of https://github.com/odoo/odoo/pull/55529
2020-08-06 09:42:48 +00:00
qsm-odoo 90033c95ea [FIX] website: prevent page flickering when modal is opened
Commit [1] introduced a flickering when any modal was opened on the
frontend. Indeed, it introduced the possibility to go into "fullscreen"
mode, which makes the Odoo UI navbar and sidebar disappear. This is
animated: the padding of the `<body/>` element is using a CSS
transition... but when a Bootstrap modal opens, the padding-right is
changed to compensate the scrollbar removal. This change now being
animated, it creates a flickering.

A generic solution was made: only animate what is animated for the
duration of the fullscreen mode switch.

[1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660

closes odoo/odoo#55210

X-original-commit: ccadb20c82a651e9ef87e818b898f3e9a081cacd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-07-30 14:50:04 +00:00
DramixDwandqsm-odoo bdcc1ea9e7 [IMP] website_blog: add tag from frontend (editor left panel)
Previously, you could only add a tag on a blog post from the backend.
Here we're adding a way to add them from the left-panel so that it's
easier for the user to add them.

The long term goal will not be to reimplement complex view of the
backend. This is actually already past the limit: we will need a way
to instantiate views from the backend in the frontend in the future.

Part of https://github.com/odoo/odoo/pull/52759
task-2267693

closes odoo/odoo#52759

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-31 10:32:22 +00:00
stefanorigano (SRI)andqsm-odoo a1c9044ff7 [IMP] web_editor: render inline svg icons, apply css style
Render inline SVG inside buttons in order to allow CSS styling.

Define SVG icons design for normal/hover status applying the same colors
as default text buttons.

In order to support multi-colors SVGs, this commits will affect inner
shapes in different ways:
- '.o_graphic' shapes: will gets the UI btns colors (default/hover)
- '.o_subdle' shapes: will gets a slightly reduced default text color

Shapes without '.o_graphic/.o_subdle' classes will be rendered normally,
as defined in the svg code.

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

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-30 11:12:03 +00:00
stefanorigano (SRI)andqsm-odoo c0a11148e0 [IMP] web_editor: review snippets thumbs design
Part of https://github.com/odoo/odoo/pull/55089
task-2157252

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-30 10:12:58 +00:00
qsm-odoo 430b5b669f [IMP] website, *: move all google map options to left panel
*: web_editor

-> Introduce the we-gpspicker widget and improve the way the gmap lib
    is loaded (for Odoo / multiple snippets / ...).

Part of https://github.com/odoo/odoo/pull/49101
task-2091396
2020-07-28 07:45:40 +00:00
Nicolas Lempereur fff793f7d7 [FIX] web_editor: carriage return in source mode
Enter keypress browser event were removed in 3c372d1da8.

It was reintroduced in text fields with d2f024d254 and this PR do the
same and reintroduce it for source mode of FieldHtml (`html` widget).

opw-2302605
closes #55066

closes odoo/odoo#55081

X-original-commit: b10ca1f6094b7c8e6e222aa0ea3d1f891e79379a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-07-28 18:16:22 +00:00
6aa6c321a6 [IMP] web: remove min date limitation of year 1900
Before this commit, user could not selecta a date before year 1900.
This was an historical limitation due to python < 3.2 that didn't
support dates before 1900.

After this commit, user can select any date, user can select any
date from 01/01/0001.

taskID: 2166761
Fixes #41788
Closes #43055

closes odoo/odoo#51406

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2020-07-28 14:02:10 +00:00
Benjamin Vray 4848c3aed7 [FIX] web_editor: fix overlay when scrolling
Since the new effects on the header, the overlays do not overlap
correctly after the page has been scrolled. Now we hide the overlays
during the scrolling and show/recompute it after the scrolling.

Part of https://github.com/odoo/odoo/pull/51446
task-2229127

X-original-commit: 209a94d8c4fcdc2e74860c9392fc14a35aec52ed
2020-07-28 12:20:16 +00:00