[FIX] web_editor: right-align inputs only if they got an unit

Part of https://github.com/odoo/odoo/pull/42136

closes odoo/odoo#42136

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2019-12-19 10:07:08 +00:00
parent ea8f516ca0
commit 2cd95e0c75
2 changed files with 2 additions and 1 deletions
@@ -703,6 +703,8 @@ const InputUserValueWidget = UserValueWidget.extend({
this.inputEl = document.createElement('input');
this.inputEl.setAttribute('type', 'text');
this.inputEl.classList.toggle('text-left', !unit);
this.inputEl.classList.toggle('text-right', !!unit);
this.containerEl.appendChild(this.inputEl);
var unitEl = document.createElement('span');
@@ -377,7 +377,6 @@ body.editor_enable.editor_has_snippets {
border-radius: 0;
background-color: var(--o-we-bg-color-dark);
color: var(--o-we-color);
text-align: right;
}
span {
flex: 0 0 auto;