-
- Downloads
[IMP] website, *: optimize scss customizations
* web_editor This commit's goal is to optimize the delay to make a scss customization thanks to the website customize dialog. Before this commit, the JS code took advantage of existing web_editor routes but this was far from efficient as this was done: 1) PY: Load all scss files used in the page 2) JS: Find the one we want to customize and adapt the scss content 3) PY: Create the scss customization with the new content (So two RPC (including one very slow) and content building in javascript) After this commit, this is done: 1) PY: Load the scss file being customized, adapt its content according to the new values and save the customization (So the whole logic is in python, requiring only one small RPC) This commit also take the opportunity to review the web_editor ace editor loading code (the logic is shared with website customizations). PR https://github.com/odoo/odoo/pull/29624 task-1904244
Showing
- addons/web_editor/controllers/main.py 103 additions, 174 deletionsaddons/web_editor/controllers/main.py
- addons/web_editor/models/__init__.py 2 additions, 0 deletionsaddons/web_editor/models/__init__.py
- addons/web_editor/models/assets.py 279 additions, 0 deletionsaddons/web_editor/models/assets.py
- addons/web_editor/static/src/js/common/ace.js 2 additions, 2 deletionsaddons/web_editor/static/src/js/common/ace.js
- addons/website/controllers/main.py 37 additions, 0 deletionsaddons/website/controllers/main.py
- addons/website/models/assets.py 38 additions, 21 deletionsaddons/website/models/assets.py
- addons/website/static/src/js/widgets/theme.js 4 additions, 38 deletionsaddons/website/static/src/js/widgets/theme.js
Loading
Please register or sign in to comment