From cb51f396fe1dcd56003007ff76a326b55ced2077 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 21 Apr 2023 15:41:21 +0200 Subject: [PATCH] add confirmation dialogs --- ccp/js/executionhistorycontroller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ccp/js/executionhistorycontroller.js b/ccp/js/executionhistorycontroller.js index 1cecae9..611739c 100644 --- a/ccp/js/executionhistorycontroller.js +++ b/ccp/js/executionhistorycontroller.js @@ -187,7 +187,9 @@ class CCPExecutionHistory extends HTMLElement { this.#archiveupload.addEventListener("click", ev=>{ const link = ev.target.parentElement.querySelector("input").value if(link){ - this.fromArchive(link) + if(confirm("Confirm importing of execution from link?")){ + this.fromArchive(link) + } } }) } @@ -486,8 +488,10 @@ class CCPExecutionHistory extends HTMLElement { this.reexecute(id, 1) } if(ev.target.getAttribute("name") === "archive"){ - const id = ev.currentTarget.getAttribute("data-index") - this.toArchive(id) + if(confirm("Confirm aarchiving of execution to workspace?")){ + const id = ev.currentTarget.getAttribute("data-index") + this.toArchive(id) + } } }, recurse : [