Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
66b4d9af
Commit
66b4d9af
authored
Jun 09, 2015
by
Jerome Mariette
Browse files
fix a bug with status and add the render function to the status (for hidden element buildings)
parent
b8e030b5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
docs/example1.html
View file @
66b4d9af
...
...
@@ -184,6 +184,9 @@
$
(
"
#reset_workflow
"
).
click
(
function
(){
$
(
'
#setAndRunModalBody
'
).
wfform
(
'
reset
'
);
});
$
(
'
#setAndRunModal
'
).
on
(
'
shown.bs.modal
'
,
function
()
{
$
(
'
#setAndRunModalBody
'
).
wfform
(
'
render
'
);
});
$
(
'
#statusModal
'
).
on
(
'
shown.bs.modal
'
,
function
()
{
$
(
'
#statusModalBody
'
).
wfstatus
(
'
render
'
);
});
$
(
"
#back_workflow
"
).
click
(
function
(){
$
(
'
#statusModalBody
'
).
wfstatus
(
'
reload
'
);
...
...
docs/jflow-plugin.html
View file @
66b4d9af
...
...
@@ -556,6 +556,11 @@
<p>
Requests the jflow server to rerun the workflow.
</p>
<pre
class=
"pre-hl "
><code
class=
"javascript"
>
$('#element').wfstatus('rerun')
</code></pre>
<h4>
.wfstatus('render')
</h4>
<p>
Render the status. This method can be useful when the form is built within a hidden
<code>
$("#element")
</code>
. The function
allows to render the
<code>
cytoscape
</code>
graph.
</p>
<pre
class=
"pre-hl "
><code
class=
"javascript"
>
$('#element').wfform('render')
</code></pre>
<h4>
.wfstatus('reset', component_name)
</h4>
<p>
Requests the jflow server to reset a specific component. The
<code>
component_name
</code>
variable should be given to the function.
</p>
...
...
src/js/jflow-wfstatus.js
View file @
66b4d9af
...
...
@@ -30,6 +30,7 @@
var
WFStatus
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
);
this
.
options
=
$
.
extend
({},
$
.
fn
.
wfstatus
.
defaults
,
options
);
this
.
cytoptions
=
{};
if
(
this
.
options
.
serverURL
==
""
)
{
this
.
options
.
serverURL
=
$
.
fn
.
activewf
.
defaults
.
serverURL
;
}
}
...
...
@@ -134,7 +135,7 @@
}
}
WFStatus
.
prototype
.
_createcytoscape
=
function
(
nodes
,
edges
)
{
WFStatus
.
prototype
.
_createcytoscape
=
function
(
nodes
,
edges
,
$this
)
{
var
cytoptions
=
{
style
:
cytoscape
.
stylesheet
()
...
...
@@ -282,11 +283,14 @@
cy
.
panzoom
({});
}
}
setTimeout
(
function
(){
$
(
'
#cytoscape_panel
'
).
cytoscape
(
cytoptions
);
},
100
);
$this
.
cytoptions
=
cytoptions
;
$
(
'
#cytoscape_panel
'
).
cytoscape
(
cytoptions
);
}
WFStatus
.
prototype
.
render
=
function
()
{
// handle a bootstrap bug in case the status is in a modal
$
(
document
).
off
(
'
focusin.bs.modal
'
);
$
(
'
#cytoscape_panel
'
).
cytoscape
(
this
.
cytoptions
);
}
WFStatus
.
prototype
.
_graphview
=
function
()
{
...
...
@@ -376,7 +380,7 @@
$this
.
$element
.
find
(
"
#wfstatus_error_location
"
).
text
(
data
.
errors
[
"
location
"
]
);
$this
.
$element
.
find
(
"
#wfstatus_error_panel
"
).
show
();
}
$this
.
_createcytoscape
(
nodes
,
edges
);
$this
.
_createcytoscape
(
nodes
,
edges
,
$this
);
}
});
}
...
...
src/js/jflow.min.js
View file @
66b4d9af
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment