changeset 6be034b9e644 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=6be034b9e644
description:
        Override max and min height of treeview and list-form inside a widget

        The default values must be overridden to let the view expand up to the 
widget
        height.

        issue9162
        review256771004
diffstat:

 src/view/form.js |  12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diffs (29 lines):

diff -r c9e7857a55e9 -r 6be034b9e644 src/view/form.js
--- a/src/view/form.js  Sat Mar 28 00:35:48 2020 +0100
+++ b/src/view/form.js  Sat Mar 28 17:02:15 2020 +0100
@@ -3069,6 +3069,12 @@
                 }
                 this.screen.size_limit = size_limit;
                 this.screen.display();
+                if (this.attributes.height !== undefined) {
+                    this.screen.current_view.el
+                        .find('.treeview,.list-form').first()
+                        .css('min-height', this.attributes.height + 'px')
+                        .css('max-height', this.attributes.height + 'px');
+                }
             }.bind(this));
         },
         focus: function() {
@@ -3461,6 +3467,12 @@
                     this.screen.set_group(new_group);
                 }
                 this.screen.display();
+                if (this.attributes.height !== undefined) {
+                    this.screen.current_view.el
+                        .find('.treeview,.list-form').first()
+                        .css('min-height', this.attributes.height + 'px')
+                        .css('max-height', this.attributes.height + 'px');
+                }
             }.bind(this));
         },
         focus: function() {

Reply via email to