Add basic support for batch execution options
This commit is contained in:
parent
3b265e19c4
commit
db62f82a37
2 changed files with 113 additions and 18 deletions
|
@ -10,8 +10,32 @@
|
|||
$('.newgrid-wrapper').gridwrapper();
|
||||
|
||||
$('#execute-batch').click(function() {
|
||||
$(this).button('option', 'label', "Executing, please wait...").button('disable');
|
||||
location.href = '${url('{}.execute'.format(route_prefix), uuid=batch.uuid)}';
|
||||
% if master.has_execution_options:
|
||||
$('#execution-options-dialog').dialog({
|
||||
title: "Execution Options",
|
||||
width: 500,
|
||||
height: 300,
|
||||
modal: true,
|
||||
buttons: [
|
||||
{
|
||||
text: "Execute",
|
||||
click: function(event) {
|
||||
$(event.target).button('option', 'label', "Executing, please wait...").button('disable');
|
||||
$('form[name="batch-execution"]').submit();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: "Cancel",
|
||||
click: function() {
|
||||
$(this).dialog('close');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
% else:
|
||||
$(this).button('option', 'label', "Executing, please wait...").button('disable');
|
||||
$('form[name="batch-execution"]').submit();
|
||||
% endif
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -52,3 +76,13 @@
|
|||
</div><!-- form-wrapper -->
|
||||
|
||||
${rows_grid|n}
|
||||
|
||||
<div id="execution-options-dialog" style="display: none;">
|
||||
|
||||
${h.form(url('{}.execute'.format(route_prefix), uuid=batch.uuid), name='batch-execution')}
|
||||
% if master.has_execution_options:
|
||||
${rendered_execution_options|n}
|
||||
% endif
|
||||
${h.end_form()}
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue