Commit 12b1c11d authored by Jerome Mariette's avatar Jerome Mariette
Browse files

delete callback function, trigger events instead which is much better

parent 72f4c644
......@@ -153,26 +153,28 @@
* Use the plugins
*/
$("#available-workflows-list").availablewf();
$("#available-workflows-list").on('select', function(event, workflow) {
$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
$('#setAndRunModalBody').wfform({
workflowClass: workflow["class"],
displayRunButton: false,
displayResetButton: false
});
$('#setAndRunModalBody').on('run', function(event, running_wf) {
$('#setAndRunModal').modal('hide');
$('#statusModalLabel').html(running_wf["name"] + " <small>" + running_wf["id"] + "</small>");
$('#statusModalBody').wfstatus({
workflowID: running_wf.id,
forceUsingWorkflow: running_wf
});
$('#statusModal').modal();
$("#active-workflows-list").activewf('reload');
});
$('#setAndRunModal').modal();
});
$('#setAndRunModalBody').on('run', function(event, running_wf) {
$('#setAndRunModal').modal('hide');
$('#statusModalLabel').html(running_wf["name"] + " <small>" + running_wf["id"] + "</small>");
$('#statusModalBody').wfstatus({
workflowID: running_wf.id,
forceUsingWorkflow: running_wf
});
$('#statusModal').modal();
$("#active-workflows-list").activewf('reload');
});
$("#refresh_workflow").click(function(){ $('#statusModalBody').wfstatus('reload'); });
$("#reset_workflow").click(function(){ $('#setAndRunModalBody').wfform('reset'); });
$("#run_workflow").click(function(){ $('#setAndRunModalBody').wfform('run'); });
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment