summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/less
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-12-07 14:41:40 +0100
committerqsm-odoo <qsm@odoo.com>2017-02-14 16:37:23 +0100
commit198673bf35f14e3a797d2ff09208a289e12bec4e (patch)
tree47ba812ac98d778fb3dcefbe27ddfdad7389ab90 /addons/web_editor/static/src/less
parent7751c1bfb92f4e747ddade50f6091cf998c3fe7d (diff)
[ADD] web_editor, website, web: new LESS editor
The old "HTML" editor now handles LESS edition. The editor has now a button to switch between XML and LESS edition. By default, it only displays the odoo files which only appear in the assets_frontend bundle and in debug mode, it allows to see all the files that influenced the page design. The new editor has a new set of options which allows to use it as a xml editor only or a less editor only if needed. Also: make the "include bundles" option appear only in debug mode. Technical details: - When saving a modified LESS file, an attachment is created with the full modified content and an extension view xpaths the bundle where the original file was added to link this attachment instead. This relies on the fact that qweb, when generating assets bundle, replaces missing files by the "datas" contents of the ir.attachment's which have an "url" field equal to the urls it is searching. - If a LESS error is introduced, the recent changes in assets bundle generation (see c248674a5c615c9db113357eec9d9adaf50b888e) will not break the design but only open a dialog on page loading, with the LESS error. The user can then go to the LESS editor and reset its changes. This feature code has been started with original work of @pga-odoo
Diffstat (limited to 'addons/web_editor/static/src/less')
-rw-r--r--addons/web_editor/static/src/less/web_editor.ui.components.less7
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/less/web_editor.ui.components.less b/addons/web_editor/static/src/less/web_editor.ui.components.less
index 9d40da2a9f3..709e9b03b2e 100644
--- a/addons/web_editor/static/src/less/web_editor.ui.components.less
+++ b/addons/web_editor/static/src/less/web_editor.ui.components.less
@@ -135,11 +135,16 @@
.o-justify-content(space-between);
padding: @grid-gutter-width/4;
+ > .o_ace_type_switcher > button::after {
+ .o-caret-down();
+ margin-left: 4px;
+ }
+
> * {
.o-flex(0, 0, auto);
margin: 0 @grid-gutter-width/4;
- &.oe_include_bundles {
+ &.o_include_option {
.o-flex-display();
.o-align-items(center);
font-size: 11px;