Add show all vs. show diffs for upgrade packages

plus some related tweaks
This commit is contained in:
Lance Edgar 2017-08-12 22:38:23 -05:00
parent 24d89db025
commit 4b5e415147
4 changed files with 44 additions and 6 deletions

View file

@ -72,7 +72,7 @@ ${h.csrf_token(request)}
## % if form.creating and form.allow_successive_creates:
## ${h.submit('create_and_continue', form.successive_create_label)}
## % endif
${h.link_to("Cancel", form.cancel_url, class_='button')}
${h.link_to("Cancel", form.cancel_url, class_='button autodisable')}
</div>
% endif

View file

@ -1,6 +1,41 @@
## -*- coding: utf-8; -*-
<%inherit file="/master/view.mako" />
<%def name="extra_javascript()">
${parent.extra_javascript()}
<script type="text/javascript">
function show_packages(type) {
if (type == 'all') {
$('.showing .diffs').css('font-weight', 'normal');
$('table.diff tbody tr').show();
$('.showing .all').css('font-weight', 'bold');
} else if (type == 'diffs') {
$('.showing .all').css('font-weight', 'normal');
$('table.diff tbody tr:not(.diff)').hide();
$('.showing .diffs').css('font-weight', 'bold');
}
}
$(function() {
show_packages('diffs');
$('.showing .all').click(function() {
show_packages('all');
return false;
});
$('.showing .diffs').click(function() {
show_packages('diffs')
return false;
});
});
</script>
</%def>
${parent.body()}
% if not instance.executed and request.has_perm('{}.execute'.format(permission_prefix)):