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