show direct execution url for method

This commit is contained in:
dcore94 2024-02-02 18:07:28 +01:00
parent 4f3a892eeb
commit f69ee9b3e6
1 changed files with 10 additions and 0 deletions

View File

@ -92,6 +92,12 @@ class CCPExecutionForm extends HTMLElement{
<button id="execute_method_button" class="btn btn-info">Execute</button>
</div>
<div class="col-6">
<div class="">
<label>Direct link</label>
<div class="d-flex">
<a name="direct_link_method" href="${window.location-href}">${window.location.href}</a>
</div>
</div>
<div class="">
<label>Generate code for:</label>
<div class="d-flex">
@ -398,6 +404,10 @@ class CCPExecutionForm extends HTMLElement{
return false
}
},
{
target: "a[name=direct_link_method]",
apply : (e,d)=>e.href = e.textContent = window.Location.origin + window.Location.path + "?method=" + d.id
}
]
}