summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomeo Fragomeli <rfr@odoo.com>2021-02-22 14:25:27 +0000
committerRomeo Fragomeli <rfr@odoo.com>2021-02-25 13:03:52 +0000
commit3d401a30ee7d673776c129b27dd3b298a4c7a3fe (patch)
treee3720716861ba034fd7fd968f1e33a2cb5de01aa
parent8b89a5a57bb074691cab0aed32428564bdef3a07 (diff)
[FIX] website: o_cp_top_left class doesn't exist on mobile
Before this commit, the selector 'o_cp_top_left' was used to target a descendent element. The 'o_cp_top_left' class was added in this commit odoo/odoo@533db5991a5bb871198485cd71a63f75a8c6becf But 'o_cp_top_left' class is only available on desktop. On mobile the layout of the control panel is different. This produce a bug on Mobile. After this commit, we use a less restrictive querySelector to match the element in mobile too. Note: we remove the 'div' for clarity/consistency Steps to reproduce: * Open Odoo in "Mobile mode" (small screen) * Go to Apps * Install a module that need website or website it self * You are redirect to the "chose theme" => Bug closes odoo/odoo#66613 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
-rw-r--r--addons/website/static/src/js/theme_preview_kanban.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website/static/src/js/theme_preview_kanban.js b/addons/website/static/src/js/theme_preview_kanban.js
index ff6b34b9c47..a8c573b950c 100644
--- a/addons/website/static/src/js/theme_preview_kanban.js
+++ b/addons/website/static/src/js/theme_preview_kanban.js
@@ -28,9 +28,9 @@ var ThemePreviewKanbanController = KanbanController.extend(ThemePreviewControlle
className: 'mx-2 text-muted',
innerHTML: _lt("Don't worry, you can switch later."),
});
- this._controlPanelWrapper.el.querySelector('.o_cp_top .o_cp_top_left .breadcrumb li.active').classList.add('text-black-75');
+ this._controlPanelWrapper.el.querySelector('.o_cp_top .breadcrumb li.active').classList.add('text-black-75');
this._controlPanelWrapper.el.querySelector('.o_cp_top').appendChild(websiteLink);
- this._controlPanelWrapper.el.querySelector('div.o_cp_top_left li').appendChild(smallBreadcumb);
+ this._controlPanelWrapper.el.querySelector('.o_cp_top li').appendChild(smallBreadcumb);
},
/**
* Called when user click on any button in kanban view.