changeset dacc8442bbae in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=dacc8442bbae
description:
        Add width and height attributes on calendar view

        issue9148
        review250931003
diffstat:

 src/sao.less         |  4 ++++
 src/view/calendar.js |  7 +++++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r 6be034b9e644 -r dacc8442bbae src/sao.less
--- a/src/sao.less      Sat Mar 28 17:02:15 2020 +0100
+++ b/src/sao.less      Wed Apr 01 23:58:49 2020 +0200
@@ -211,6 +211,10 @@
     }
 }
 
+.content-box {
+    overflow-y: auto;
+}
+
 .list-form {
     overflow-y: auto;
     -moz-user-select: none;
diff -r 6be034b9e644 -r dacc8442bbae src/view/calendar.js
--- a/src/view/calendar.js      Sat Mar 28 17:02:15 2020 +0100
+++ b/src/view/calendar.js      Wed Apr 01 23:58:49 2020 +0200
@@ -66,6 +66,13 @@
                 eventClick: this.view.event_click.bind(this.view),
                 dayClick: this.view.day_click.bind(this.view),
             });
+
+            if (attributes.height !== undefined) {
+                this.view.el.css('min-height', attributes.height + 'px');
+            }
+            if (attributes.width !== undefined) {
+                this.view.el.css('min-width', attributes.width + 'px');
+            }
         },
         _parse_field: function(node, attributes) {
             this.view.fields.push(attributes.name);

Reply via email to