fixed urls and code
This commit is contained in:
parent
a518d8e153
commit
cfbc9ac52c
|
@ -1,24 +1,25 @@
|
|||
<div>
|
||||
<link rel="stylesheet" href="http://d4science-cdn-public:8984/resources/ccp/css/common.css"></link>
|
||||
<link rel="stylesheet" href="http://d4science-cdn-public:8984/resources/ccp/js/codemirror-5.65.2/lib/codemirror.css"></link>
|
||||
<link rel="stylesheet" href="https://nubis1.int.d4science.net:8080/ccp/css/common.css"></link>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||
<template id="EXECUTION_FORM_TEMPLATE">
|
||||
<form class="ccp-form ccp-execution-form " name="execution_form">
|
||||
<div name="execution_form">
|
||||
<h3></h3>
|
||||
<p class="description"></p>
|
||||
<div name="plexiglass" class="ccp-invisible">
|
||||
<span name="status"></span>
|
||||
<span class="fas fa-spinner fa-spin"></span>
|
||||
</div>
|
||||
<form name="execution_form">
|
||||
<div class="ccp-inputs">
|
||||
<div class="form-group"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
<template id="EXECUTION_FORM_EMPTY_TEMPLATE">
|
||||
<form class="ccp-form ccp-empty-execution-form" name="execution_form" style="min-width:200px;min-height:200px">
|
||||
<div name="execution_form">
|
||||
<i>Select a method</i>
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
<form name="execution_form"></form>
|
||||
<div name="execution_form"></div>
|
||||
</div>
|
|
@ -6,8 +6,7 @@ class CCPExecutionForm extends HTMLElement{
|
|||
#method;
|
||||
|
||||
#serviceurl = "https://nubis1.int.d4science.net:8080"
|
||||
//#cdnurl = "https://nubis1.int.d4science.net:8080/ccp/fragment.html"
|
||||
#cdnurl = "http://d4science-cdn-public:8984/resources/ccp/executionformfragment.html"
|
||||
#cdnurl = "https://nubis1.int.d4science.net:8080/ccp/fragment.html"
|
||||
|
||||
constructor(){
|
||||
super()
|
||||
|
@ -64,10 +63,10 @@ class CCPExecutionForm extends HTMLElement{
|
|||
|
||||
#empty_executionform_bss = {
|
||||
template : "#EXECUTION_FORM_EMPTY_TEMPLATE",
|
||||
target : "form[name=execution_form]",
|
||||
target : "div[name=execution_form]",
|
||||
on_drop : ev=>{
|
||||
const id = ev.dataTransfer.getData('text/plain+ccpmethod');
|
||||
if(id){
|
||||
if(ev.dataTransfer && ev.dataTransfer.getData('text/plain+ccpmethod')){
|
||||
const id = ev.dataTransfer.getData('text/plain+ccpmethod')
|
||||
this.setAttribute("method", id);
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
|
@ -76,7 +75,6 @@ class CCPExecutionForm extends HTMLElement{
|
|||
},
|
||||
on_dragover : ev=>{
|
||||
ev.preventDefault()
|
||||
ev.currentTarget.style.backgroundColor = "#eeffff"
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -85,8 +83,8 @@ class CCPExecutionForm extends HTMLElement{
|
|||
target : "form[name=execution_form]",
|
||||
in : ()=>this.#data,
|
||||
on_drop : ev=>{
|
||||
if(ev.dataTransfer && ev.dataTransfer.getData('text/plain+ccpmethod')){
|
||||
const id = ev.dataTransfer.getData('text/plain+ccpmethod');
|
||||
if(id){
|
||||
this.setAttribute("method", id);
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
|
@ -94,8 +92,6 @@ class CCPExecutionForm extends HTMLElement{
|
|||
},
|
||||
on_dragover : ev=>{
|
||||
ev.preventDefault()
|
||||
ev.currentTarget.style.backGround = "blue"
|
||||
ev.currentTarget.style.backgroundColor = "#eeffff"
|
||||
},
|
||||
recurse : [
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ class CodeInputRenderer extends Renderer{
|
|||
}
|
||||
|
||||
connectedCallback(controller){
|
||||
const ta = controller.querySelector("textarea")
|
||||
/*const ta = controller.querySelector("textarea")
|
||||
const opts = {
|
||||
lineNumbers: true,
|
||||
indentUnit: 4,
|
||||
|
@ -182,7 +182,7 @@ class CodeInputRenderer extends Renderer{
|
|||
|
||||
this.#codemirror = CodeMirror.fromTextArea(ta, opts)
|
||||
this.#codemirror.setValue(this.schema.default)
|
||||
this.#codemirror.refresh()
|
||||
this.#codemirror.refresh()*/
|
||||
}
|
||||
|
||||
render(){
|
||||
|
@ -193,8 +193,7 @@ class CodeInputRenderer extends Renderer{
|
|||
${this.title}
|
||||
<span class="ccp-help-icon" title="${this.description}" alt="${this.description}">?</span>
|
||||
</label>
|
||||
<textarea>
|
||||
</textarea>
|
||||
<textarea>${this.schema.default}</textarea>
|
||||
</div>
|
||||
`
|
||||
return this.#html
|
||||
|
|
|
@ -7,8 +7,7 @@ class CCPMethodList extends HTMLElement{
|
|||
#dragged = null;
|
||||
|
||||
#serviceurl = "https://nubis1.int.d4science.net:8080"
|
||||
//#cdnurl = "https://nubis1.int.d4science.net:8080/ccp/fragment.html"
|
||||
#cdnurl = "http://d4science-cdn-public:8984/resources/ccp/methodlistfragment.html"
|
||||
#cdnurl = "https://nubis1.int.d4science.net:8080/ccp/fragment.html"
|
||||
|
||||
constructor(){
|
||||
super()
|
||||
|
@ -78,14 +77,12 @@ class CCPMethodList extends HTMLElement{
|
|||
target : "li",
|
||||
"in" : (e,d)=>this.#filtered,
|
||||
on_dragstart : ev=>{
|
||||
ev.stopPropagation()
|
||||
ev.dataTransfer.effectAllowed = 'move'
|
||||
ev.dataTransfer.setData('text/html', ev.currentTarget.innerHTML)
|
||||
ev.dataTransfer.setData('text/plain+ccpmethod', ev.currentTarget.bss_input.data.id)
|
||||
},
|
||||
on_dragend : ev=>{
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
},
|
||||
recurse : [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue