Previously, double clicking an arrow to change the order of images in
the image-gallery snippet would cause the loading effect to permanently
stay and block the snippet editor completely. This was caused by the
fact that when clicking the arrow, the gallery snippet rebuilds itself
from scratch. After a snippet option is used (in this case, the
reordering arrow), we update the snippet overlay, and destroy
snippet-editors whose target is no longer in the DOM. When double
clicking, by the time we handle the second click, the target of the
option has been removed from the DOM, and the widget has been destroyed.
However, when we try to apply the option anyway, we trigger_up some
events (eg to refresh the public widgets) and wait for the trigger_up to
call back. Since the widget is already destroyed, it no longer has a
parent and trigger_up fails silently, never calling us back, and
blocking the mutex.
This commit fixes that by checking whether the widget is destroyed
before trying to apply the option, bailing immediately if it is the
case, and unlocking the mutex.
opw-2394953
closesodoo/odoo#63557
X-original-commit: b23dd1b20fbd656d40e2d8bc4a32a27652e50ee1
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
Another try at fixing the non-deterministic error in the `field_html_test > save` QUnit test which use the JW wysiwyg editor.
closesodoo/odoo#63409
X-original-commit: e3ff253e433397b05a809f1267083475b53c7fb5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
ZoneNodes are now intangible containers
closesodoo/odoo#63384
X-original-commit: b6164a683cdca4ebdbcd802166323a83be7c6fa8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Changelog:
[IMP] BundleOdooWebsiteEditor: share withIntangibles object for odoo
[FIX] *: use withIntangibles walker to find intangible ZoneNodes
[REF] Layout: ZoneNode is now intangible
[REF] Core: refactor allowEmpty
[FIX] DomHelpers, DomLayout: ensure mutation on correct vdom match
[IMP] core: move browse the arch methods into a walker object
[IMP] core: add support for not tangible container
[ADD] Small: handle <small>
[ADD] Test: some new space tests
X-original-commit: 19661cf0bb8b5ec1fb832c6a935f816da4730b20
To be able to be saved, nodes have to provide information on where to
save them. This is done through the use of data attributes. Nodes that
do not have these data attributes or are not contained within nodes that
do, should therefore not be editable.
Recent changes in Jabberwock ensure that the nodes with these data
attributes are saved either as `OdooStructureNode` or as `OdooFieldNode`
so we can simply check for these.
closesodoo/odoo#63311
X-original-commit: adf778d4bb499c6beb6b54d8093ced4f81d2ac57
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, the css of the active items considered the items
to always be <a> elements. But a PR, coming after the one who
introduced this css code, changed the items generation system and now
the items are no longer <a> elements but <div> elements.
This caused a flickering effect when hovering over the last item in
the dropdown.
Part of #62971
task-2312878
closesodoo/odoo#63112
X-original-commit: b046fb31c34fd61086a492b2b8abf59a4e205dad
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Make the element #wrapwrap be placed directly in the body as in 14.0
instead of wrapped inside containers.
FIX: [QSM] Header effects don't work in edit mode even though they are started
FIX: [QSM] The editor overlay on top of snippets does not disappear during scroll
anymore
FIX: [QSM] Click on the header, it is deletable while it should not (I precise
that here asit is a kinda different case: the header has options even though
it's not editable but it's not deletable)
closesodoo/odoo#63268
X-original-commit: e0331583cf995b7cfe7d7928918c71b51c854f2d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
1) Replace editor function that change the editor internal structure
with a new mechansim that does it automatically by observing dom
mutations. Welcome wysiwyg.withDomMutations.
2) Add a mechanism to reuse the active editor execution context
when a wysiwyg.execCommand or wysiwyg.withDomMutations is called
inside itself.
Example:
await wysiwyg.execCommand(async ()=> {
...
await wysiwyg.execCommand(()=>{...})
await wysiwyg.withDomMutations(()=>{...})
})
closesodoo/odoo#63237
X-original-commit: fe7056ccb450c9767693671e8d980a6aebacd6ab
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Changelog:
[IMP] Odoo: allow empty structure nodes
[IMP] Odoo: expand parsing range of OdooStructureNode
[FIX] DomHelpers: removeNodes only when they exist
[FIX] withDomMutations : getParentModifiers
[FIX] withDomMutations: don't get node loosely
[FIX] withDomMutations: remove the proper observer
[FIX] OdooField: do not apply empty class if placeholder
[FIX] OdooWebsiteEditor: add expected Theme plugin
X-original-commit: 537c3318a6f2751d83a011345602456125420590
Before this commit, the background-position was not removed from a
shape when it was re-flipped to its original orientation.
introduced in #61114closesodoo/odoo#63197
X-original-commit: 597585c9b8b1350bcfd84e8433ea6c82060bcc3d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, the theme colors did not update dynamic svg images
due to an inversion between key and value in the code.
closesodoo/odoo#63154
X-original-commit: 9b1916c382f105d30e7d693c0b914c05db593da0
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Changelog:
[FIX] Core,Underline: fix compilation errors after cascading
[IMP] DomHelpers: transfer dom mutation in VDocument
[IMP] Core: add iterable capacity to modifiers
[IMP] core: add cascading modifier support
[FIX] DomLayout: firefox screenshot feature
[FIX] Underline: always put <u> as deep as possible in the rendered DOM
[FIX] JWEditor: Await the new stop event mutex + adapat some tests
[FIX] EventNormalizer: Clean _triggerEventBatchOutside at destroy()
[IMP] JWEditor: Wait for all mutex to be done before stopping the editor
[FIX] Textarea: use tag name for textarea parser predicate
[IMP] Quote: add quote plugin
[FIX] DomLayout: Make sure falsy attribute values are not transformed into null
[IMP] Heading, Blockquote, Pre: do not preserve modifiers on end split
[FIX] history: change icon to be compatible with Odoo FA version (1.4.7)
[FIX] table: table-picker rendered under some buttons
[FIX] Odoo: add OdooFields css to OdooWebsiteEditor
[FIX] Color: do not color a ZoneNode
[IMP] Table: add component "Table options" button + visible on group
[IMP] Pre: never duplicate a pre on insertParagraphBreak
[IMP] Blockquote: never duplicate a blockquote on insertParagraphBreak
[FIX] List: should not have the list-style none attribute in the vDoc
[FIX] List: toggle list should removes list-style from li element
[FIX] Iframe: IframeNode should be rendered in the layout.
[ADD] Core: handle deleteHardLine
closesodoo/odoo#63006
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
What are the steps to reproduce your issue?
1. Install "stock"
2. Go to Inventory/Inventory Overview/Internal Transfer
3. Create new record and set manually a date with year < 1000 like "0008-10-10 18:35:00"
4. Save
What is currently happening?
An error arises when saving the record, and it is then no longer
possible to reopen the records or any view containing it.
This also prevents us from correcting the date to no longer have the error
Why is this happening?
The root cause is an inconsistency in `strftime` for years < 1000 [1, 2]. To take it into
account, a zero-padding is needed in the DateTime parser.
How to fix the bug?
The missing padding is added.
However, such dates lead to problematic behaviors in Python:
```
DT_FORMAT = "%Y-%m-%d %H:%M:%S"
new_date = "0008-02-05 18:10:10"
datetime.strptime(
datetime.strptime(
new_date, DT_FORMAT
).strftime(DT_FORMAT),
DT_FORMAT
)
```
This raises:
```
ValueError: time data '8-02-05 18:10:10' does not match format '%Y-%m-%d %H:%M:%S'
```
As of today there was no reported business cases where dates with year < 1000 would be
necessary. Therefore, we limit the range to years >= 1000.
[1] https://bugs.python.org/issue13305
[2] https://docs.python.org/dev/library/datetime.html#strftime-strptime-behavior
opw-2408260
closesodoo/odoo#62889
X-original-commit: b873bda1e560bc49ab707aa238fdc962f23bc1e4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
The translation editor used to save all the translations at once, which was wrong because it made it look like some text had been translated when it hadn't.
closesodoo/odoo#62699
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The table picker was hard to use because its container scrolls instead of letting it overflow.
closesodoo/odoo#61783
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
In the 12.3 editor revert, the handler for the getRecordInfo event was
removed, but the code that triggered this event was forgotten and now
doesn't do anything. This commit removes this dead code.
closesodoo/odoo#49126
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In some situation, the overlay does not reappear after disappearing.
Steps to reproduce:
1. add a title
2. add a few elements between title and footer so you can scroll title out of view
3. click title
4. scroll it out of view
5. click footer
6. scroll back up
7. click title
-> overlay is not reappearing[FIX]
Now overlay should not do that anymore.
closesodoo/odoo#62547
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit the close button cross/multiply character was wrongly
translated in some languages (e.g. Spanish)
After this commit the close button cross/multiply character is not a
translatable text anymore
https://github.com/odoo/odoo/pull/60268
task-2365792
closesodoo/odoo#62400
X-original-commit: 517e272da81e4f5ad958d896a75d4f32b44083e5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Blocks and Rainy / Airy and Zigs merged together
Fix color of Bold 5 and bold 6 shape that are not easy to use due to contrast
with black, now it is grey by default.
task-2357174
closesodoo/odoo#62352
X-original-commit: 978fcbd4f6ba9f618b69560cb5fbe26602828bcb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit Bold shape 10 & 11 had no transparent color
After this commit Bold shape 10 & 11 have a transparent color instead of
their former color #3 (#F6F6F6)
task-2357174
https://github.com/odoo/odoo/pull/59613
X-original-commit: 71b3b2d61b7acad601da38457671a20357298587
Before this commit only the first default palette color was configurable
on illustrations
After this commit all 5 default palette colors are configurable on
illustrations
task-2368585
closesodoo/odoo#60503
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Changelog:
[FIX] DomLayout: Make sure falsy attribute values are not transformed into null
closesodoo/odoo#61875
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Prior to this fix, replacing a jpeg image with an svg illustration
didn't properly update its mimetype in its dataset. As an effect, the
jpeg image options still appeared, that were irrelevant for an svg.
This was caused by a premature update of the image in Jabberwock's vdom,
before the mimetype was updated, and by the fact that the current image
was not being passed to the constructor of the media dialog, causing it
to create the image from scratch on save instead of replacing the src
attribute of the current image like it did before introducing
Jabberwock.
closesodoo/odoo#62082
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
STEPS:
* open website page with a form (e.g. /contactus)
* click edit
* slow down connection speed
* click fast between form input lines or change order of the lines
BEFORE:
* 7 svg files are requested every click
* get_authorized_fields is called every click
* random error "'classList' of undefined" in SelectUserValueWidget::close
* random similar errors when a method is called before initialization
AFTER:
* svg and get_authorized_fields are requested once
* random errors are no reproduced or it's hard to do it
* performance of switching between inputs doesn't depend on connection
speed (though, still not instant)
WHY:
* about changing in SelectUserValueWidget::close: posible reason why
this.menuTogglerEl may be undefined is because method start is async
* the other updates just implement caching
---
opw-2368928
closesodoo/odoo#62115
X-original-commit: 710784da1f02d45cbe898da426ba7e2ac63dc711
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Changelog:
[IMP] Heading, Blockquote, Pre: do not preserve modifiers on end split
[FIX] history: change icon to be compatible with Odoo FA version (1.4.7)
[FIX] table: table-picker rendered under some buttons
[FIX] Odoo: add OdooFields css to OdooWebsiteEditor
[FIX] Color: do not color a ZoneNode
[IMP] Table: add component "Table options" button + visible on group
[IMP] Pre: never duplicate a pre on insertParagraphBreak
[IMP] Blockquote: never duplicate a blockquote on insertParagraphBreak
[FIX] List: should not have the list-style none attribute in the vDoc
[FIX] List: toggle list should removes list-style from li element
[FIX] Iframe: IframeNode should be rendered in the layout.
[ADD] Core: handle deleteHardLine
closesodoo/odoo#61244
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The web editor offered in-content preview when hovering over a color to change text or background color.
This commit implements this behavior with Jabberwocky.
closesodoo/odoo#61588
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>