minor improvements

This commit is contained in:
dcore94 2023-03-17 11:51:03 +01:00
parent 37bd3a9b17
commit cad9b5684f
1 changed files with 3 additions and 4 deletions

View File

@ -172,7 +172,6 @@ class CCPMethodEditorController extends HTMLElement{
connectNewEditRequest(){ connectNewEditRequest(){
document.addEventListener("neweditrequest", ev=>{ document.addEventListener("neweditrequest", ev=>{
this.parentElement.scrollIntoViewIfNeeded()
this.cloneOrEditMethod(ev.detail) this.cloneOrEditMethod(ev.detail)
}) })
} }
@ -361,6 +360,7 @@ class CCPMethodEditorController extends HTMLElement{
this.#rootdoc.querySelector(".plexiglass").classList.toggle("d-none") this.#rootdoc.querySelector(".plexiglass").classList.toggle("d-none")
this.render() this.render()
this.#locked = false this.#locked = false
this.parentElement.scrollIntoViewIfNeeded()
} }
render(){ render(){
@ -475,7 +475,6 @@ class CCPMethodEditorController extends HTMLElement{
<div> <div>
<span>Scripts</span> <span>Scripts</span>
<select name="script-selector" style="border:none; padding:.3rem"> <select name="script-selector" style="border:none; padding:.3rem">
<option value=""></option>
<option value="deploy-script">Deploy</option> <option value="deploy-script">Deploy</option>
<option value="execute-script">Execute</option> <option value="execute-script">Execute</option>
<option value="undeploy-script">Undeploy</option> <option value="undeploy-script">Undeploy</option>
@ -828,7 +827,7 @@ class CCPMethodEditorController extends HTMLElement{
if(this.#current.keywords){ if(this.#current.keywords){
return this.#current.keywords.map((k,i) => { return this.#current.keywords.map((k,i) => {
return ` return `
<div class="ccp-option badge ccp-keyword"> <div class="ccp-option badge ccp-keyword" title="${k}" alt="${k}">
<span>${k}</span> <span>${k}</span>
<span class="btn text-danger ccp-toolbar-button" name="delete-keyword" data-index="${i}">x</span> <span class="btn text-danger ccp-toolbar-button" name="delete-keyword" data-index="${i}">x</span>
</div> </div>
@ -862,7 +861,7 @@ class CCPMethodEditorController extends HTMLElement{
renderInfrastructures(){ renderInfrastructures(){
return this.#current.links.filter(l=>l.rel === "compatibleWith").map((l, i)=>{ return this.#current.links.filter(l=>l.rel === "compatibleWith").map((l, i)=>{
return ` return `
<div class="ccp-option badge ccp-keyword"> <div class="ccp-option badge ccp-keyword" title="${l}" alt="${l}">
<span>${l.title}</span> <span>${l.title}</span>
<span class="btn text-danger ccp-toolbar-button" name="delete-infrastructure" data-index="${i}">x</span> <span class="btn text-danger ccp-toolbar-button" name="delete-infrastructure" data-index="${i}">x</span>
</div> </div>