diff --git a/wwwroot/api/workspace_popup.dspy b/wwwroot/api/workspace_popup.dspy index 92a5551..ff172ac 100644 --- a/wwwroot/api/workspace_popup.dspy +++ b/wwwroot/api/workspace_popup.dspy @@ -28,6 +28,7 @@ async with DBPools().sqlorContext(dbname) as sor: }] } else: + files_url = entire_url("/pipeline-sdlc/api/workspace_files.dspy") resp = { "widgettype": "PopupWindow", "options": { @@ -58,12 +59,9 @@ async with DBPools().sqlorContext(dbname) as sor: "binds": [{ "wid": "self", "event": "selected", - "actiontype": "urlwidget", - "target": "ws_files", - "options": { - "url": entire_url("/pipeline-sdlc/api/workspace_files.dspy"), - "params_mapping": {"id": "id"} - } + "actiontype": "script", + "target": "self", + "script": f"var nid=this.selected_node.user_data.id;var fp=bricks.getWidgetById('ws_files',bricks.app);if(fp)fp.setUrl('{files_url}?id='+encodeURIComponent(nid));" }] }] }, @@ -71,7 +69,7 @@ async with DBPools().sqlorContext(dbname) as sor: "widgettype": "VScrollPanel", "id": "ws_files", "options": { - "dataurl": entire_url("/pipeline-sdlc/api/workspace_files.dspy?id=__root__"), + "dataurl": files_url + "?id=__root__", "css": "filler", "padding": "8px", "gap": "4px"