fix: workspace popup render - use resizebox instead of content_w
This commit is contained in:
parent
8908112a65
commit
16a51e2c83
@ -115,7 +115,7 @@
|
||||
"event": "click",
|
||||
"actiontype": "script",
|
||||
"target": "self",
|
||||
"script": "fetch('/pipeline-sdlc/api/cockpit_context.dspy').then(function(r){return r.json()}).then(function(d){var pid=d.project_id||'';var pn=d.project_name||'';if(!pid){var pw=new bricks.PopupWindow({title:'提示',cwidth:30,cheight:8,auto_open:true});pw.content_w.add_widget(new bricks.Text({text:'请先选择项目',cfontsize:1,color:'#64748b',padding:'20px'}));return;}var pw=new bricks.PopupWindow({title:pn+' - 工作空间',cwidth:80,cheight:36,auto_open:true});var tv={'widgettype':'Tree','id':'ws_tree','options':{'dataurl':'/pipeline-sdlc/api/workspace_tree.dspy','css':'filler','padding':'4px','cheight':'100%'},'binds':[{'wid':'self','event':'selected','actiontype':'urlwidget','target':'ws_files','options':{'url':'/pipeline-sdlc/api/workspace_files.dspy'}}]};var fv={'widgettype':'VScrollPanel','id':'ws_files','options':{'css':'filler','padding':'8px','gap':'4px'}};var hsplit={'widgettype':'Splitter','options':{'direction':'horizontal','split':'30%'},'subwidgets':[tv,fv]};bricks.widgetBuild(hsplit,pw.content_w).then(function(w){if(w)pw.content_w.add_widget(w)});});"
|
||||
"script": "fetch('/pipeline-sdlc/api/cockpit_context.dspy').then(function(r){return r.json()}).then(function(d){var pid=d.project_id||'';var pn=d.project_name||'';if(!pid){var pw=new bricks.PopupWindow({title:'提示',cwidth:30,cheight:8,auto_open:true});pw.content_w.add_widget(new bricks.Text({text:'请先选择项目',cfontsize:1,color:'#64748b',padding:'20px'}));return;}var pw=new bricks.PopupWindow({title:pn+' - 工作空间',cwidth:80,cheight:36,auto_open:true});var tv={'widgettype':'Tree','id':'ws_tree','options':{'dataurl':'/pipeline-sdlc/api/workspace_tree.dspy','css':'filler','padding':'4px','cheight':'100%'},'binds':[{'wid':'self','event':'selected','actiontype':'urlwidget','target':'ws_files','options':{'url':'/pipeline-sdlc/api/workspace_files.dspy'}}]};var fv={'widgettype':'VScrollPanel','id':'ws_files','options':{'css':'filler','padding':'8px','gap':'4px'}};var hsplit={'widgettype':'Splitter','options':{'direction':'horizontal','split':'30%'},'subwidgets':[tv,fv]};var rb=pw.dom_element.querySelector('.resizebox');rb.innerHTML='';bricks.widgetBuild(hsplit,rb).then(function(w){if(w)rb.appendChild(w.dom_element)});});"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user