[FIX] website: theme customization modal crash
When clicking on customize theme button or going on an url which contains the theme=true option, the theme customization modal failed to be launched as we did not wait for website to be ready.
This commit is contained in:
@@ -301,11 +301,15 @@ function theme_customize() {
|
||||
|
||||
website.TopBar.include({
|
||||
start: function () {
|
||||
this.$el.on('click', "#theme_customize a", theme_customize);
|
||||
if ((window.location.hash || "").indexOf("theme=true") !== -1) {
|
||||
theme_customize();
|
||||
window.location.hash = "";
|
||||
}
|
||||
var self = this;
|
||||
base.ready().then(function () {
|
||||
self.$el.on('click', "#theme_customize a", theme_customize);
|
||||
if ((window.location.hash || "").indexOf("theme=true") !== -1) {
|
||||
theme_customize();
|
||||
window.location.hash = "";
|
||||
}
|
||||
});
|
||||
|
||||
return this._super();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user