Commit 46ff34e2 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

use handler to avoid multiple ajax queries

parent a7a46624
......@@ -205,23 +205,24 @@
$('#back_workflow').hide();
$('.status-panel').show();
});
function outputWFHandler(event) {
$('#statusModalBody').wfoutputs({
workflowID: event.data.workflow_id
})
$('#back_workflow').show();
$('.status-panel').hide();
}
$("#active-workflows-list").activewf();
$("#active-workflows-list").on("select.active", function(event, workflow) {
$('#statusModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
$('#statusModalBody').wfstatus({
workflowID: workflow["id"]
workflowID: workflow.id
});
$('#statusModal').modal();
$('#back_workflow').hide();
$('.status-panel').show();
$("#output_workflow").click(function() {
$('#statusModalBody').wfoutputs({
workflowID: workflow.id
})
$('#back_workflow').show();
$('.status-panel').hide();
});
$("#output_workflow").unbind('click', outputWFHandler);
$("#output_workflow").bind('click', {"workflow_id": workflow.id}, outputWFHandler);
});
/**
......
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