From f6522e744b67e190dc9898f89f648cca77f6aeb8 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 12 Jul 2025 10:08:00 +0800 Subject: [PATCH] bugfix --- singletree.py | 2 ++ tmpls.py | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/singletree.py b/singletree.py index 60ddf34..6b56629 100644 --- a/singletree.py +++ b/singletree.py @@ -14,6 +14,8 @@ ui_tmpl = """ { "widgettype":"Tree", "options":{ + "width":"100%", + "height":"100%", {% if not notitle %} {% if title %} "title":"{{title}}", diff --git a/tmpls.py b/tmpls.py index 3143085..a93dcdd 100644 --- a/tmpls.py +++ b/tmpls.py @@ -3,6 +3,8 @@ data_browser_tmpl = """ "id":"{{tblname}}_tbl", "widgettype":"Tabular", "options":{ + "width":"100%", + "height":"100%", {% if not notitle %} {% if title %} "title":"{{title}}", @@ -17,6 +19,9 @@ data_browser_tmpl = """ "toolbar":{{json.dumps(toolbar, indent=4, ensure_ascii=False)}}, {% endif %} "css":"card", +{% if editor %} + "editor":{{json.dumps(editor, indent=4, ensure_ascii=False)}}, +{% endif %} {% if not noedit %} "editable":{ "new_data_url":{%- raw -%}"{{entire_url('add_{%- endraw -%}{{summary[0].name}}{%- raw -%}.dspy')}}",{%- endraw %} @@ -38,9 +43,6 @@ data_browser_tmpl = """ {% if browserfields %} "browserfields": {{json.dumps(browserfields, indent=4, ensure_ascii=Fasle)}}, {% endif %} -{% if editor %} - "editor":{{json.dumps(editexclouded, indent=4, ensure_ascii=False)}}, -{% endif %} {% if editexclouded %} "editexclouded":{{json.dumps(editexclouded, indent=4, ensure_ascii=False)}}, {% endif %}