Add way to execute multiple handheld batches at once
This commit is contained in:
parent
a63f2e3623
commit
5a0fa20e03
2 changed files with 157 additions and 3 deletions
60
tailbone/templates/batch/handheld/index.mako
Normal file
60
tailbone/templates/batch/handheld/index.mako
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue