Commit 5b1ec377 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 13dbbc4f
......@@ -590,12 +590,17 @@ $(function () {
carousel += '<div class="carousel-inner">';
carousel += '<div id="availableWorkflows" class="active item"></div>';
carousel += '<div id="selectedWfForm" class="item"></div>';
carousel += '<div id="monitoringWorkflow" class="item"></div>';
carousel += '</div>';
carousel += '</div>';
$('#setAndRunModalBody').html(carousel);
if ($("#back_to_workflows_list").size() == 0) {
$('<button id="back_to_workflows_list" class="btn"><i class="icon-arrow-left"></i> Back</button>').insertBefore("#reset_workflow");
}
if ($("#refresh_workflow_status").size() == 0) {
$('<button id="refresh_workflow_status" class="btn"><i class="icon-refresh"></i> Refresh</button>').insertBefore("#reset_workflow");
}
$("#refresh_workflow_status").hide();
$("#reset_workflow").hide();
$("#run_workflow").hide();
$("#back_to_workflows_list").hide();
......@@ -618,13 +623,26 @@ $(function () {
$('#selectedWfForm').wfform({
workflowClass: workflow["class"],
displayRunButton: false,
displayResetButton: false
});
displayResetButton: false,
callback: function(running_wf) {
$("#reset_workflow").hide();
$("#run_workflow").hide();
$("#back_to_workflows_list").hide();
$("#refresh_workflow_status").show();
$("#myCarousel").carousel('next');
$("#myCarousel").carousel('pause');
$('#setAndRunModalLabel').html(running_wf["name"] + " <small>" + running_wf["id"] + "</small>");
$('#monitoringWorkflow').wfstatus({
workflowID: running_wf.id,
forceUsingWorkflow: running_wf
});
}
});
}
});
$("#reset_workflow").click(function(){ $('#setAndRunModalBody').wfform('reset'); });
$("#run_workflow").click(function(){ $('#setAndRunModalBody').wfform('run'); });
$("#reset_workflow").click(function(){ $('#selectedWfForm').wfform('reset'); });
$("#run_workflow").click(function(){ $('#selectedWfForm').wfform('run'); });
$("#refresh_workflow_status").click(function(){ $('#monitoringWorkflow').wfstatus('reload'); });
});
/* delete user from project option */
......
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