[IMP] web_widget_numeric_step: better visualization in list view cells

This commit is contained in:
Ernesto Tejeda
2020-12-13 13:19:54 -05:00
committed by Thanakrit Pintana
parent 9403f0f3eb
commit 47541113a0
3 changed files with 15 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
.widget_numeric_step {
display: inline-flex;
}
.numeric_step_editing_cell {
min-width: 120px;
}

View File

@@ -124,9 +124,20 @@ odoo.define('web_widget_numeric_step.field', function (require) {
* @override
*/
_renderEdit: function () {
$("td.o_numeric_step_cell").addClass("numeric_step_editing_cell");
this._prepareInput(this.$el.find('input.input_numeric_step'));
},
/**
* Resets the content to the formated value in readonly mode.
*
* @override
*/
_renderReadonly: function () {
$("td.o_numeric_step_cell").removeClass("numeric_step_editing_cell");
this._super.apply(this, arguments);
},
/**
* Increase/Decrease widget input value
*