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

workflows list available from ng6

parent 1e90dc1d
......@@ -94,7 +94,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<button id="hide_run" type="button" class="btn btn-small"><i class=" icon-eye-close"></i> hide</button>
<button id="unhide_run" type="button" class="btn btn-small"><i class="icon-eye-open"></i> unhide</button>
</div>
<button id="delete_run" type="button" class="btn btn-small"><i class="icon-trash"></i> delete</button>
<div class="btn-group">
<button id="add_run" type="button" class="btn btn-small"><i class="icon-plus"></i> add</button>
<button id="delete_run" type="button" class="btn btn-small"><i class="icon-minus"></i> delete</button>
</div>
</th>
</tr>
</tfoot>
......
......@@ -582,6 +582,51 @@ $(function () {
});
/* add a brand new run option */
$(":button[id=add_run]").click(function(){
$('#setAndRunModalLabel').html("Add a run <small> from a workflow execution</small>");
var carousel = '<div id="myCarousel" class="carousel slide">';
carousel += '<div class="carousel-inner">';
carousel += '<div id="availableWorkflows" class="active item"></div>';
carousel += '<div id="selectedWfForm" 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");
}
$("#reset_workflow").hide();
$("#run_workflow").hide();
$("#back_to_workflows_list").hide();
$('#availableWorkflows').html("wait");
$('#setAndRunModal').modal();
$('#availableWorkflows').availablewf({
callback: function(workflow) {
$("#myCarousel").carousel('next');
$("#myCarousel").carousel('pause');
$("#reset_workflow").show();
$("#run_workflow").show();
$("#back_to_workflows_list").show();
$("#back_to_workflows_list").click(function(){
$("#reset_workflow").hide();
$("#run_workflow").hide();
$("#back_to_workflows_list").hide();
$("#myCarousel").carousel('prev');
});
$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
$('#selectedWfForm').wfform({
workflowClass: workflow["class"],
displayRunButton: false,
displayResetButton: false
});
}
});
$("#reset_workflow").click(function(){ $('#setAndRunModalBody').wfform('reset'); });
$("#run_workflow").click(function(){ $('#setAndRunModalBody').wfform('run'); });
});
/* delete user from project option */
$(":button[id=del_user]").click(function(){
......
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