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