From b06eab1abe3a286b6950e5526d35c2da6fe6ae62 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 28 Aug 2025 21:43:22 +0800 Subject: [PATCH] bugfix --- xls2crud.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/xls2crud.py b/xls2crud.py index 60f7267..84c159e 100644 --- a/xls2crud.py +++ b/xls2crud.py @@ -49,28 +49,26 @@ def subtable2toolbar(desc): "icon":"{{entire_url('/imgs/" + st.subtable + ".svg')}}", "label": st.title }) - binds.append({ + var bind = { "wid":"self", "event":st.subtable, "actiontype": "urlwidget", "target":"PopupWindow", - "params_mapping":{ - "mapping":{ - "id": st.field - }, - "need_others": False - }, "popup_options":{ "resizable": True, "height":"70%", "width":"70%" }, "options":{ - "methid":"POST", + "method":"POST", "params":{}, "url":st.url or "{{entire_url('../" + st.subtable + "')}}" } - }) + }; + if (st.params_mapping){ + bind.params_mapping = st.params_mapping; + } + binds.append(bind); desc.toolbar.tools = tools desc.binds = binds