This commit is contained in:
yumoqing 2025-08-28 21:43:22 +08:00
parent 2805361b40
commit b06eab1abe

View File

@ -49,28 +49,26 @@ def subtable2toolbar(desc):
"icon":"{{entire_url('/imgs/" + st.subtable + ".svg')}}", "icon":"{{entire_url('/imgs/" + st.subtable + ".svg')}}",
"label": st.title "label": st.title
}) })
binds.append({ var bind = {
"wid":"self", "wid":"self",
"event":st.subtable, "event":st.subtable,
"actiontype": "urlwidget", "actiontype": "urlwidget",
"target":"PopupWindow", "target":"PopupWindow",
"params_mapping":{
"mapping":{
"id": st.field
},
"need_others": False
},
"popup_options":{ "popup_options":{
"resizable": True, "resizable": True,
"height":"70%", "height":"70%",
"width":"70%" "width":"70%"
}, },
"options":{ "options":{
"methid":"POST", "method":"POST",
"params":{}, "params":{},
"url":st.url or "{{entire_url('../" + st.subtable + "')}}" "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.toolbar.tools = tools
desc.binds = binds desc.binds = binds