Various tweaks for support of native inventory

certaianly some other things made it in here too..
This commit is contained in:
Lance Edgar 2017-07-19 01:42:18 -05:00
parent eb68eec520
commit 61d504afb8
11 changed files with 129 additions and 16 deletions

View file

@ -10,6 +10,12 @@
var has_execution_options = ${'true' if master.has_execution_options else 'false'};
$(function() {
% if master.has_worksheet:
$('.load-worksheet').click(function() {
$(this).button('disable').button('option', 'label', "Working, please wait...");
location.href = '${url('{}.worksheet'.format(route_prefix), uuid=batch.uuid)}';
});
% endif
$('#refresh-data').click(function() {
$(this)
.button('option', 'disabled', true)
@ -50,7 +56,11 @@
</div>
</%def>
<%def name="leading_buttons()"></%def>
<%def name="leading_buttons()">
% if master.has_worksheet and not batch.executed and request.has_perm('{}.worksheet'.format(permission_prefix)):
<button type="button" class="load-worksheet">Edit as Worksheet</button>
% endif
</%def>
<%def name="refresh_button()">
% if master.viewing and master.batch_refreshable(batch) and request.has_perm('{}.refresh'.format(permission_prefix)):