[FIX] website_blog: fix size options values when blog regular cover
Before this commit, the widget value was updated (based on the current state) prior to updating the snippet UI. As a result, the widget value reflected used the non-updated UI labels. task-3112890 closes odoo/odoo#122810 X-original-commit: edc88a2ab99673427cbeac05246b8e586b121b72 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com> Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
This commit is contained in:
@@ -39,7 +39,6 @@ options.registry.CoverProperties.include({
|
||||
* @override
|
||||
*/
|
||||
updateUI: async function () {
|
||||
await this._super(...arguments);
|
||||
const isBlogCover = this.$target[0].classList.contains('o_wblog_post_page_cover');
|
||||
if (!isBlogCover) {
|
||||
return;
|
||||
@@ -54,6 +53,7 @@ options.registry.CoverProperties.include({
|
||||
$coverFull.children('div').text(isRegularCover ? _t("Large") : this._coverFullOriginalLabel);
|
||||
$coverMid.children('div').text(isRegularCover ? _t("Medium") : this._coverMidOriginalLabel);
|
||||
$coverAuto.children('div').text(isRegularCover ? _t("Tiny") : this._coverAutoOriginalLabel);
|
||||
return this._super(...arguments);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user