[9.0] [MIG] website_img_bg_style - #290
Conversation
d607a99 to
700e21c
Compare
700e21c to
bffc727
Compare
| @@ -0,0 +1,74 @@ | |||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | |||
| :alt: License: AGPL-3 | |||
| Known issues / Roadmap | ||
| ====================== | ||
|
|
||
| * Right now you can only select one style for every snippet. To fix that we |
There was a problem hiding this comment.
Remove this text as we are in version 9 😉
| "license": "AGPL-3", | ||
| "application": False, | ||
| "installable": True, | ||
| "external_dependencies": { |
| "summary": "Let you change styles of snippets background images", | ||
| "version": "9.0.1.0.0", | ||
| "category": "Website", | ||
| "website": "https://odoo-community.org/", |
| @@ -0,0 +1,357 @@ | |||
| @charset "UTF-8"; | |||
There was a problem hiding this comment.
Don't include this file and map one, as version 9 now generates it on the fly from sass file. Map file isn't generated in fact, but we can't maintain a possible obsolete copy of it.
| inherit_id="website.assets_frontend" | ||
| name="Website snippets background image style"> | ||
| <xpath expr="//link[last()]" position="after"> | ||
| <link href="/website_img_bg_style/static/src/css/styles.css" |
pedrobaeza
left a comment
There was a problem hiding this comment.
@cubells, I'm afraid the module is not working. I have tried it on runbot and new options don't appear.
|
@pedrobaeza It works for me. Can you check it? When you save the block, then you can see the new menu "Background style" like this: |
|
OK, there are 2 problems:
|
|
ok. I'll review. |
I see options always once block is saved if block has background. |
yajo
left a comment
There was a problem hiding this comment.
Migrating snippets to v9 is one of the hardest parts I found, because there's not much documentation but API has changed a lot.
Let's see if applying these suggestions the addon works fine.
| @if $map2 | ||
| +mix($attribute, $map2, $other: $value) | ||
|
|
||
| * |
| inherit_id="website.snippet_options" | ||
| name="Container width type chooser"> | ||
| <xpath expr="."> | ||
| <div data-snippet-option-id='background-style' |
There was a problem hiding this comment.
Replace data-snippet-option-id='background-style' by data-js="background_style".
| <li class="dropdown-submenu"> | ||
| <a href="#">Vertical</a> | ||
| <ul class="dropdown-menu"> | ||
| <li data-value="bg-top"> |
There was a problem hiding this comment.
Replace every data-value occurrence in this file by data-select_class to take advantage of new features introduced in v9 for snippet options.
Also add an element like this at the end of every option group:
<li data-select_class="">
<a>None</a>
</li>
|
All changes requested by @pedrobaeza are done:
|
| name="Container width type chooser"> | ||
| <xpath expr="."> | ||
| <div data-js='background-style' | ||
| data-selector="section, :not(.o_gallery > .container) > .carousel, .parallax"> |
There was a problem hiding this comment.
There was a problem hiding this comment.
OK I saw with you that current behaviour is best possible, so this is OK.
| <a>Rounded</a> | ||
| </li> | ||
| <li data-select_class="bg-no-repeat-h"> | ||
| <a>None</a> |
There was a problem hiding this comment.
Here I miss the <li data-select_class=""> option, although you can call it Auto this time, to avoid confusions of having 2 None options.
| <a>Rounded</a> | ||
| </li> | ||
| <li data-select_class="bg-no-repeat-v"> | ||
| <a>None</a> |
There was a problem hiding this comment.
Here I miss the <li data-select_class=""> option, although you can call it Auto this time, to avoid confusions of having 2 None options.
| name="Container width type chooser"> | ||
| <xpath expr="."> | ||
| <div data-js='background-style' | ||
| data-selector="section, :not(.o_gallery > .container) > .carousel, .parallax"> |
There was a problem hiding this comment.
OK I saw with you that current behaviour is best possible, so this is OK.
| <a>Rounded</a> | ||
| </li> | ||
| <li data-select_class="bg-no-repeat-v"> | ||
| <a>None</a> |
| <a>Rounded</a> | ||
| </li> | ||
| <li data-select_class="bg-no-repeat-h"> | ||
| <a>None</a> |
|
Travis fails, could you review please? |
|
The failure is in website_seo_redirection, not related |
|
Rebasing should fix travis now that #297 is merged. |
* Update README.rst * Updated xml files
5dc55e4 to
162d99a
Compare


@Tecnativa