diff --git a/ccp/js/executionformcontroller.js b/ccp/js/executionformcontroller.js index 050dee7..ca9658c 100644 --- a/ccp/js/executionformcontroller.js +++ b/ccp/js/executionformcontroller.js @@ -13,6 +13,8 @@ class CCPExecutionForm extends HTMLElement{ this.#boot = document.querySelector("d4s-boot-2") this.#serviceurl = this.getAttribute("serviceurl") this.#rootdoc = this.attachShadow({ "mode" : "open"}) + + this.connectNewExecutionRequest() this.render() this.showMethod() } @@ -28,6 +30,14 @@ class CCPExecutionForm extends HTMLElement{ } } + connectNewExecutionRequest(){ + document.addEventListener("newexecutionrequest", ev=>{ + if(window.confirm("Confirm overwrite of execution form?")){ + this.setAttribute("method", ev.detail) + } + }) + } + render(){ this.#rootdoc.innerHTML = `
diff --git a/ccp/js/methodlistcontroller2.js b/ccp/js/methodlistcontroller2.js index 4b1ff5f..a0d440d 100644 --- a/ccp/js/methodlistcontroller2.js +++ b/ccp/js/methodlistcontroller2.js @@ -88,11 +88,11 @@ class CCPMethodList2 extends HTMLElement{
-
- - +
+ @@ -326,8 +326,12 @@ class CCPMethodList2 extends HTMLElement{ target : "li.ccp-process", "in" : (e,d)=>this.#filtered[d], on_click : ev=>{ + const id = ev.currentTarget.bss_input.data.id if(ev.target.getAttribute("name") === "export_method"){ - this.exportMethod(ev.currentTarget.bss_input.data.id) + this.exportMethod(id) + }else if(ev.target.getAttribute("name") === "executable"){ + const event = new CustomEvent('newexecutionrequest', { detail: id }); + document.dispatchEvent(event) } }, on_dragstart : ev=>{ @@ -345,7 +349,7 @@ class CCPMethodList2 extends HTMLElement{ apply : (e,d)=>{ e.textContent = d.version } }, { - target: "div[name=executable]", + target: "button[name=executable]", apply : (e,d)=>{ e.style.display = d.executable ? "revert" : "none" } }, {