fixed query to avoid hierarchy clashes

This commit is contained in:
dcore94 2023-10-27 15:52:35 +02:00
parent 07382c94a7
commit 4818464409
1 changed files with 2 additions and 2 deletions

View File

@ -533,7 +533,7 @@ class CCPRemoteFileInputWidgetController extends CCPBaseInputWidgetController{
<svg name="trigger" style="width:24;height:24;fill:#007bff; cursor:pointer" viewBox="0 -960 960 960">
<path d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640H447l-80-80H160v480l96-320h684L837-217q-8 26-29.5 41.5T760-160H160Zm84-80h516l72-240H316l-72 240Zm0 0 72-240-72 240Zm-84-400v-80 80Z"/>
</svg>
<div class="d-none position-absolute shadow border border-primary bg-light p-2" style="left: 100%;z-index:1000; line-height:1.5rem;overflow-x:hidden;text-wrap:nowrap;text-overflow: ellipsis;min-height:5rem; max-height:10rem; padding:5px;">
<div name="ws" class="d-none position-absolute shadow border border-primary bg-light p-2" style="left: 100%;z-index:1000; line-height:1.5rem;overflow-x:hidden;text-wrap:nowrap;text-overflow: ellipsis;min-height:5rem; max-height:10rem; padding:5px;">
<div class="d-flex justify-content-between" style="border-bottom: solid 1px gray;">
<h5 class="text-secondary">Access your workspace</h5>
<span class="btn text-danger p-0" style="font-weight:bold" name="closebtn">x</span>
@ -547,7 +547,7 @@ class CCPRemoteFileInputWidgetController extends CCPBaseInputWidgetController{
</div>
</div>
`
const ws = this.rootdoc.querySelector("d4s-storage-tree")
const ws = this.rootdoc.querySelector("div[name=ws]")
this.rootdoc.querySelector("svg[name=trigger]").addEventListener("click", ev=>{
ws.parentElement.classList.toggle("d-none")
})