[IMP] web_editor: add left panel input on a new line by default

Before this commit, inputs were always a title followed by the <input/>
on the same line.

Now it follows the same logic as we-row elements: title on a line,
<input/> on a new line, except if the 'o_we_inline' class is used.

Part of https://github.com/odoo/odoo/pull/41402
This commit is contained in:
qsm-odoo
2019-12-06 09:45:30 +00:00
parent e4d4aab042
commit a41717bebf
3 changed files with 23 additions and 20 deletions
@@ -358,8 +358,13 @@ body.editor_enable.editor_has_snippets {
we-input {
flex: 1 1 auto;
@extend we-row.o_we_inline;
display: flex;
flex-wrap: wrap;
align-items: center;
> we-title {
min-width: 100%;
}
> input {
flex: 1 1 auto;
width: 0;
@@ -391,26 +396,18 @@ body.editor_enable.editor_has_snippets {
}
}
&.o_we_inline {
display: flex;
align-items: center;
> we-title {
min-width: 60%;
margin-right: 5%;
}
}
we-select {
position: static;
}
}
we-input {
flex-wrap: wrap;
.o_we_inline {
display: flex;
align-items: center;
> we-title {
min-width: 95%;
}
> we-title {
min-width: 60%;
margin-right: 5%;
}
}
+9 -3
View File
@@ -1122,7 +1122,9 @@
<we-divider/>
<we-button data-select-class="s_carousel_default">Default</we-button>
</we-select>
<we-input string="Speed" data-select-data-attribute="0s" data-attribute-name="interval" data-unit="s" data-save-unit="ms" data-step="0.1"/>
<we-input string="Speed" class="o_we_inline"
data-select-data-attribute="0s" data-attribute-name="interval"
data-unit="s" data-save-unit="ms" data-step="0.1"/>
</div>
<div data-js="CarouselItem"
@@ -1304,9 +1306,13 @@
data-exclude=".s_col_no_bgcolor, .s_col_no_bgcolor.row > div, .o_gallery .row > div">
<we-row string="Border" class="o_we_inline">
<we-colorpicker data-select-style="true" data-css-property="border-color" data-color-prefix="border-"/>
<we-input data-select-style="0" data-css-property="border-width" data-unit="px" data-extra-class="border"/>
<we-input class="o_we_inline"
data-select-style="0" data-css-property="border-width"
data-unit="px" data-extra-class="border"/>
</we-row>
<we-input string="Rounded" data-select-style="0" data-css-property="border-radius" data-unit="px" data-extra-class="rounded"/>
<we-input string="Rounded" class="o_we_inline"
data-select-style="0" data-css-property="border-radius"
data-unit="px" data-extra-class="rounded"/>
<we-checkbox string="Shadow" data-select-class="shadow"/>
</div>
+1 -1
View File
@@ -60,7 +60,7 @@
<div data-js="WebsiteSaleGridLayout"
data-selector="#products_grid .o_wsale_products_grid_table_wrapper > table"
data-no-check="true">
<we-input string="Number of products" data-set-ppg="" data-no-preview="true"/>
<we-input string="Number of products" class="o_we_inline" data-set-ppg="" data-no-preview="true"/>
<we-select string="Number of Columns" class="o_wsale_ppr_submenu" data-no-preview="true">
<we-button data-set-ppr="2">2</we-button>
<we-button data-set-ppr="3">3</we-button>