Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] website, *: restore theme/new content loader
*: test_website_modules This commit restores the display of the website loader (the "Building your website" GIF) during the installation of a module from the new content modal, or after completing the configurator flow. Follows the merge of the "website in backend" task at [1]. [1]: odoo@31cc10b task-2687506 Part-of: odoo#81485
- Loading branch information
Showing
15 changed files
with
118 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
28 changes: 28 additions & 0 deletions
28
addons/website/static/src/components/website_loader/website_loader.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** @odoo-module **/ | ||
|
||
const { Component, useState } = owl; | ||
|
||
export class WebsiteLoader extends Component { | ||
setup() { | ||
const initialState = { | ||
isVisible: false, | ||
title: '', | ||
showTips: false, | ||
}; | ||
|
||
this.state = useState({ | ||
...initialState, | ||
}); | ||
this.props.bus.on('SHOW-WEBSITE-LOADER', this, (props) => { | ||
this.state.isVisible = true; | ||
this.state.title = props && props.title; | ||
this.state.showTips = props && props.showTips; | ||
}); | ||
this.props.bus.on('HIDE-WEBSITE-LOADER', this, () => { | ||
for (const key of Object.keys(initialState)) { | ||
this.state[key] = initialState[key]; | ||
} | ||
}); | ||
} | ||
} | ||
WebsiteLoader.template = 'website.website_loader'; |
34 changes: 34 additions & 0 deletions
34
addons/website/static/src/components/website_loader/website_loader.scss
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.o_website_loader_container { | ||
font-family: "Montserrat", $font-family-sans-serif; | ||
background-color: rgba($o-shadow-color, .9); | ||
pointer-events: all; | ||
font-size: 3.5rem; | ||
justify-content: space-evenly; | ||
z-index: $zindex-modal - 1; | ||
padding: 7%; | ||
|
||
.o_website_loader { | ||
position: relative; | ||
display: inline-block; | ||
width: 400px; | ||
height: 220px; | ||
background-image: url('/website/static/src/img/theme_loader.gif'); | ||
background-size: cover; | ||
border-radius: 6px; | ||
} | ||
|
||
.o_website_loader_tip { | ||
font-size: 0.5em; | ||
@include media-breakpoint-down(md) { | ||
width: 50% !important; | ||
} | ||
|
||
.o_tooltip { | ||
top: auto !important; | ||
bottom: 11px !important; | ||
left: 0 !important; | ||
margin-right: 7px !important; | ||
padding-left: 33px !important; | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
addons/website/static/src/components/website_loader/website_loader.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<templates id="template" xml:space="preserve"> | ||
<t t-name="website.website_loader" owl="1"> | ||
<div t-if="state.isVisible" class="o_website_loader_container position-fixed fixed-top fixed-left | ||
h-100 w-100 d-flex flex-column align-items-center text-white font-weight-bold text-center"> | ||
<t t-if="state.title" t-esc="state.title"/> | ||
<t t-elif="state.showTips">Building your website...</t> | ||
<div class="o_website_loader"/> | ||
<p class="o_website_loader_tip w-25"> | ||
<t t-if="state.showTips"> | ||
TIP: Once loaded, follow the | ||
<span class="o_tooltip o_tooltip_visible bottom o_animated position-relative"></span> | ||
<br/>pointer to build the perfect page in 7 steps. | ||
</t> | ||
</p> | ||
</div> | ||
</t> | ||
</templates> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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