Add way to execute multiple handheld batches at once

This commit is contained in:
Lance Edgar 2017-06-21 17:29:06 -05:00
parent a63f2e3623
commit 5a0fa20e03
2 changed files with 157 additions and 3 deletions

View file

@ -0,0 +1,60 @@
## -*- coding: utf-8; -*-
<%inherit file="/newbatch/index.mako" />
<%def name="extra_javascript()">
${parent.extra_javascript()}
<script type="text/javascript">
var has_execution_options = ${'true' if master.has_execution_options else 'false'};
$(function() {
$('#execute-results-button').click(function() {
var form = $('form[name="execute-results"]');
if (has_execution_options) {
$('#execution-options-dialog').dialog({
title: "Execution Options",
width: 500,
height: 300,
modal: true,
buttons: [
{
text: "Execute",
click: function(event) {
dialog_button(event).button('option', 'label', "Executing, please wait...").button('disable');
form.submit();
}
},
{
text: "Cancel",
click: function() {
$(this).dialog('close');
}
}
]
});
} else {
$(this).button('option', 'label', "Executing, please wait...").button('disable');
form.submit();
}
});
});
</script>
</%def>
<%def name="grid_tools()">
<button type="button" id="execute-results-button">Execute Results</button>
</%def>
${parent.body()}
<div id="execution-options-dialog" style="display: none;">
${h.form(url('{}.execute_results'.format(route_prefix)), name='execute-results')}
${h.csrf_token(request)}
% if master.has_execution_options:
${rendered_execution_options|n}
% endif
${h.end_form()}
</div>