changeset 3e95aff06bda in sao:5.6
details: https://hg.tryton.org/sao?cmd=changeset;node=3e95aff06bda
description:
Remove width on editable integer and float tree widgets
The editable widgets must have a width of 100% to just fit in the cell.
issue9839
review326641002
(grafted from 14a74dd0702ea9de01b9de716fdbd970109fddae)
diffstat:
src/view/form.js | 4 +++-
src/view/tree.js | 10 ++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r eb2e0884912e -r 3e95aff06bda src/view/form.js
--- a/src/view/form.js Mon Nov 16 21:24:59 2020 +0100
+++ b/src/view/form.js Mon Nov 23 23:39:44 2020 +0100
@@ -1833,7 +1833,9 @@
Sao.View.Form.Integer._super.display.call(this);
var field = this.field;
var value = '';
- this.el.css('width', this.width + 'ch');
+ if (this.width !== null){
+ this.el.css('width', this.width + 'ch');
+ }
if (field) {
value = field.get_client(this.record, this.factor);
}
diff -r eb2e0884912e -r 3e95aff06bda src/view/tree.js
--- a/src/view/tree.js Mon Nov 16 21:24:59 2020 +0100
+++ b/src/view/tree.js Mon Nov 23 23:39:44 2020 +0100
@@ -2524,7 +2524,10 @@
Sao.View.EditableTree.Integer._super.init.call(
this, view, attributes);
Sao.View.EditableTree.editable_mixin(this);
- }
+ },
+ get width() {
+ return;
+ },
});
Sao.View.EditableTree.Float = Sao.class_(Sao.View.Form.Float, {
@@ -2533,7 +2536,10 @@
Sao.View.EditableTree.Float._super.init.call(
this, view, attributes);
Sao.View.EditableTree.editable_mixin(this);
- }
+ },
+ get width() {
+ return;
+ },
});
Sao.View.EditableTree.Selection = Sao.class_(Sao.View.Form.Selection, {