-
Notifications
You must be signed in to change notification settings - Fork 116
product image option plugin #4502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
duau-odoo
wants to merge
443
commits into
master-mysterious-egg
Choose a base branch
from
master-mysterious-egg-3-duau
base: master-mysterious-egg
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After dropping, we want to stay on the block tab, to drag other blocks afterwards.
+ adapt "Button" option accordingly
the wrong keyword was used in name_search throw an error in handleProps to have a clearer error
*: html_builder, web_tour Co-authored-by: Sanjay Sharma <[email protected]> Co-authored-by: Vishal Padhiyar <[email protected]> Co-authored-by: Rudra Patel <[email protected]> Co-authored-by: Rahil Ghanchi <[email protected]> Co-authored-by: Dhruv Chauhan <[email protected]>
This option is a bit special, as it is saved with a different orm call The previous implementation saves the widgets' state to the dataset of the cover's htmlelement on every edit. (in `addons/website/static/src/js/editor/snippets.options.js > options.registry.CoverProperties > _updateSavingDataset`) And on save, the dataset is used to write the model (in `addons/website/static/src/components/wysiwyg_adapter/wysiwyg_adapter.js > WysiwygAdapterComponent > _saveCoverProperties`) The new implementation has the same logic (save to dataset + write in orm on save). But has significant distinctions: - the state is read just before saving, in a `clean_for_save_handlers`, instead of on every user changes - the state is read from the dom of the html, instead of the widgets of the option - the background-image is also passed by the dataset instead of read during save to be more similar to the others - I relied on the save_plugin to only save once, instead of re-implementing the logic present in `_saveCoverProperties` that avoids several concurrent saves The labels for the sizes for blog cover were overriden in `addons/website_blog/static/src/js/options.js` > `options.registry.CoverProperties.include`
Handled a SyntaxError thrown by Element: matches().
This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged. |
1cf763b
to
0d76c5a
Compare
This also fixes a regression introduced in aa9c71f that missed to update `_selectRecord` in `addons/website_blog/static/src/js/options.js`
0d76c5a
to
b51a289
Compare
…e, .s_social_media, .s_rating, .s_hr, .s_google_map, .s_map, .s_countdown, .s_chart, .s_text_highlight, .s_progress_bar, .s_badge, .s_embed_code, .s_donation, .s_add_to_cart, .s_online_appointment, .o_snippet_drop_in_only, .s_image, .s_cta_badge, .s_accordion, .s_website_form, .s_searchbar_input, .s_card
loco-odoo
reviewed
Apr 29, 2025
addons/html_builder/static/src/website_sale/product_image_option_plugin.js
Outdated
Show resolved
Hide resolved
5934ef4
to
4e52e6e
Compare
4e52e6e
to
e911cd6
Compare
e24556e
to
897f4ab
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.