changeset ab0186469178 in sao:5.8
details: https://hg.tryton.org/sao?cmd=changeset;node=ab0186469178
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 d3cfae178313 -r ab0186469178 src/view/form.js
--- a/src/view/form.js  Mon Nov 23 23:37:58 2020 +0100
+++ b/src/view/form.js  Mon Nov 23 23:39:44 2020 +0100
@@ -1853,7 +1853,9 @@
             var field = this.field,
                 record = this.record;
             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(record, this.factor);
             }
diff -r d3cfae178313 -r ab0186469178 src/view/tree.js
--- a/src/view/tree.js  Mon Nov 23 23:37:58 2020 +0100
+++ b/src/view/tree.js  Mon Nov 23 23:39:44 2020 +0100
@@ -2648,7 +2648,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, {
@@ -2657,7 +2660,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, {

Reply via email to