| Age | Commit message (Collapse) | Author |
|
When a snippet is out of the viewport or hidden, the overlay should
not be visible. Two distinct cases we had:
- When the page is scrolled, the header is sometimes hidden thanks to
tranform: translate(0, -100%); for some kind of effect -> the header
is thus still visible but out of the viewport, any selected snippet
inside that header would still have this overlay enabled so we would
see the move and delete button on the top of the screen.
- When the page is scrolled, with the vertical header, some part of the
header are hidden for the affixed version. If any snippet in those
hidden elements was selected, the overlay is still visible floating.
task-2312878
closes odoo/odoo#58383
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benjamin Vray <bvr@odoo.com>
Co-authored-by: Thanh Dodeur <tso@odoo.com>
|
|
On editor start, "the cursor enters editable text" at a "random" time
thus switching immediately to text tools or not depending on the fact
text tools switching was initialized or not. We now only allow to do so
after some fixed delay after the editor is ready, to prevent any
automatic switching on editor start (which may break tours).
Part of https://github.com/odoo/odoo/pull/60383
task-2352339
closes odoo/odoo#60383
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
Do not switch to text tools if the cursor is in an empty oe_structure
(to encourage using snippets there and actually avoid breaking tours
which suppose the snippet list is visible).
Part of https://github.com/odoo/odoo/pull/60383
Related to task-2352339
|
|
When the overlay covers a snippet, if that snippet is at the top of
the page, the options at the top of the overlay are hidden. A system
was made to make them change position in that case but this was broken
by [1], leaving the toggling of a class for that case but without its
related scss.
This commit restores that scss and also improves the detection of that
problematic case.
[1]: https://github.com/odoo/odoo/commit/4f27e52cabb77b8b1a9637a11185ddf882adc9af
closes odoo/odoo#60464
X-original-commit: 97f11571f9e3deacc9b9e1dc0d2cc8fc6b93f15c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the
same time there is no easy way to fix it
STEPS:
* create a record with html field, e.g. project.task
* add an embedded video (File/Image icon)
* save
BEFORE: video doesn't work
AFTER: there is no option to add embedded video anymore
WHY:
* iframe tags are removed before storing html in database, so after saving a
record, embedded video doesn't work anymore
* possible fixes look too tricky for stable branches:
* new field attribute sanitize_iframe=False -- requires changes in core python framework which may have side effect
* adding iframe on client side -- the problem is that the backend doesn't
have mechanism to use animation in html fields like it's done in
website: https://github.com/odoo/odoo/blob/ced500e9bcbb5c84033463689d135ad4c7dc4f39/addons/website/static/src/js/content/snippets.animation.js#L623-L632
* adding iframe on server side -- parsing html fields in _read... Doesn't look good either
* double selector is required to make it work both in frontend and backend:
$editable.closest('.o_editable, .note-editor')
* we don't need hardcoded exception for mailing.mailing, mail.compose.message
because those fields marked as sanitized (default value)
https://github.com/odoo/odoo/blob/c92f058571b0656451f24e24154dd1bdb3bdb48a/odoo/fields.py#L1589-L1590
https://github.com/odoo/odoo/blob/c92f058571b0656451f24e24154dd1bdb3bdb48a/addons/mail/wizard/mail_compose_message.py#L115
https://github.com/odoo/odoo/blob/61734cdaf1cf6857125b1ece63928ab080359c6c/addons/mass_mailing/models/mailing.py#L77
* I don't apply this for Odoo 12, because js is refactored in Odoo 13 (e.g.
field_html.js has another name in Odoo 12)
---
opw-2353103
closes odoo/odoo#60474
X-original-commit: 2dcbac08effcedafbcf50610355752030902b16d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
|
|
Issue
- Install "Website" app
- Go to "Contact us" page on website
- Edit Page, then click on submit button to
edit form style
- Alter 'Recipient Email' by selecting a value
from 'autocomplete' values
Other input text options are also altered.
Cause
Due to chrome autocompletition, others text input fields are
also altered (like it will do with a form address).
In this case, the error was obvious since it alter also the
'Labels Width' who break the layout.
Solution
Disable autocompletition on `<input type='text'/>` options
elements.
opw-2361169
closes odoo/odoo#60470
X-original-commit: 978788bbdf1a4a3d563fd70e2af89fdd1fd039ec
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
|
|
Keep the original position of the background as a percentage. In this
way, we avoid converting in pixel a direction that we have not changed.
Part of #55857
Related to task-2318526
|
|
Before this commit, the mouseup event was not detected outside the
body element when resizing paddings.
task-2312878
closes odoo/odoo#60356
X-original-commit: 127410f9dcf9f07eba2ca9999e9427889e25f6df
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
This commit disable the pointer events on the overlay during the mouse
wheel event. To prevent page scrolling from stopping when hovering
over the overlay.
task-2312878
closes odoo/odoo#60160
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
*: web_editor
The snippet options which were specific to mass mailing were not loaded
anymore as they were loaded outside of the iframe where the edition
take places. Fortunately, the generic options were still working and
are the most important.
This bug was only revealed thanks to another bug fix which wanted to
be done in the unloaded file.
Note: this fix is a series of huge hack to make it possible and as safe
as possible in stable versions. This obviously has to be refactored in
master, if not already done.
Part of https://github.com/odoo/odoo/pull/60203
X-original-commit: 7225ce6b862c4f6b99a97732833b43189530699a
|
|
Any non `<span/>` element which was transformed into an icon thanks to
the media dialog was transform into a `<span/>` then processed by
summernote. In some cases, this processing breaks the DOM... for no
reason as the DOM should not have been transformed into a `<span/>` in
the first place: `<i/>` elements inside a `<span/>` for example should
stay `<i/>` elements after edition.
closes odoo/odoo#60200
X-original-commit: 4bfcb80e3664ccc74b7ec5e7e10ace6e44ab98d3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
Sometimes, when clicking too fast, some methods were called on a
not-fully-initialized colorpalette, which made it crash.
task-2312878
closes odoo/odoo#60171
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
*: web_editor
The selector targeting the navbar for the related editor options was
not correct to target the navbar of the 'Boxed' version of the header.
Part of https://github.com/odoo/odoo/pull/59842
task-2312878
|
|
Previously, dimensionless SVGs (SVGs with no intrinsic width or height)
were rendered with a width of 0 in the media-dialog on firefox. This is
caused by the fact that firefox reports a naturalWidth and naturalHeight
of 0 for dimensionless images, which we were relying on to compute the
image's aspect ratio. See:
https://github.com/whatwg/html/issues/3510#issuecomment-369982529
for more details on the way browsers handle dimensionless images.
This commit fixes that by giving the image a width, letting the browser
render the image, and reading the height of the rendered image to
compute the aspect ratio in the cases where the naturalHeight of the
image is 0.
task-2345120
closes odoo/odoo#59785
X-original-commit: b59208db376f738a8773d1ec88838af69fa3ef9d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
with background-sizing option, user drags background image to adjust its
position using an overlay with the same content from snippet (cloned element).
Some CSS child selector rules will not be applied since the clone element has
a different container from the snippet content.
The CSS "background-attachment" property should be the same in
both parallax snippet & its copy, this will keep the preview more "wysiwyg"
instead of getting different result when bg position saved.
This can be improved by copying all style from snippet content and
override it with overlay related style (copying all css into overlay will
not work since it will change the style of its content too)
task-2327025
closes odoo/odoo#59769
X-original-commit: aaa3e63985789ea07464a5957eb18481e70a383f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
Previously, background-images were not properly optimized when inserted,
whereas they should be just like regular images. This commit fixes that.
It also changes the default quality (used for automatic optimization) to
75 as the difference is not usually very noticeable but can bring a big
decrease in image size.
task-2357332
closes odoo/odoo#59587
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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#59425
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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#59240
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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#58143
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
|
|
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#59098
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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#56739
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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.
closes odoo/odoo#58678
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
|
|
task-2312878
closes odoo/odoo#56161
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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#57927
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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#58638
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
*: 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
|
|
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
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
* 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#58470
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
task-2312878
closes odoo/odoo#56920
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
Before this commit the overlay of an image was not updated when the
image was replaced by another.
task-2312878
closes odoo/odoo#58328
X-original-commit: d4641b5bdc2b05523e29fb87a3b953dea90fbd8a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
Fix the design. Trig animations hovering any part of the button rather
than its inner image only.
task-2335267
part-of: #57942
|
|
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#57947
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
*: 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#57975
Related: odoo/design-themes#364
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
*: 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
|
|
*: 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
|
|
*: 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
|
|
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#58026
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
|
|
*: 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#56479
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
|
|
- 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#55614
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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
|
|
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
|
|
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.
|
|
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#57561
X-original-commit: 315be6f4765268eada4b39a637136c86a30720eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
|
|
* 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#56208
Related: odoo/enterprise#12539
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
|
|
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#56567
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
|
|
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   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#56350
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
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>
|
|
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>
|
|
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
closes odoo/odoo#55959
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
|
|
*: website_form
Part of https://github.com/odoo/odoo/pull/55959
task-2157252
|